Pepperpants

Roblox Regen Script

Jun 15th, 2023
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | Gaming | 0 0
  1. -- Create a new model
  2. local model = Instance.new("Model")
  3. model.Name = "RegeneratedModel"
  4. model.Parent = workspace
  5.  
  6. -- Create parts and position them
  7. local part1 = Instance.new("Part")
  8. part1.Name = "Part1"
  9. part1.Size = Vector3.new(2, 2, 2)
  10. part1.Position = Vector3.new(0, 0, 0)
  11. part1.Parent = model
  12.  
  13. local part2 = Instance.new("Part")
  14. part2.Name = "Part2"
  15. part2.Size = Vector3.new(2, 2, 2)
  16. part2.Position = Vector3.new(4, 0, 0)
  17. part2.Parent = model
  18.  
  19. -- Create a new script to make the model move
  20. local script = Instance.new("Script")
  21. script.Parent = model
  22.  
  23. script.Source = [[
  24. local part1 = script.Parent.Part1
  25. local part2 = script.Parent.Part2
  26.  
  27. while true do
  28. part1.Position = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  29. part2.Position = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  30. wait(1)
  31. end
  32. ]]
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment