Advertisement
DrawingJhon

Comrade elmo (Scripting)

Jan 15th, 2021
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. local player = owner
  2. local char = player.Character
  3. local torso = char.HumanoidRootPart
  4. local TweenService = game:GetService("TweenService")
  5. local Create = Instance.new
  6.  
  7. function Tween(obj, sec, data)
  8.     local info = TweenInfo.new(sec)
  9.     local tween = TweenService:Create(obj, info, data)
  10.     tween:Play()
  11.     return tween
  12. end
  13. function PermCollision(objs, collision)
  14.     local conn = game:GetService("RunService").Stepped:Connect(function()
  15.         for i, v in next, objs do
  16.             if v:IsA("BasePart") then
  17.                 v.CanCollide = collision and true or false
  18.             end
  19.         end
  20.     end)
  21.     local ret = {
  22.         SetCollision = function(_, bool)
  23.             collision = bool and true or false
  24.         end;
  25.         Stop = function()
  26.             conn:Disconnect()
  27.         end;
  28.         Connection = conn;
  29.         Objects = objs;
  30.     }
  31.     return ret
  32. end
  33.  
  34. char.Archivable = true
  35. local clones = {}
  36. local lastChar = char:Clone()
  37. for i = 1, 4 do
  38.     local clone = lastChar:Clone()
  39.     clone.Head.face:Destroy()
  40.     torso.Anchored = true
  41.     clone.Humanoid.PlatformStand = true
  42.     clone.Parent = char
  43.     local weld = Create("Weld", clone.Torso)
  44.     weld.Part1 = clone.HumanoidRootPart
  45.     weld.Part0 = torso
  46.     local distances = {5, -5, 10, -10}
  47.     Tween(weld, 1, {C0 = CFrame.new(distances[i], 0, 0)})
  48.     wait(1.5)
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement