Advertisement
DrawingJhon

Control Block

Nov 1st, 2022
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.72 KB | None | 0 0
  1. local function create(part, parent, cf)
  2.     local att0 = Instance.new("Attachment", part)
  3.     local att1 = Instance.new("Attachment", parent)
  4.     local alignPos = Instance.new("AlignPosition", part)
  5.     local alignOr = Instance.new("AlignOrientation", part)
  6.  
  7.     att0.CFrame = cf or CFrame.new()
  8.  
  9.     alignPos.Attachment0 = att0
  10.     alignPos.Attachment1 = att1
  11.     alignPos.MaxForce = 999999999
  12.     alignPos.MaxVelocity = math.huge
  13.     alignPos.ReactionForceEnabled = false
  14.     alignPos.Responsiveness = math.huge
  15.     alignPos.RigidityEnabled = false
  16.  
  17.     alignOr.Attachment0 = att0
  18.     alignOr.Attachment1 = att1
  19.     alignOr.Responsiveness = math.huge
  20.     alignOr.MaxTorque = 999999999
  21. end
  22.  
  23. local player = game:GetService("Players").LocalPlayer
  24. local char = player.Character
  25. char.Archivable = true
  26. local rechar = char:Clone()
  27. rechar.Parent = workspace
  28.  
  29. char.Humanoid:Destroy()
  30.  
  31. local cover = char.Appearance["Black Beanie"].Cover
  32. local mesh = cover:FindFirstChildOfClass("SpecialMesh")
  33. if mesh then mesh:Destroy() end
  34.  
  35. for _, obj in pairs(rechar:GetDescendants()) do
  36.     if obj:IsA("Decal") or obj:IsA("BasePart") then
  37.         obj.Transparency = 1
  38.     end
  39. end
  40.  
  41. cover.CanCollide = false
  42. cover:BreakJoints()
  43. create(cover, rechar.HumanoidRootPart, CFrame.new(0, 2, 0))
  44.  
  45. player.Character = rechar
  46. workspace.CurrentCamera.CameraSubject = rechar.Humanoid
  47.  
  48. local netless = game:GetService("RunService").Heartbeat:Connect(function()
  49.     cover.AssemblyLinearVelocity = Vector3.new(-30, 0, 0)
  50.     sethiddenproperty(player,"MaximumSimulationRadius",math.huge)
  51.     sethiddenproperty(player,"SimulationRadius",999999999)
  52. end)
  53.  
  54. rechar.Humanoid.Died:Connect(function()
  55.     player.Character = char
  56.     char:BreakJoints()
  57.     netless:Disconnect()
  58. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement