SebTDZ

HF

Jul 18th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.09 KB | None | 0 0
  1. for i,part in pairs(game.Workspace:GetChildren()) do
  2.     if part.ClassName == "Part" then
  3.         part:Remove()
  4.     end
  5. end
  6. function new()
  7.     local NewPart = Instance.new("Part",script)
  8.     NewPart.Material = "ForceField"
  9.     --NewPart.Position = plrH.Position
  10.     NewPart.BrickColor = BrickColor.Random()
  11.     NewPart.Anchored = false
  12.     NewPart.CanCollide = false
  13.     NewPart.Size = Vector3.new(math.random(8,38), math.random(8,38), math.random(8,38))
  14.     NewPart.Name = "We"
  15.    
  16.     local Part = NewPart
  17.     local Body = Instance.new("BodyPosition")
  18.     Body.Parent = Part
  19.     Body.Position = Vector3.new(math.random(-128,128), math.random(-128,128), math.random(-128,128))
  20.     Body.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  21.     Body.ReachedTarget:Connect(function()
  22.         NewPart.Anchored = true
  23.         NewPart.CanCollide = true
  24.     end)
  25.  
  26.     game.Debris:AddItem(NewPart,90)
  27. end
  28. function HF(Plr)
  29.     if game.Players:FindFirstChild(Plr.Name).Character then
  30.         if game.Players:FindFirstChild(Plr.Name).Character:FindFirstChild("HumanoidRootPart") then
  31.             Part = game.Players:FindFirstChild(Plr.Name).Character.HumanoidRootPart
  32.             Part.Anchored = false
  33.             ch = {-1,1}
  34.                
  35.             local Body = Instance.new("BodyPosition",Part)
  36.             Body.Position = game.Players:FindFirstChild(Plr.Name).Character.HumanoidRootPart.Position + Vector3.new(0,10,0)
  37.             Body.MaxForce = Vector3.new(0,math.huge,0)
  38.            
  39.             if Part.Parent:FindFirstChildOfClass("Humanoid") then
  40.                 Part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  41.             end
  42.                
  43.             local Body2 = Instance.new("BodyAngularVelocity",Part)
  44.             Body2.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  45.             Body2.AngularVelocity = Vector3.new(ch[math.random(1,2)], ch[math.random(1,2)], ch[math.random(1,2)])
  46.         end
  47.     end
  48. end
  49. while1 = coroutine.create(function()
  50.     while true do
  51.         for i,p in pairs(game.Players:GetPlayers()) do
  52.             HF(p)
  53.         end
  54.         for i,part in pairs(game.Workspace:GetChildren()) do
  55.             if part.ClassName == "Part" then
  56.                 part:Remove()
  57.             end
  58.         end
  59.         game.Lighting:SetMinutesAfterMidnight(0)
  60.         wait(0.1)
  61.     end
  62. end)
  63.  
  64. coroutine.resume(while1)
  65. while true do
  66.     new()
  67.     wait(1)
  68. end
Add Comment
Please, Sign In to add comment