Quick actions

cmd+k|ctrl+k

Navigation

Languages

fordanny yes

Snippet info

Language

Lua

Visibility

public

Author

codedbytes

Created

2020-07-15T22:00:48Z

Updated

2020-07-15T22:00:48Z

char=owner.Character
ls=char.Torso["Left Shoulder"]
lsw=nil
lswc0=nil
ev=Instance.new("RemoteEvent",char)
ev.Name="action"
acting=false
a=[[
ac=owner.Character.action
uis=game:GetService("UserInputService")
uis.InputBegan:Connect(function(k,g)
if k.KeyCode==Enum.KeyCode.Q and not g then 
ac:FireServer()
end 
end) 
]]
NLS(a,char)
function makeweld()
lsw=Instance.new("Weld",char.Torso)
lsw.Part0=ls.Part0
lsw.Part1=ls.Part1
lsw.C0=ls.C0
lsw.C1=ls.C1
lswc0=lsw.C0
end 
function destroyweld()
lsw:Destroy()
lsw=nil
lswc0=nil
end
ev.OnServerEvent:Connect(function()
if not acting then 
acting=true 
makeweld() 
for i=1,30 do 
lsw.C0=lsw.C0:lerp(lswc0*CFrame.Angles(0,0,math.rad(-145)),.1)
wait()
end
wait()
for i=1,30 do 
lsw.C0=lsw.C0:lerp(lswc0*CFrame.Angles(0,0,math.rad(-90)),.1)
wait()
end
wait(.1)
destroyweld()
acting=false 
end 
end)
INFO