Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --LocalScript
- local Camera = game.Workspace.CurrentCamera
- local Player = game.Players.LocalPlayer
- local char = Player.Character
- local origRightS = char:WaitForChild("Torso"):WaitForChild("Right Shoulder").C0
- local origLeftS = char:WaitForChild("Torso"):WaitForChild("Left Shoulder").C0
- local origNeck = char:WaitForChild("Torso"):WaitForChild("Neck").C0
- local m = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local IsEquipped = false
- game:GetService("RunService").RenderStepped:Connect(function()
- if IsEquipped == true then
- if char.Torso:FindFirstChild("Right Shoulder") then
- char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:Lerp(CFrame.new(1, .65, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y), 1.55, 0, 0) , 0.1)
- end
- if char.Torso:FindFirstChild("Left Shoulder") then
- char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:Lerp(CFrame.new(-1, .65, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y), -1.55, 0, 0) , 0.1)
- end
- if char.Torso:FindFirstChild("Neck") then
- char.Torso["Neck"].C0 = char.Torso["Neck"].C0:Lerp(CFrame.new(0, 1, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y) + 1.55, 3.15, 0), 0.2)
- end
- else
- if char.Torso:FindFirstChild("Right Shoulder") then
- char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(origRightS, 0.1)
- end
- if char.Torso:FindFirstChild("Left Shoulder") then
- char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(origLeftS, 0.1)
- end
- if char.Torso:FindFirstChild("Neck") then
- char.Torso["Neck"].C0 = char.Torso["Neck"].C0:lerp(origNeck, 0.1)
- end
- end
- end)
- char.ChildAdded:Connect(function()
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Tool") then
- if v:FindFirstChild("HoldArmsStill") then
- else
- IsEquipped = true
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment