Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this is my first animation script, pls dont say u made this and ye (made by hampter#2656)
- -- the script is a loadstring so idk why ur viewing the source (this)
- -- hats needed: https://www.roblox.com/catalog/4315489767/Demonic-Greatsword (100 robux)
- -- 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)
- -- hats u can change it to: https://cdn.discordapp.com/attachments/729592441266634884/962875377645154304/unknown.png (click me)
- function noplsmesh(hat)
- _G.OldCF=workspace.Camera.CFrame
- oldchar=game.Players.LocalPlayer.Character
- game.Players.LocalPlayer.Character=workspace[game.Players.LocalPlayer.Name]
- for i,v in next, workspace[game.Players.LocalPlayer.Name][hat]:GetDescendants() do
- if v:IsA('Mesh') or v:IsA('SpecialMesh') then
- v:Remove()
- end
- end
- game.Players.LocalPlayer.Character=oldchar
- workspace.Camera.CFrame=_G.OldCF
- game.Players.LocalPlayer.Character=oldchar
- end
- 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
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- speed = 1
- sine = 1
- srv = game:GetService('RunService')
- reanim = game.Players.LocalPlayer.Character
- function hatset(yes,part,c1,c0,nm)
- reanim[yes].Handle.AccessoryWeld.Part1=reanim[part]
- reanim[yes].Handle.AccessoryWeld.C1=c1 or CFrame.new()
- reanim[yes].Handle.AccessoryWeld.C0=c0 or CFrame.new()
- if nm==true then
- noplsmesh(yes)
- end
- end
- --put the hat script converted here do not put it in loop or it will make ur camera bugged.
- 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)
- RJ = reanim.HumanoidRootPart.RootJoint
- RS = reanim.Torso['Right Shoulder']
- LS = reanim.Torso['Left Shoulder']
- RH = reanim.Torso['Right Hip']
- LH = reanim.Torso['Left Hip']
- Root = reanim.HumanoidRootPart
- NECK = reanim.Torso.Neck
- NECK.C0 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- NECK.C1 = CF(0,-0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RJ.C1 = CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RJ.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- LS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- LH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- LH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- RS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- LS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
- coroutine.wrap(function()
- while true do -- anim changer
- if HumanDied then break end
- sine = sine + speed
- local rlegray = Ray.new(reanim["Right Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
- local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
- local llegray = Ray.new(reanim["Left Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
- local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
- local rightvector = (Root.Velocity * Root.CFrame.rightVector).X + (Root.Velocity * Root.CFrame.rightVector).Z
- local lookvector = (Root.Velocity * Root.CFrame.lookVector).X + (Root.Velocity * Root.CFrame.lookVector).Z
- if lookvector > reanim.Humanoid.WalkSpeed then
- lookvector = reanim.Humanoid.WalkSpeed
- end
- if lookvector < -reanim.Humanoid.WalkSpeed then
- lookvector = -reanim.Humanoid.WalkSpeed
- end
- if rightvector > reanim.Humanoid.WalkSpeed then
- rightvector = reanim.Humanoid.WalkSpeed
- end
- if rightvector < -reanim.Humanoid.WalkSpeed then
- rightvector = -reanim.Humanoid.WalkSpeed
- end
- local lookvel = lookvector / reanim.Humanoid.WalkSpeed
- local rightvel = rightvector / reanim.Humanoid.WalkSpeed
- if Root.Velocity.y > 1 then -- jump
- --jump clerp here
- elseif Root.Velocity.y < -1 then -- fall
- --fall clerp here
- elseif Root.Velocity.Magnitude < 2 then -- idle
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- elseif Root.Velocity.Magnitude < 20 then -- walk
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- elseif Root.Velocity.Magnitude > 20 then -- run
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- srv.RenderStepped:Wait()
- end
- end)()
- --Created using Nexo Animator
Advertisement
Add Comment
Please, Sign In to add comment