Advertisement
DrawingJhon

Worm Script (Testing)

Aug 14th, 2022 (edited)
1,005
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.43 KB | None | 0 0
  1. HumanDied = false for i,v in next, game:GetService("Players").LocalPlayer.Character:GetDescendants() do if v:IsA("BasePart") 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  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
  2.  
  3. local uis = game:GetService("UserInputService")
  4. local player = game:GetService("Players").LocalPlayer
  5. local char = player.Character
  6. local root = char.HumanoidRootPart
  7.  
  8. local lastPos = root.Position
  9.  
  10. local function Align(part0, part1, cf0, cf1)
  11.     cf0 = cf0 or CFrame.new()
  12.     cf1 = cf1 or CFrame.new()
  13.     local att0 = Instance.new("Attachment", part0)
  14.     att0.CFrame = cf0
  15.     local att1 = Instance.new("Attachment", part1)
  16.     att1.CFrame = cf1
  17.     local AlignPos = Instance.new("AlignPosition", part0)
  18.     AlignPos.Parent.CanCollide = false
  19.     AlignPos.ApplyAtCenterOfMass = true
  20.     AlignPos.MaxForce = 67752
  21.     AlignPos.MaxVelocity = math.huge/9e110
  22.     AlignPos.ReactionForceEnabled = false
  23.     AlignPos.Responsiveness = 200
  24.     AlignPos.RigidityEnabled = false
  25.     AlignPos.Attachment0 = att0
  26.     AlignPos.Attachment1 = att1
  27.     local AO = Instance.new("AlignOrientation", part0)
  28.     AO.Attachment0 = att0
  29.     AO.Attachment1 = att1
  30.     AO.ReactionTorqueEnabled = false
  31.     AO.PrimaryAxisOnly = false
  32.     AO.MaxTorque = 9999999
  33.     AO.MaxAngularVelocity = math.huge
  34.     AO.Responsiveness = 200
  35.     part0.CanCollide = false
  36.     part0:BreakJoints()
  37.     return setmetatable({}, {
  38.         __index = function(self, index)
  39.             if index == "C0" then
  40.                 return att0.CFrame * cf0:Inverse()
  41.             end
  42.             if index == "C1" then
  43.                 return att1.CFrame * cf1:Inverse()
  44.             end
  45.         end,
  46.         __newindex = function(self, key, value)
  47.             if key == "C0" then
  48.                 att0.CFrame = cf0 * value
  49.             end
  50.             if key == "C1" then
  51.                 att1.CFrame = cf1 * value
  52.             end
  53.         end,
  54.     })
  55. end
  56.  
  57. char:PivotTo(char:GetPivot() * CFrame.new(0, -20, 0))
  58. root.Anchored = true
  59.  
  60. wait()
  61.  
  62. local model = Instance.new("Model", workspace)
  63. local torso = Instance.new("Part", model)
  64. torso.Name = "HumanoidRootPart"
  65. torso.Size = Vector3.new(2, 2, 1)
  66. torso.Position = lastPos + Vector3.new(0, 3, 0)
  67. torso.CanCollide = false
  68. torso.Transparency =  0.9
  69. local hum = Instance.new("Humanoid", model)
  70. hum.HipHeight = 2
  71. hum.AutoJumpEnabled = false
  72. player.Character = model
  73. workspace.CurrentCamera.CameraSubject = hum
  74.  
  75. local arm1 = Align(char["Left Arm"], torso, nil, CFrame.new(0, -2.5, 0) * CFrame.Angles(math.rad(90), 0, 0))
  76. local arm2 = Align(char["Right Arm"], char["Left Arm"], nil, CFrame.new(0, 2, 0))
  77. local arm3 = Align(char["Left Leg"], char["Right Arm"], nil, CFrame.new(0, 2, 0))
  78. local arm4 = Align(char["Right Leg"], char["Left Leg"], nil, CFrame.new(0, 2, 0))
  79.  
  80. repeat wait() until not char:IsDescendantOf(workspace)
  81. model:Destroy()
  82.  
  83. while true do
  84.     if not char:IsDescendantOf(workspace) then
  85.         model:Destroy()
  86.         break
  87.     end
  88.     torso.CanCollide = false
  89. end
  90.  
  91. --[[while true do
  92.     if not char:IsDescendantOf(workspace) then
  93.         model:Destroy()
  94.         break
  95.     end
  96.    
  97.     local rad = math.sin(tick()) * math.rad(90)
  98.    
  99.     arm2.C1 = CFrame.new(math.sin(tick()) * 2, math.min(math.cos(tick()), 0) * 0.5, 0) * CFrame.Angles(0, 0, rad)
  100.     game:GetService("RunService").Heartbeat:Wait()
  101. end
  102. ]]
  103.  
  104. --[[local hb; hb = game:GetService("RunService").Heartbeat:Connect(function()
  105.     if not char.Parent then hb:Disconnect() model:Destroy() return end
  106.     local point = torso.CFrame * CFrame.Angles(math.rad(90), 0, 0)
  107.     arm1.CFrame = point
  108.     arm2.CFrame = point * CFrame.new(0,2,0)
  109.     arm3.CFrame = point * CFrame.new(0,4,0)
  110.     arm4.CFrame = point * CFrame.new(0,6,0)
  111. end)]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement