Advertisement
Awooslayer699

Shotgun good edit

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