Inoob8C

why are u viewing this

Apr 10th, 2022
6,632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.79 KB | None | 0 0
  1. -- this is my first animation script, pls dont say u made this and ye (made by hampter#2656)
  2. -- the script is a loadstring so idk why ur viewing the source (this)
  3.  
  4. -- hats needed: https://www.roblox.com/catalog/4315489767/Demonic-Greatsword (100 robux)
  5. -- btw u can change the hat in the script (it needs to be a greatsword, it can be a different color but dont change it to a different sword)
  6. -- hats u can change it to: https://cdn.discordapp.com/attachments/729592441266634884/962875377645154304/unknown.png (click me)
  7.  
  8. function noplsmesh(hat)
  9. _G.OldCF=workspace.Camera.CFrame
  10. oldchar=game.Players.LocalPlayer.Character
  11. game.Players.LocalPlayer.Character=workspace[game.Players.LocalPlayer.Name]
  12. for i,v in next, workspace[game.Players.LocalPlayer.Name][hat]:GetDescendants() do
  13. if v:IsA('Mesh') or v:IsA('SpecialMesh') then
  14. v:Remove()
  15. end
  16. end
  17. game.Players.LocalPlayer.Character=oldchar
  18. workspace.Camera.CFrame=_G.OldCF
  19. game.Players.LocalPlayer.Character=oldchar
  20. end
  21. HumanDied = false for i,v in next, game:GetService("Players").LocalPlayer.Character:GetDescendants() do if v:IsA("BasePart") and v.Name ~= 'Torso' and v.Name ~= 'Head' then _G.netless=game:GetService("RunService").Heartbeat:connect(function() v.AssemblyLinearVelocity = Vector3.new(-30,0,0) sethiddenproperty(game.Players.LocalPlayer,"MaximumSimulationRadius",math.huge) sethiddenproperty(game.Players.LocalPlayer,"SimulationRadius",999999999) end) end end local plr = game.Players.LocalPlayer local char = plr.Character local srv = game:GetService('RunService') local ct = {} char.Archivable = true local reanim = char:Clone() reanim.Name = 'Nexo '..plr.Name..'' fl=Instance.new('Folder',char) fl.Name ='Nexo' reanim.Animate.Disabled=true char.HumanoidRootPart:Destroy() char.Humanoid:ChangeState(16) for i,v in next, char.Humanoid:GetPlayingAnimationTracks() do v:Stop() end char.Animate:Remove() function create(part, parent, p, r) Instance.new("Attachment",part) Instance.new("AlignPosition",part) Instance.new("AlignOrientation",part) Instance.new("Attachment",parent) part.Attachment.Name = part.Name parent.Attachment.Name = part.Name part.AlignPosition.Attachment0 = part[part.Name] part.AlignOrientation.Attachment0 = part[part.Name] part.AlignPosition.Attachment1 = parent[part.Name] part.AlignOrientation.Attachment1 = parent[part.Name] parent[part.Name].Position = p or Vector3.new() part[part.Name].Orientation = r or Vector3.new() part.AlignPosition.MaxForce = 999999999 part.AlignPosition.MaxVelocity = math.huge part.AlignPosition.ReactionForceEnabled = false part.AlignPosition.Responsiveness = math.huge part.AlignOrientation.Responsiveness = math.huge part.AlignPosition.RigidityEnabled = false part.AlignOrientation.MaxTorque = 999999999 end for i,v in next, char:GetDescendants() do if v:IsA('Accessory') then v.Handle:BreakJoints() create(v.Handle,reanim[v.Name].Handle) end end char.Torso['Left Shoulder']:Destroy() char.Torso['Right Shoulder']:Destroy() char.Torso['Left Hip']:Destroy() char.Torso['Right Hip']:Destroy() create(char['Torso'],reanim['Torso']) create(char['Left Arm'],reanim['Left Arm']) create(char['Right Arm'],reanim['Right Arm']) create(char['Left Leg'],reanim['Left Leg']) create(char['Right Leg'],reanim['Right Leg']) for i,v in next, reanim:GetDescendants() do if v:IsA('BasePart') or v:IsA('Decal') then v.Transparency = 1 end end reanim.Parent = fl table.insert(ct,srv.Heartbeat:Connect(function() char.Torso.CFrame=reanim.Torso.CFrame char.Torso.Velocity=Vector3.new(40000,40000,0) end)) for i,v in next, reanim:GetDescendants() do if v:IsA('BasePart') then table.insert(ct,srv.RenderStepped:Connect(function() v.CanCollide = false end)) end end for i,v in next, char:GetDescendants() do if v:IsA('BasePart') then table.insert(ct,srv.RenderStepped:Connect(function() v.CanCollide = false end)) end end for i,v in next, reanim:GetDescendants() do if v:IsA('BasePart') then table.insert(ct,srv.Stepped:Connect(function() v.CanCollide = false end)) end end for i,v in next, char:GetDescendants() do if v:IsA('BasePart') then table.insert(ct,srv.Stepped:Connect(function() v.CanCollide = false end)) end end table.insert(ct,reanim.Humanoid.Died:Connect(function() plr.Character = char char:BreakJoints() reanim:Destroy() game.Players:Chat('-gr') _G.netless:Disconnect() HumanDied = true for _,v in pairs(ct) do v:Disconnect() end end)) plr.Character = reanim workspace.CurrentCamera.CameraSubject = reanim.Humanoid
  22.  
  23. IT = Instance.new
  24. CF = CFrame.new
  25. VT = Vector3.new
  26. RAD = math.rad
  27. C3 = Color3.new
  28. UD2 = UDim2.new
  29. BRICKC = BrickColor.new
  30. ANGLES = CFrame.Angles
  31. EULER = CFrame.fromEulerAnglesXYZ
  32. COS = math.cos
  33. ACOS = math.acos
  34. SIN = math.sin
  35. ASIN = math.asin
  36. ABS = math.abs
  37. MRANDOM = math.random
  38. FLOOR = math.floor
  39.  
  40. speed = 1
  41. sine = 1
  42. srv = game:GetService('RunService')
  43.  
  44. reanim = game.Players.LocalPlayer.Character
  45.  
  46. function hatset(yes,part,c1,c0,nm)
  47. reanim[yes].Handle.AccessoryWeld.Part1=reanim[part]
  48. reanim[yes].Handle.AccessoryWeld.C1=c1 or CFrame.new()
  49. reanim[yes].Handle.AccessoryWeld.C0=c0 or CFrame.new()
  50. if nm==true then
  51. noplsmesh(yes)
  52. end
  53. end
  54.  
  55. --put the hat script converted here do not put it in loop or it will make ur camera bugged.
  56. hatset('MeshPartAccessory','Torso',CFrame.new(),reanim['MeshPartAccessory'].Handle.AccessoryWeld.C0:Lerp(CF(0+0*math.cos(sine/13),1+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),1),true)
  57. RJ = reanim.HumanoidRootPart.RootJoint
  58. RS = reanim.Torso['Right Shoulder']
  59. LS = reanim.Torso['Left Shoulder']
  60. RH = reanim.Torso['Right Hip']
  61. LH = reanim.Torso['Left Hip']
  62. Root = reanim.HumanoidRootPart
  63. NECK = reanim.Torso.Neck
  64. NECK.C0 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  65. NECK.C1 = CF(0,-0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  66. RJ.C1 = CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  67. RJ.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  68. RS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  69. LS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  70. RH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  71. LH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  72. RH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  73. LH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  74. RS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  75. LS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  76.  
  77. coroutine.wrap(function()
  78. while true do -- anim changer
  79. if HumanDied then break end
  80. sine = sine + speed
  81. local rlegray = Ray.new(reanim["Right Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  82. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  83. local llegray = Ray.new(reanim["Left Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  84. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  85. local rightvector = (Root.Velocity * Root.CFrame.rightVector).X + (Root.Velocity * Root.CFrame.rightVector).Z
  86. local lookvector = (Root.Velocity * Root.CFrame.lookVector).X + (Root.Velocity * Root.CFrame.lookVector).Z
  87. if lookvector > reanim.Humanoid.WalkSpeed then
  88. lookvector = reanim.Humanoid.WalkSpeed
  89. end
  90. if lookvector < -reanim.Humanoid.WalkSpeed then
  91. lookvector = -reanim.Humanoid.WalkSpeed
  92. end
  93. if rightvector > reanim.Humanoid.WalkSpeed then
  94. rightvector = reanim.Humanoid.WalkSpeed
  95. end
  96. if rightvector < -reanim.Humanoid.WalkSpeed then
  97. rightvector = -reanim.Humanoid.WalkSpeed
  98. end
  99. local lookvel = lookvector / reanim.Humanoid.WalkSpeed
  100. local rightvel = rightvector / reanim.Humanoid.WalkSpeed
  101. if Root.Velocity.y > 1 then -- jump
  102. --jump clerp here
  103. elseif Root.Velocity.y < -1 then -- fall
  104. --fall clerp here
  105. elseif Root.Velocity.Magnitude < 2 then -- idle
  106. reanim['MeshPartAccessory'].Handle.AccessoryWeld.C0 = reanim['MeshPartAccessory'].Handle.AccessoryWeld.C0:Lerp(CF(0+0*math.cos(sine/13),1+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.sin(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  107. NECK.C0 = NECK.C0:Lerp(CF(0+0*math.cos(sine/13),1+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  108. RJ.C0 = RJ.C0:Lerp(CF(0+0*math.cos(sine/13),1+0.03*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  109. RS.C0 = RS.C0:Lerp(CF(2.5+0*math.cos(sine/13),0.5+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+2*math.cos(sine/13))),.3)
  110. LS.C0 = LS.C0:Lerp(CF(-2.5+0*math.cos(sine/13),0.5+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+-2*math.cos(sine/13))),.3)
  111. RH.C0 = RH.C0:Lerp(CF(1.5+0*math.cos(sine/13),-3+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+3*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  112. LH.C0 = LH.C0:Lerp(CF(-1.5+0*math.cos(sine/13),-3+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+2*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  113. elseif Root.Velocity.Magnitude < 20 then -- walk
  114. NECK.C0 = NECK.C0:Lerp(CF(0+0*math.cos(sine/13),1+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  115. RJ.C0 = RJ.C0:Lerp(CF(0+0*math.cos(sine/13),1+0.02*math.cos(sine/13),0+0.02*math.cos(sine/13))*ANGLES(RAD(0+1*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  116. RS.C0 = RS.C0:Lerp(CF(2.5+0*math.cos(sine/-7),0.5+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(10+47*math.cos(sine/-7)),RAD(6+0*math.cos(sine/-7)),RAD(8+2*math.cos(sine/-7))),.3)
  117. LS.C0 = LS.C0:Lerp(CF(-2.5+0*math.cos(sine/-7),0.5+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(10+-47*math.cos(sine/-7)),RAD(-6+0*math.cos(sine/-7)),RAD(-8+-2*math.cos(sine/-7))),.3)
  118. RH.C0 = RH.C0:Lerp(CF(1.5+0*math.cos(sine/-7),-3+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(0+-47*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7))),.3)
  119. LH.C0 = LH.C0:Lerp(CF(-1.5+0*math.cos(sine/-7),-3+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(0+47*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7))),.3)
  120. elseif Root.Velocity.Magnitude > 20 then -- run
  121. NECK.C0 = NECK.C0:Lerp(CF(0+0*math.cos(sine/13),1+0*math.cos(sine/13),0+0*math.cos(sine/13))*ANGLES(RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  122. RJ.C0 = RJ.C0:Lerp(CF(0+0*math.cos(sine/13),1+0.02*math.cos(sine/13),0+0.02*math.cos(sine/13))*ANGLES(RAD(0+1*math.cos(sine/13)),RAD(0+0*math.cos(sine/13)),RAD(0+0*math.cos(sine/13))),.3)
  123. RS.C0 = RS.C0:Lerp(CF(2.5+0*math.cos(sine/-7),0.5+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(10+47*math.cos(sine/-7)),RAD(6+0*math.cos(sine/-7)),RAD(8+2*math.cos(sine/-7))),.3)
  124. LS.C0 = LS.C0:Lerp(CF(-2.5+0*math.cos(sine/-7),0.5+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(10+-47*math.cos(sine/-7)),RAD(-6+0*math.cos(sine/-7)),RAD(-8+-2*math.cos(sine/-7))),.3)
  125. RH.C0 = RH.C0:Lerp(CF(1.5+0*math.cos(sine/-7),-3+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(0+-47*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7))),.3)
  126. LH.C0 = LH.C0:Lerp(CF(-1.5+0*math.cos(sine/-7),-3+0*math.cos(sine/-7),0+0*math.cos(sine/-7))*ANGLES(RAD(0+47*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7)),RAD(0+0*math.cos(sine/-7))),.3)
  127. end
  128. srv.RenderStepped:Wait()
  129. end
  130. end)()
  131. --Created using Nexo Animator
Advertisement
Add Comment
Please, Sign In to add comment