Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game.Players.LocalPlayer
- local RS = game:GetService("ReplicatedStorage")
- local runs = game:GetService("RunService")
- Moving = false
- xMove = 0
- yMove = 0
- xSprint = 0
- ySprint = 0
- sprinted = false
- sMoving = false
- DBounce = false
- local list = {}
- local player = game.Players.LocalPlayer
- local character = player.Character
- local arm1 = RS:WaitForChild("ArmRight"):clone()
- local arm2 = RS:WaitForChild("Arm"):clone()
- local arm3 = arm1:clone()
- arm3.Transparency = 1
- arm1.Parent = workspace
- arm2.Parent = workspace
- arm3.Parent = workspace
- --add gun
- local gun = RS:WaitForChild("GunPart"):clone()
- gun.Parent = workspace
- local index = #list+1
- local obj = ((player ~= p and character:WaitForChild("Torso")) or workspace.CurrentCamera)
- list[index] = {gun,obj,arm1,arm2,arm3,player}
- character:WaitForChild("Humanoid").Died:connect(function()
- list[index] = nil -- remove pls
- gun:Destroy()
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- for i,v in pairs(list) do --
- if sprinting then
- offset = ((v[2].Name=="Torso" and CFrame.new(2,0,-2)) or CFrame.new(1.5 + xMove,-1.215 + yMove,-3.0))*CFrame.Angles(math.rad(xSprint),math.rad(ySprint),math.rad(0))
- else
- offset = ((v[2].Name=="Torso" and CFrame.new(2,0,-2)) or CFrame.new(1.5 + xMove,-1.215 + yMove,-3.0))*CFrame.Angles(math.rad(0),math.rad(-5),math.rad(0))
- end
- v[1].CFrame = v[2].CFrame*offset--*CFrame.Angles(math.pi/2,0,0)
- _G.gun = v[1]
- --print(v[1].CFrame)
- if v[6] == p then
- --right arm
- v[3].CFrame = v[2].CFrame*offset
- *CFrame.new(1.4,-.3,1.4)*CFrame.Angles(math.rad(90),math.rad(20),math.rad(-40))
- --left arm
- v[4].CFrame = v[2].CFrame*offset
- *CFrame.new(-1.4,-1.2,0.05)*CFrame.Angles(math.rad(90),math.rad(20),math.rad(70))
- --left arm p2
- v[5].CFrame = v[2].CFrame*offset
- *CFrame.new(-4.8,-1.9,-1)*CFrame.Angles(math.rad(90),math.rad(30),math.rad(60))
- end
- end
- end)
- game.Players.LocalPlayer.Character.Humanoid.Running:connect(function(speed)
- if speed > 0 then
- Moving = true
- else
- Moving = false
- end
- if speed > 16 then
- sprinting = true
- else
- sprinting = false
- end
- end)
- wiggle = coroutine.create(function()
- while true do
- if Moving then
- if sprinting then
- for i = 1, 9 do
- xMove = xMove + 0.0045
- yMove = yMove + 0.0035
- runs.RenderStepped:wait()
- end
- if Moving then
- for i = 1, 8 do
- xMove = xMove - 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- for i = 1, 8 do
- xMove = xMove - 0.0045
- yMove = yMove + 0.0035
- runs.RenderStepped:wait()
- end
- for i = 1, 8 do
- xMove = xMove + 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- else
- for i = 1, 8 do
- xMove = xMove - 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- end
- else
- for i = 1, 10 do
- xMove = xMove + 0.0045
- yMove = yMove + 0.0035
- runs.RenderStepped:wait()
- end
- if Moving then
- for i = 1, 10 do
- xMove = xMove - 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- for i = 1, 10 do
- xMove = xMove - 0.0045
- yMove = yMove + 0.0035
- runs.RenderStepped:wait()
- end
- for i = 1, 10 do
- xMove = xMove + 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- else
- for i = 1, 10 do
- xMove = xMove - 0.0045
- yMove = yMove - 0.0035
- runs.RenderStepped:wait()
- end
- end
- end
- end
- wait()
- end
- end)
- coroutine.resume(wiggle)
- local mouse = player:GetMouse()
- mouse.KeyDown:connect(function(key)
- if key == "0" then
- runningsprint = true
- local keyConnection = mouse.KeyUp:connect(function (key)
- if (key == "0") then
- runningsprint = false
- end
- end)
- if sprinted == false and sMoving == false then
- sMoving = true
- for i = 1, 15 do
- xSprint = xSprint - 1/3
- ySprint = ySprint + 1
- runs.RenderStepped:wait()
- end
- xSprint = -5
- ySprint = 10
- sprinted = true
- sMoving = false
- end
- repeat wait() until runningsprint == false
- if sprinted == true and sMoving == false then
- sMoving = true
- for i = 1, 15 do
- xSprint = xSprint + 1/3
- ySprint = ySprint - 1
- runs.RenderStepped:wait()
- end
- xSprint = 0
- ySprint = -5
- sprinted = false
- sMoving = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment