Advertisement
lundofett

Untitled

Nov 30th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --By Rufus14
  2. --owner = game:GetService("Players"):GetPlayerFromCharacter(script.Parent)
  3. character = owner.Character
  4. NLS([[
  5. --By Rufus14
  6. owner = game:GetService("Players").LocalPlayer
  7. character = owner.Character
  8. runservice = game:GetService("RunService")
  9. humanoid = character:findFirstChildOfClass("Humanoid")
  10. remote = character:WaitForChild("postalremote")
  11. rootpart = character.HumanoidRootPart
  12. mouse = owner:GetMouse()
  13. mouse.Button1Down:connect(function()
  14.     remote:FireServer("shoot", mouse.Hit)
  15. end)
  16. mouse.KeyDown:connect(function(key)
  17.     key = key:lower()
  18.     if key == "x" then
  19.         remote:FireServer("well hello there")
  20.     end
  21. end)
  22. while runservice.RenderStepped:wait() do
  23.     remote:FireServer("look", workspace.CurrentCamera.CFrame)
  24. end
  25. ]], character)
  26. runservice = game:GetService("RunService")
  27. humanoid = character:findFirstChildOfClass("Humanoid")
  28. local remote = Instance.new("RemoteEvent", character)
  29. remote.Name = "postalremote"
  30. ragdolltime = 2
  31. local rightleg = Instance.new("Weld", owner.Character.Torso)
  32. rightleg.Part0 = owner.Character.Torso
  33. rightleg.Part1 = owner.Character["Right Leg"]
  34. rightleg.C0 = CFrame.new(0.5,-2,0)
  35. rightleg.Name = "RightLegWeld"
  36. local leftleg = Instance.new("Weld", owner.Character.Torso)
  37. leftleg.Part0 = owner.Character.Torso
  38. leftleg.Part1 = owner.Character["Left Leg"]
  39. leftleg.C0 = CFrame.new(-0.5,-1,0)
  40. leftleg.Name = "LeftLegWeld"
  41. local rightarm = Instance.new("Weld", owner.Character.Torso)
  42. rightarm.Part0 = owner.Character.Torso
  43. rightarm.Part1 = owner.Character["Right Arm"]
  44. rightarm.C0 = CFrame.new(1.5,0,0)
  45. rightarm.Name = "RightArmWeld"
  46. local leftarm = Instance.new("Weld", owner.Character.Torso)
  47. leftarm.Part0 = owner.Character.Torso
  48. leftarm.Part1 = owner.Character["Left Arm"]
  49. leftarm.C0 = CFrame.new(-1.5,0,0)
  50. leftarm.Name = "LeftArmWeld"
  51. local humanoidrootpart = Instance.new("Weld", owner.Character.HumanoidRootPart)
  52. humanoidrootpart.Part0 = owner.Character.HumanoidRootPart
  53. humanoidrootpart.Part1 = owner.Character.Torso
  54. humanoidrootpart.Name = "HumanoidRootPartWeld"
  55. local head = Instance.new("Weld", owner.Character.Torso)
  56. head.Part0 = owner.Character.Torso
  57. head.Part1 = owner.Character.Head
  58. head.C0 = CFrame.new(0,1.5,0)
  59. head.Name = "HeadWeld"
  60. rootpart = character.HumanoidRootPart
  61. anim = "idle"
  62. humanoid.WalkSpeed = 20
  63. for i,v in pairs(character:GetChildren()) do
  64.     end
  65.     if v.ClassName == "Part" and v.Name ~= "Head" then
  66.         v.BrickColor = BrickColor.new("Smoky grey")
  67.     end
  68. end
  69. owner.Chatted:connect(function(butwhathechatted)
  70.     if character.Head:findFirstChild("chat") then
  71.         character.Head:findFirstChild("chat"):destroy()
  72.     end
  73.     local billboard = Instance.new("BillboardGui", character.Head)
  74.     billboard.Adornee = character.Head
  75.     billboard.StudsOffset = Vector3.new(-1, 2.5, 0)
  76.     billboard.Size = UDim2.new(2,0,1,0)
  77.     billboard.Name = "chat"
  78.     local text = Instance.new("TextLabel", billboard)
  79.     text.BackgroundTransparency = 1
  80.     text.TextStrokeTransparency = 0
  81.     text.TextSize = 25
  82.     text.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  83.     text.Size = billboard.Size
  84.     text.Font = "Code"
  85.     text.TextColor3 = Color3.fromRGB(100,100,100)
  86.     text.Text = butwhathechatted
  87.     coroutine.wrap(function()
  88.         wait(3)
  89.         for i = 1,50 do
  90.             billboard.StudsOffset = billboard.StudsOffset - Vector3.new(0,-0.01,0)
  91.             text.TextTransparency = text.TextTransparency + 0.02
  92.             text.TextStrokeTransparency = text.TextStrokeTransparency + 0.02
  93.             runservice.Stepped:wait()
  94.         end
  95.         billboard:destroy()
  96.     end)()
  97. end)
  98. local shotgun = Instance.new("Part", character)
  99. shotgun.Size = Vector3.new(0.26, 1.11, 4.85)
  100. shotgun.CanCollide = false
  101. local meshshotgun = Instance.new("SpecialMesh", shotgun)
  102. meshshotgun.MeshId = "http://www.roblox.com/asset/?id=94219391"
  103. meshshotgun.TextureId = "http://www.roblox.com/asset/?id=94219470"
  104. meshshotgun.Scale = Vector3.new(0.75,0.75,0.75)
  105. shotgun:BreakJoints()
  106. local weldshotgun = Instance.new("Weld", shotgun)
  107. weldshotgun.Part0 = character["Right Arm"]
  108. weldshotgun.Part1 = shotgun
  109. weldshotgun.C0 = CFrame.new(0,-0.5,-0.25)
  110. weldshotgun.C0 = weldshotgun.C0 * CFrame.Angles(-math.pi/2,0,0)
  111. local music = Instance.new("Sound", character.Head)
  112. music.Looped = true
  113. music.Volume = 2
  114. shootsound = Instance.new("Sound", shotgun)
  115. shootsound.SoundId = "rbxassetid://2452443974"
  116. shootsound.Volume = 1
  117. local hitmarkersound = Instance.new("Sound", shotgun)
  118. hitmarkersound.SoundId = "rbxassetid://160432334"
  119. hitmarkersound.Volume = 0.5
  120. local musicrandom = math.random(1,2)
  121. if musicrandom == 1 then
  122.     music.SoundId = "rbxassetid://4380119612"
  123. elseif musicrandom == 2 then
  124.     music.SoundId = "rbxassetid://4433374633"
  125. end
  126. music:Play()
  127. shotgun.Locked = true
  128. cananimate = true
  129. canattack = true
  130. coroutine.wrap(function()
  131.     while runservice.Stepped:wait() do
  132.         if rootpart.Velocity.x >= 2 or rootpart.Velocity.x <= -2 or rootpart.Velocity.z >= 2 or rootpart.Velocity.z <= -2 then
  133.             if humanoid.FloorMaterial == Enum.Material.Air then
  134.                 if rootpart.Velocity.x >= 15.5 or rootpart.Velocity.x <= -15.5 or rootpart.Velocity.z >= 15.5 or rootpart.Velocity.z <= -15.5 then
  135.                     if rootpart.Velocity.y >= 3 then
  136.                         anim = "jumprun"
  137.                         --print("jumping (running)")
  138.                     elseif rootpart.Velocity.y <= -3 then
  139.                         anim = "fallrun"
  140.                         --("falling (running)")
  141.                     end
  142.                 else
  143.                     if rootpart.Velocity.y >= 3 then
  144.                         anim = "jump"
  145.                         --print("jumping (walking)")
  146.                     elseif rootpart.Velocity.y <= -3 then
  147.                         anim = "fall"
  148.                         --print("falling (walking)")
  149.                     end
  150.                 end
  151.             else
  152.                 if rootpart.Velocity.x >= 15 or rootpart.Velocity.x <= -15 or rootpart.Velocity.z >= 15 or rootpart.Velocity.z <= -15 then
  153.                     anim = "run"
  154.                     --print("running")
  155.                 else
  156.                     anim = "run"
  157.                     --print("walking")
  158.                 end
  159.             end
  160.         elseif rootpart.Velocity.x <= 2 or rootpart.Velocity.x >= -2 or rootpart.Velocity.z <= 2 or rootpart.Velocity.z >= -2 then
  161.             if humanoid.FloorMaterial == Enum.Material.Air then
  162.                 if rootpart.Velocity.y >= 3 then
  163.                     anim = "jump"
  164.                     --print("jumping (standing)")
  165.                 elseif rootpart.Velocity.y < -3 then
  166.                     anim = "fall"
  167.                     --print("falling (standing)")
  168.                 end
  169.             else
  170.                 anim = "idle"
  171.                 --print("standing")
  172.             end
  173.         end
  174.     end
  175. end)()
  176. local tiltvalue = 0
  177. function ragdollplr(v)
  178.     if not v:findFirstChild("ragdolledpostal") then
  179.         local head = v.Head
  180.         local torso = v:findFirstChild("Torso")
  181.         local humanoid = v:findFirstChildOfClass("Humanoid")
  182.         hitmarkersound:Play()
  183.         local ragdolledknife = Instance.new("BoolValue", v)
  184.         ragdolledknife.Name = "ragdolledpostal"
  185.         local velocity = Instance.new("BodyVelocity", head)
  186.         velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  187.         velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(10,20)
  188.         humanoid.PlatformStand = true
  189.         coroutine.wrap(function()
  190.             wait(ragdolltime)
  191.             humanoid.PlatformStand = false
  192.         end)()
  193.         game.Debris:AddItem(ragdolledknife, ragdolltime)
  194.         game.Debris:AddItem(velocity, 0.2)
  195.         if torso then
  196.             coroutine.wrap(function()
  197.                 humanoid = v:WaitForChild("Humanoid")
  198.                 local ragdoll = v
  199.                 if ragdoll:findFirstChild("Right Arm") then
  200.                     local glue = Instance.new("Glue", ragdoll.Torso)
  201.                     glue.Part0 = ragdoll.Torso
  202.                     glue.Part1 = ragdoll:findFirstChild("Right Arm")
  203.                     glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  204.                     glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  205.                     local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  206.                     limbcollider.Size = Vector3.new(1.4,1,1)
  207.                     limbcollider.Shape = "Cylinder"
  208.                     limbcollider.Transparency = 1
  209.                     limbcollider.Name = "LimbCollider"
  210.                     local limbcolliderweld = Instance.new("Weld", limbcollider)
  211.                     limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  212.                     limbcolliderweld.Part1 = limbcollider
  213.                     limbcolliderweld.Name = "LimbWeld"
  214.                     limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  215.                     coroutine.wrap(function()
  216.                         if ragdoll.Torso:findFirstChild("Right Shoulder") then
  217.                             local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone()
  218.                             ragdoll.Torso:findFirstChild("Right Shoulder"):destroy()
  219.                             coroutine.wrap(function()
  220.                                 wait(ragdolltime)
  221.                                 if not ragdoll:findFirstChild("Torso") then
  222.                                     return
  223.                                 end
  224.                                 limbclone.Parent = ragdoll.Torso
  225.                                 limbclone.Part0 = ragdoll.Torso
  226.                                 limbclone.Part1 = ragdoll["Right Arm"]
  227.                             end)()
  228.                         end
  229.                         wait(ragdolltime)
  230.                         glue:destroy()
  231.                         limbcollider:destroy()
  232.                         limbcolliderweld:destroy()
  233.                     end)()
  234.                 end
  235.                 if ragdoll:findFirstChild("Left Arm") then
  236.                     local glue = Instance.new("Glue", ragdoll.Torso)
  237.                     glue.Part0 = ragdoll.Torso
  238.                     glue.Part1 = ragdoll:findFirstChild("Left Arm")
  239.                     glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  240.                     glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  241.                     local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  242.                     limbcollider.Size = Vector3.new(1.4,1,1)
  243.                     limbcollider.Shape = "Cylinder"
  244.                     limbcollider.Name = "LimbCollider"
  245.                     limbcollider.Transparency = 1
  246.                     local limbcolliderweld = Instance.new("Weld", limbcollider)
  247.                     limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")        
  248.                     limbcolliderweld.Part1 = limbcollider
  249.                     limbcolliderweld.Name = "LimbWeld"
  250.                     limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  251.                     coroutine.wrap(function()
  252.                         if ragdoll.Torso:findFirstChild("Left Shoulder") then
  253.                             local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
  254.                             ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
  255.                             coroutine.wrap(function()
  256.                                 wait(ragdolltime)
  257.                                 if not ragdoll:findFirstChild("Torso") then
  258.                                     return
  259.                                 end
  260.                                 limbclone.Parent = ragdoll.Torso
  261.                                 limbclone.Part0 = ragdoll.Torso
  262.                                 limbclone.Part1 = ragdoll["Left Arm"]
  263.                             end)()
  264.                         end
  265.                         wait(ragdolltime)
  266.                         glue:destroy()
  267.                         limbcollider:destroy()
  268.                         limbcolliderweld:destroy()
  269.                     end)()
  270.                 end
  271.                 if ragdoll:findFirstChild("Left Leg") then
  272.                     local glue = Instance.new("Glue", ragdoll.Torso)
  273.                     glue.Part0 = ragdoll.Torso
  274.                     glue.Part1 = ragdoll:findFirstChild("Left Leg")
  275.                     glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  276.                     glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  277.                     local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  278.                     limbcollider.Size = Vector3.new(1.5,1,1)
  279.                     limbcollider.Shape = "Cylinder"
  280.                     limbcollider.Name = "LimbCollider"
  281.                     limbcollider.Transparency = 1
  282.                     local limbcolliderweld = Instance.new("Weld", limbcollider)
  283.                     limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  284.                     limbcolliderweld.Part1 = limbcollider
  285.                     limbcolliderweld.Name = "LimbWeld"
  286.                     limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  287.                     coroutine.wrap(function()
  288.                         if ragdoll.Torso:findFirstChild("Left Hip") then
  289.                             local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
  290.                             ragdoll.Torso:findFirstChild("Left Hip"):destroy()
  291.                             coroutine.wrap(function()
  292.                                 wait(ragdolltime)
  293.                                 if not ragdoll:findFirstChild("Torso") then
  294.                                     return
  295.                                 end
  296.                                 limbclone.Parent = ragdoll.Torso
  297.                                 limbclone.Part0 = ragdoll.Torso
  298.                                 limbclone.Part1 = ragdoll["Left Leg"]
  299.                             end)()
  300.                         end
  301.                         wait(ragdolltime)
  302.                         glue:destroy()
  303.                         limbcollider:destroy()
  304.                         limbcolliderweld:destroy()
  305.                     end)()
  306.                 end
  307.                 if ragdoll:findFirstChild("Right Leg") then
  308.                     local glue = Instance.new("Glue", ragdoll.Torso)
  309.                     glue.Part0 = ragdoll.Torso
  310.                     glue.Part1 = ragdoll:findFirstChild("Right Leg")
  311.                     glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  312.                     glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  313.                     local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  314.                     limbcollider.Size = Vector3.new(1.5,1,1)
  315.                     limbcollider.Shape = "Cylinder"
  316.                     limbcollider.Name = "LimbCollider"
  317.                     limbcollider.Transparency = 1
  318.                     local limbcolliderweld = Instance.new("Weld", limbcollider)
  319.                     limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  320.                     limbcolliderweld.Part1 = limbcollider
  321.                     limbcolliderweld.Name = "LimbWeld"
  322.                     limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  323.                     coroutine.wrap(function()
  324.                         if ragdoll.Torso:findFirstChild("Right Hip") then
  325.                             local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
  326.                             ragdoll.Torso:findFirstChild("Right Hip"):destroy()
  327.                             coroutine.wrap(function()
  328.                                 wait(ragdolltime)
  329.                                 if not ragdoll:findFirstChild("Torso") then
  330.                                     return
  331.                                 end
  332.                                 limbclone.Parent = ragdoll.Torso
  333.                                 limbclone.Part0 = ragdoll.Torso
  334.                                 limbclone.Part1 = ragdoll["Right Leg"]
  335.                             end)()
  336.                         end
  337.                         wait(ragdolltime)
  338.                         glue:destroy()
  339.                         limbcollider:destroy()
  340.                         limbcolliderweld:destroy()
  341.                     end)()
  342.                 end
  343.             end)()
  344.         end
  345.     end
  346. end
  347. remote.OnServerEvent:connect(function(plr, what, message, message2)
  348.     if plr == owner then
  349.         if what == "look" then
  350.             local lookvector = owner.Character.Torso.CFrame:toObjectSpace(message).lookVector.unit
  351.             head.C0 = CFrame.new(0,1,0) * CFrame.Angles(lookvector.y,0,0)
  352.             head.C0 = head.C0 * CFrame.Angles(0,-lookvector.x,math.rad(-tiltvalue))
  353.             head.C0 = head.C0 * CFrame.new(0,0.5,0)
  354.         elseif what == "shoot" and canattack then
  355.             canattack = false
  356.             cananimate = false
  357.             humanoid.WalkSpeed = 0
  358.             for i = 0,1 , 0.08 do
  359.                 rootpart.CFrame = rootpart.CFrame:lerp(CFrame.new(rootpart.Position, Vector3.new(message.x,rootpart.Position.y,message.z)),i)
  360.                 weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-1,-0.35) * CFrame.Angles(-math.pi/2,0,0),i)
  361.                 rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.21384871, 0.500000477, -0.879925251, 0.342019856, 0.939692438, -1.49501886e-08, 1.94707184e-07, -2.68220873e-07, -0.999999821, -0.939692438, 0.342020035, -3.76157232e-07),i)
  362.                 leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.59201181, 0.470158577, -0.794548988, 0.271118939, 0.181368172, 0.945304275, 0.902039766, -0.390578717, -0.18377316, 0.335885108, 0.902526498, -0.269494623) * CFrame.new(0.1,0,0.5),i)
  363.                 rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  364.                 leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  365.                 humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,(-math.pi/2)+math.rad(20),0), i)
  366.                 tiltvalue = tiltvalue + 0.5
  367.                 runservice.Stepped:wait()
  368.             end
  369.             shootsound:Play()
  370.             shootsound.TimePosition = 0.1
  371.             local light = Instance.new("PointLight", shotgun)
  372.             game.Debris:AddItem(light, 0.1)
  373.             for i = 1,5 do
  374.                 local bullet = Instance.new("Part", character.Head)
  375.                 bullet.Size = Vector3.new(0.1,0.1,4)
  376.                 bullet.Material = "Neon"
  377.                 bullet.Name = "bullet"
  378.                 bullet.CanCollide = false
  379.                 bullet.CFrame = shotgun.CFrame * CFrame.new(0,0.2,-4)
  380.                 bullet.CFrame = CFrame.new(bullet.Position, message.p)
  381.                 game.Debris:AddItem(bullet, 5)
  382.                 local velocity = Instance.new("BodyVelocity", bullet)
  383.                 velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  384.                 velocity.Velocity = bullet.CFrame.lookVector * 800 + Vector3.new(math.random(-40,40),math.random(-40,40),0)
  385.                 bullet.Touched:connect(function(what)
  386.                     if what ~= nil then
  387.                         if what.Parent ~= nil and what.Name ~= "bullet" then
  388.                             if what.Parent:findFirstChildOfClass("Humanoid") then
  389.                                 if what.Parent ~= character then
  390.                                     hitmarkersound:Play()
  391.                                     local hum = what.Parent:findFirstChildOfClass("Humanoid")
  392.                                     local damage = math.random(30,110)
  393.                                     if hum.Health > 500 then
  394.                                         hum.Health = 500
  395.                                         hum.MaxHealth = 500
  396.                                     end
  397.                                     if hum.Health <= damage then
  398.                                         if not what.Parent:findFirstChild("ragdolledpostal") then
  399.                                             --print("critical health")
  400.                                             if math.random(1,3) == 1 and what.Parent:findFirstChild("HumanoidRootPart") then
  401.                                                 if not what.Parent:findFirstChild("dying") then
  402.                                                     if what.Parent:findFirstChild("Torso") then
  403.                                                         coroutine.wrap(function()
  404.                                                             Instance.new("BoolValue", what.Parent).Name = "dying"
  405.                                                             --print("lean")
  406.                                                             ragdollplr(what.Parent)
  407.                                                             if what.Parent:findFirstChild("Health") then
  408.                                                                 what.Parent:findFirstChild("Health").Disabled = true
  409.                                                             end
  410.                                                             hum.Health = 10
  411.                                                             hum.Name = "im hurt help"
  412.                                                             local vhum = hum
  413.                                                             wait(ragdolltime)
  414.                                                             local vrightarm = Instance.new("Weld", what.Parent.Torso)
  415.                                                             vrightarm.Part0 = what.Parent.Torso
  416.                                                             vrightarm.Part1 = what.Parent["Right Arm"]
  417.                                                             vrightarm.C0 = CFrame.new(1.5,0,0)
  418.                                                             vrightarm.Name = "RightArmWeld"
  419.                                                             local vrightleg = Instance.new("Weld", what.Parent.Torso)
  420.                                                             vrightleg.Part0 = what.Parent.Torso
  421.                                                             vrightleg.Part1 = what.Parent["Right Leg"]
  422.                                                             vrightleg.C0 = CFrame.new(0.5,-2,0)
  423.                                                             vrightleg.Name = "RightLegWeld"
  424.                                                             local vleftarm = Instance.new("Weld", what.Parent.Torso)
  425.                                                             vleftarm.Part0 = what.Parent.Torso
  426.                                                             vleftarm.Part1 = what.Parent["Left Arm"]
  427.                                                             vleftarm.C0 = CFrame.new(-1.5,0,0)
  428.                                                             vleftarm.Name = "LeftArmWeld"
  429.                                                             local vleftleg = Instance.new("Weld", what.Parent.Torso)
  430.                                                             vleftleg.Part0 = what.Parent.Torso
  431.                                                             vleftleg.Part1 = what.Parent["Left Leg"]
  432.                                                             vleftleg.C0 = CFrame.new(-0.5,-2,0)
  433.                                                             vleftleg.Name = "LeftLegWeld"
  434.                                                             local vhead = Instance.new("Weld", what.Parent.Torso)
  435.                                                             vhead.Part0 = what.Parent.Torso
  436.                                                             vhead.Part1 = what.Parent.Head
  437.                                                             vhead.C0 = CFrame.new(0,1.5,0)
  438.                                                             vhead.Name = "HeadWeld"
  439.                                                             local vhumanoidrootpart = Instance.new("Weld", what.Parent.HumanoidRootPart)
  440.                                                             vhumanoidrootpart.Part0 = what.Parent.HumanoidRootPart
  441.                                                             vhumanoidrootpart.Part1 = what.Parent.Torso
  442.                                                             vhumanoidrootpart.Name = "HumanoidRootPartWeld"
  443.                                                             local vrootpart = what.Parent.HumanoidRootPart
  444.                                                             coroutine.wrap(function()
  445.                                                                 for i = 0,1 , 0.05 do
  446.                                                                     vrootpart.CFrame = vrootpart.CFrame:lerp(CFrame.new(vrootpart.Position),i)
  447.                                                                 end
  448.                                                             end)()
  449.                                                             local vanim = "idle"
  450.                                                             coroutine.wrap(function()
  451.                                                                 while runservice.Stepped:wait() do
  452.                                                                     vhum.JumpPower = 0
  453.                                                                     vhum.WalkSpeed = 2
  454.                                                                     if vrootpart.Velocity.x >= 0.1 or vrootpart.Velocity.x <= -0.1 or vrootpart.Velocity.z >= 0.1 or vrootpart.Velocity.z <= -0.1 then
  455.                                                                         if vhum.FloorMaterial == Enum.Material.Air then
  456.                                                                             if vrootpart.Velocity.x >= 15.5 or vrootpart.Velocity.x <= -15.5 or vrootpart.Velocity.z >= 15.5 or vrootpart.Velocity.z <= -15.5 then
  457.                                                                                 if vrootpart.Velocity.y >= 3 then
  458.                                                                                     vanim = "jumprun"
  459.                                                                                     --print("jumping (running)")
  460.                                                                                 elseif vrootpart.Velocity.y <= -3 then
  461.                                                                                     vanim = "fallrun"
  462.                                                                                     --("falling (running)")
  463.                                                                                 end
  464.                                                                             else
  465.                                                                                 if vrootpart.Velocity.y >= 3 then
  466.                                                                                     vanim = "jump"
  467.                                                                                     --print("jumping (walking)")
  468.                                                                                 elseif vrootpart.Velocity.y <= -3 then
  469.                                                                                     vanim = "fall"
  470.                                                                                     --print("falling (walking)")
  471.                                                                                 end
  472.                                                                             end
  473.                                                                         else
  474.                                                                             if vrootpart.Velocity.x >= 15.5 or vrootpart.Velocity.x <= -15.5 or vrootpart.Velocity.z >= 15.5 or vrootpart.Velocity.z <= -15.5 then
  475.                                                                                 vanim = "run"
  476.                                                                                 --print("running")
  477.                                                                             else
  478.                                                                                 vanim = "walk"
  479.                                                                                 --print("walking")
  480.                                                                             end
  481.                                                                         end
  482.                                                                     elseif vrootpart.Velocity.x <= 0.1 or vrootpart.Velocity.x >= -0.1 or vrootpart.Velocity.z <= 0.1 or vrootpart.Velocity.z >= -0.1 then
  483.                                                                         if vhum.FloorMaterial == Enum.Material.Air then
  484.                                                                             if vrootpart.Velocity.y >= 3 then
  485.                                                                                 vanim = "jump"
  486.                                                                                 --print("jumping (standing)")
  487.                                                                             elseif vrootpart.Velocity.y < -3 then
  488.                                                                                 vanim = "fall"
  489.                                                                                 --print("falling (standing)")
  490.                                                                             end
  491.                                                                         else
  492.                                                                             vanim = "idle"
  493.                                                                             --print("standing")
  494.                                                                         end
  495.                                                                     end
  496.                                                                 end
  497.                                                             end)()
  498.                                                             local dyinganim = math.random(1,3)
  499.                                                             local larmrand = math.random(0,80)
  500.                                                             local rarmrand = math.random(0,80)
  501.                                                             local llegrand = math.random(0,30)
  502.                                                             local rlegrand = math.random(0,30)
  503.                                                             coroutine.wrap(function()
  504.                                                                 while vhum.Health > 0.005 do
  505.                                                                     vhum.Health = vhum.Health - 0.005
  506.                                                                     runservice.Stepped:wait()
  507.                                                                 end
  508.                                                                 if dyinganim == 3 then
  509.                                                                     dyinganim = 0
  510.                                                                     for i = 0,1 , 0.02 do
  511.                                                                         vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2.5,0) * CFrame.Angles(-math.pi/2,0,rootpart.RotVelocity.y/50),i)
  512.                                                                         vhead.C0 = vhead.C0:lerp(CFrame.new(0,1.5,0),i)
  513.                                                                         vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(math.pi,0,-math.rad(larmrand)) * CFrame.new(0,-0.5,0),i)
  514.                                                                         vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi,0,math.rad(rarmrand)) * CFrame.new(0,-0.5,0),i)
  515.                                                                         vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,-math.rad(llegrand)) * CFrame.new(0,-1,0),i)
  516.                                                                         vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,math.rad(rlegrand)) * CFrame.new(0,-1,0),i)
  517.                                                                         vhum.WalkSpeed = 0
  518.                                                                         runservice.Stepped:wait()
  519.                                                                     end
  520.                                                                 end
  521.                                                                 vhum.WalkSpeed = 0
  522.                                                                 wait(1)
  523.                                                                 vhum.Parent.Archivable = true
  524.                                                                 vhum.Health = 0
  525.                                                                 local vclone = vhum.Parent:Clone()
  526.                                                                 for q,w in pairs(vhum.Parent:GetDescendants()) do
  527.                                                                     if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  528.                                                                         w:destroy()
  529.                                                                     end
  530.                                                                 end
  531.                                                                 vclone.Parent = workspace
  532.                                                                 for q,w in pairs(vclone:GetDescendants()) do
  533.                                                                     if w.ClassName == "Sound" then
  534.                                                                         w:destroy()
  535.                                                                     end
  536.                                                                 end
  537.                                                             end)()
  538.                                                             coroutine.wrap(function()
  539.                                                                 while runservice.Stepped:wait() do
  540.                                                                     if dyinganim == 1 then
  541.                                                                         if vanim == "idle" then
  542.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2.5,0) * CFrame.Angles(-math.pi/2,0,rootpart.RotVelocity.y/50),0.1)
  543.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1.5,0),0.1)
  544.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(math.pi,0,-math.rad(larmrand)) * CFrame.new(0,-0.5,0),0.1)
  545.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi,0,math.rad(rarmrand)) * CFrame.new(0,-0.5,0),0.1)
  546.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,-math.rad(llegrand)) * CFrame.new(0,-1,0),0.1)
  547.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,math.rad(rlegrand)) * CFrame.new(0,-1,0),0.1)
  548.                                                                         elseif vanim == "walk" then
  549.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2.5,0) * CFrame.Angles(-math.pi/2,0,math.cos(tick()*7)/8),0.1)
  550.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles((math.pi/2)-math.rad(20),0,0) * CFrame.new(0,0.5,0),0.1)
  551.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5+math.sin(tick()*7)/3,0) * CFrame.Angles(math.pi,0,-math.rad(larmrand)+math.cos(tick()*7)/3) * CFrame.new(0,-0.5,0),0.1)
  552.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5-math.sin(tick()*7)/3,0) * CFrame.Angles(math.pi,0,math.rad(rarmrand)-math.cos(tick()*7)/3) * CFrame.new(0,-0.5,0),0.1)
  553.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1-math.sin(tick()*7)/3,0) * CFrame.Angles(0,0,-math.rad(llegrand)) * CFrame.new(0,-1,0),0.1)
  554.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1+math.sin(tick()*7)/3,0) * CFrame.Angles(0,0,math.rad(rlegrand)) * CFrame.new(0,-1,0),0.1)
  555.                                                                         end
  556.                                                                     elseif dyinganim == 2 then
  557.                                                                         if vanim == "idle" then
  558.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2.5,0) * CFrame.Angles(-math.pi/2,0,rootpart.RotVelocity.y/50),0.1)
  559.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1.5,0),0.1)
  560.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(larmrand)/8) * CFrame.new(0,-0.5,0),0.1)
  561.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(rarmrand)/8) * CFrame.new(0,-0.5,0),0.1)
  562.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,-math.rad(llegrand)/2) * CFrame.new(0,-1,0),0.1)
  563.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,math.rad(rlegrand)/2) * CFrame.new(0,-1,0),0.1)
  564.                                                                         elseif vanim == "walk" then
  565.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2.5,0) * CFrame.Angles(-math.pi/2,0,math.cos(tick()*7)/10),0.1)
  566.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,0.5,0),0.1)
  567.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5+math.sin(tick()*7)/5,0) * CFrame.Angles(0,0,-math.rad(larmrand)/8+math.cos(tick()*7)/4) * CFrame.new(0,-0.5,0),0.1)
  568.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5-math.sin(tick()*7)/5,0) * CFrame.Angles(0,0,math.rad(rarmrand)/8-math.cos(tick()*7)/4) * CFrame.new(0,-0.5,0),0.1)
  569.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1-math.sin(tick()*7)/5,0) * CFrame.Angles(0,0,-math.rad(llegrand)/2) * CFrame.new(0,-1,0),0.1)
  570.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1+math.sin(tick()*7)/5,0) * CFrame.Angles(0,0,math.rad(rlegrand)/2) * CFrame.new(0,-1,0),0.1)
  571.                                                                         end
  572.                                                                     elseif dyinganim == 3 then
  573.                                                                         if vanim == "idle" then
  574.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2,0) * CFrame.Angles(-math.pi/2,0,rootpart.RotVelocity.y/50),0.1)
  575.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1.5,0),0.1)
  576.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(math.pi/2+math.rad(40),0,-math.rad(larmrand)/8) * CFrame.new(0,-0.5,0),0.1)
  577.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2+math.rad(40),0,math.rad(rarmrand)/8) * CFrame.new(0,-0.5,0),0.1)
  578.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1,-0.5) * CFrame.Angles(0,0,-math.rad(llegrand)/2) * CFrame.new(0,-1,0),0.1)
  579.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1,-0.5) * CFrame.Angles(0,0,math.rad(rlegrand)/2) * CFrame.new(0,-1,0),0.1)
  580.                                                                         elseif vanim == "walk" then
  581.                                                                             vhumanoidrootpart.C0 = vhumanoidrootpart.C0:lerp(CFrame.new(0,-2,0) * CFrame.Angles(-math.pi/2,0,math.cos(tick()*5)/10),0.1)
  582.                                                                             vhead.C0 = vhead.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,0.5,0),0.1)
  583.                                                                             vleftarm.C0 = vleftarm.C0:lerp(CFrame.new(-1.5,0.5+math.sin(tick()*5)/3,0) * CFrame.Angles(math.pi/2+math.rad(40)+math.sin(tick()*5)/2,0,-math.rad(larmrand)/8+math.cos(tick()*5)/4) * CFrame.new(0,-0.5,0),0.1)
  584.                                                                             vrightarm.C0 = vrightarm.C0:lerp(CFrame.new(1.5,0.5-math.sin(tick()*5)/3,0) * CFrame.Angles(math.pi/2+math.rad(40)-math.sin(tick()*5)/2,0,math.rad(rarmrand)/8-math.cos(tick()*5)/4) * CFrame.new(0,-0.5,0),0.1)
  585.                                                                             vleftleg.C0 = vleftleg.C0:lerp(CFrame.new(-0.5,-1-math.sin(tick()*5)/3,-0.5) * CFrame.Angles(0,0,-math.rad(llegrand)/2) * CFrame.new(0,-1,0),0.1)
  586.                                                                             vrightleg.C0 = vrightleg.C0:lerp(CFrame.new(0.5,-1+math.sin(tick()*5)/3,-0.5) * CFrame.Angles(0,0,math.rad(rlegrand)/2) * CFrame.new(0,-1,0),0.1)
  587.                                                                         end
  588.                                                                     end
  589.                                                                 end
  590.                                                             end)()
  591.                                                         end)()
  592.                                                     end
  593.                                                 end
  594.                                             else
  595.                                                 --print("death")
  596.                                                 hum.Parent.Archivable = true
  597.                                                 hum.PlatformStand = true
  598.                                                 ragdollplr(hum.Parent)
  599.                                                 local vclone = hum.Parent:Clone()
  600.                                                 for q,w in pairs(hum.Parent:GetDescendants()) do
  601.                                                     if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  602.                                                         w:destroy()
  603.                                                     end
  604.                                                 end
  605.                                                 for q,w in pairs(vclone:GetDescendants()) do
  606.                                                     if w.ClassName == "Sound" then
  607.                                                         w:destroy()
  608.                                                     end
  609.                                                     if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" or w.ClassName == "Weld" then
  610.                                                         if w.Name ~= "LimbCollider" and w.Name ~= "LimbWeld" then
  611.                                                             w:destroy()
  612.                                                         end
  613.                                                     end
  614.                                                     if w.ClassName == "Script"  then
  615.                                                         w.Disabled = true
  616.                                                     end
  617.                                                 end
  618.                                                 vclone.Parent = workspace
  619.                                                 vclone:findFirstChildOfClass("Humanoid").Health = 0
  620.                                                 vclone:findFirstChildOfClass("Humanoid").PlatformStand = true
  621.                                                 coroutine.wrap(function()
  622.                                                     wait()
  623.                                                     if vclone:findFirstChild("HumanoidRootPart") then
  624.                                                         vclone:findFirstChild("HumanoidRootPart"):destroy()
  625.                                                     end
  626.                                                 end)()
  627.                                                 game.Debris:AddItem(vclone, 30)
  628.                                             end
  629.                                         end
  630.                                     else
  631.                                         hum.Health = hum.Health - damage
  632.                                         ragdollplr(what.Parent)
  633.                                     end
  634.                                 end
  635.                             else
  636.                                 bullet:Destroy()
  637.                             end
  638.                         end
  639.                     end
  640.                 end)
  641.             end
  642.             coroutine.wrap(function()
  643.                 for i = 1,5 do
  644.                     tiltvalue = tiltvalue + 2.5
  645.                     runservice.Stepped:wait()
  646.                 end
  647.             end)()
  648.             for i = 0,1 , 0.08 do
  649.                 rootpart.CFrame = rootpart.CFrame * CFrame.new(0,0,0.1)
  650.                 weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-1,-0.35) * CFrame.Angles(-math.pi/2,0,0),i)
  651.                 rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.21384871, 0.500000477, -0.879925251, 0.342019856, 0.939692438, -1.49501886e-08, 1.94707184e-07, -2.68220873e-07, -0.999999821, -0.939692438, 0.342020035, -3.76157232e-07) * CFrame.new(0,0.3,0),i)
  652.                 leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.59201181, 0.470158577, -0.794548988, 0.271118939, 0.181368172, 0.945304275, 0.902039766, -0.390578717, -0.18377316, 0.335885108, 0.902526498, -0.269494623) * CFrame.new(0.1,0,0.8),i)
  653.                 rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  654.                 leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  655.                 humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,(-math.pi/2)+math.rad(20),0), i)
  656.                 runservice.Stepped:wait()
  657.             end
  658.             coroutine.wrap(function()
  659.                 for i = 1,5 do
  660.                     tiltvalue = tiltvalue - 2.5
  661.                     runservice.Stepped:wait()
  662.                 end
  663.                 tiltvalue = 0
  664.             end)()
  665.             humanoid.WalkSpeed = 20
  666.             cananimate = true
  667.             canattack = true
  668.         elseif what == "well hello there" and canattack then
  669.             canattack = false
  670.             cananimate = false
  671.             local gottem = false
  672.             for i,v in pairs(workspace:GetDescendants()) do
  673.                 if v.ClassName == "Model" then
  674.                     local vhum = v:findFirstChildOfClass("Humanoid")
  675.                     local vhead = v:findFirstChild("Head")
  676.                     if vhum and vhead then
  677.                         if vhum.Health > 0 then
  678.                             if v:findFirstChild("dying") then
  679.                                 if (vhead.Position - rootpart.Position).magnitude < 12 then
  680.                                     if not gottem then
  681.                                         gottem = true
  682.                                         local uhoh = Instance.new("Sound", character.Head)
  683.                                         uhoh.SoundId = "rbxassetid://4458464514"
  684.                                         uhoh.Volume = 2
  685.                                         uhoh.PlayOnRemove = true
  686.                                         uhoh:destroy()
  687.                                         for i = 0,1 , 0.01 do
  688.                                             weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-1,-0.35) * CFrame.Angles(-math.pi/2,0,0),i)
  689.                                             rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles((math.pi/2)-math.rad(40),0,math.rad(50)) * CFrame.new(0,-0.5,0),i)
  690.                                             leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(30)) * CFrame.new(0,-0.5,0),i)
  691.                                             rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  692.                                             leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  693.                                             humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,(math.pi/2),0), i)
  694.                                             rootpart.CFrame = rootpart.CFrame:lerp(CFrame.new(rootpart.Position, Vector3.new(vhead.Position.x,rootpart.Position.y,vhead.Position.z)) * CFrame.Angles(0,math.rad(-30),0),i)
  695.                                             runservice.Stepped:wait()
  696.                                         end
  697.                                         local light = Instance.new("PointLight", shotgun)
  698.                                         game.Debris:AddItem(light,0.1)
  699.                                         vhum.Health = 0.005
  700.                                         shootsound:Play()
  701.                                         for i = 0,1 , 0.09 do
  702.                                             vhum.WalkSpeed = 0
  703.                                             weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-1,-0.35) * CFrame.Angles(-math.pi/2,0,0),i)
  704.                                             rightarm.C0 = rightarm.C0:lerp(CFrame.new(1,0.7,0.5) * CFrame.Angles((math.pi/2)-math.rad(50),0,math.rad(70)) * CFrame.new(0,-0.5,0),i)
  705.                                             leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(30)) * CFrame.new(0,-0.5,0),i)
  706.                                             rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  707.                                             leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  708.                                             humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(math.rad(5),(math.pi/2)-math.rad(35),0), i)
  709.                                             rootpart.CFrame = rootpart.CFrame * CFrame.new(0,0,0.05)
  710.                                             runservice.Stepped:wait()
  711.                                         end
  712.                                     end
  713.                                 end
  714.                             end
  715.                         end
  716.                     end
  717.                 end
  718.             end
  719.             cananimate = true
  720.             canattack = true
  721.         end
  722.     end
  723. end)
  724. while runservice.Stepped:wait() do
  725.     if cananimate then
  726.         if anim == "run" then
  727.             weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-0.5,-0.25) * CFrame.Angles(-math.pi/2,0,0),0.3)
  728.             humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,math.sin(tick()*24)/15,0) * CFrame.Angles(0,math.rad(-rootpart.Orientation.y),0) * CFrame.fromEulerAnglesXYZ(humanoid.MoveDirection.z/3,0,-humanoid.MoveDirection.x/3) * CFrame.Angles(0,math.rad(rootpart.Orientation.y),0) * CFrame.Angles(0,0,math.cos(tick()*12)/15),0.3)
  729.             leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.3,0,-0.65) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*12)/5+math.rad(50),0,math.rad(30)) * CFrame.new(0,-0.5,0),0.3)
  730.             rightarm.C0 = rightarm.C0:lerp(CFrame.new(1,0.25,-0.5) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*12)/5+math.rad(50),0,math.rad(-50)) * CFrame.new(0,-0.5,0),0.3)
  731.             leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1+math.cos(tick()*12)/4,-math.cos(tick()*12)/2.5) * CFrame.Angles(0,math.rad(-rootpart.Orientation.y),0) * CFrame.fromEulerAnglesXYZ((-math.sin(tick()*12)*humanoid.MoveDirection.z)*1.1,0,(-math.sin(tick()*12)*-humanoid.MoveDirection.x)*1.1) * CFrame.Angles(0,math.rad(rootpart.Orientation.y),0) * CFrame.new(0,-1,0),0.3)
  732.             rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1-math.cos(tick()*12)/4,math.cos(tick()*12)/2.5) * CFrame.Angles(0,math.rad(-rootpart.Orientation.y),0) * CFrame.fromEulerAnglesXYZ((math.sin(tick()*12)*humanoid.MoveDirection.z)*1.1,0,(math.sin(tick()*12)*-humanoid.MoveDirection.x)*1.1) * CFrame.Angles(0,math.rad(rootpart.Orientation.y),0) * CFrame.new(0,-1,0),0.3)
  733.         elseif anim == "idle" then
  734.             weldshotgun.C0 = weldshotgun.C0:lerp(CFrame.new(0,-0.5,-0.25) * CFrame.Angles(-math.pi/2,0,0),0.3)
  735.             humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,math.sin(tick())/20,0) * CFrame.Angles(0,math.rad(20),math.sin(tick()/2)/30),0.3)
  736.             leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.3,0.1,-0.65) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/5+math.rad(70),0,math.rad(30)) * CFrame.new(0,-0.5,0),0.3)
  737.             rightarm.C0 = rightarm.C0:lerp(CFrame.new(1,0.25,-0.5) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/5+math.rad(70),0,math.rad(-50)) * CFrame.new(0,-0.5,0),0.3)
  738.             leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1-math.sin(tick())/20,0) * CFrame.Angles(0,0,math.rad(-3)-math.sin(tick()/2)/30) * CFrame.new(0,-1,0),0.3)
  739.             rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1-math.sin(tick())/20,0) * CFrame.Angles(0,0,math.rad(3)-math.sin(tick()/2)/30) * CFrame.new(0,-1,0),0.3)
  740.         end
  741.     end
  742. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement