Advertisement
bobopopcornboy

Uranium

Sep 3rd, 2024 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.26 KB | None | 0 0
  1. Uranium = Instance.new("Part")
  2. Uranium.Material = "Neon"
  3. Uranium.Parent = Workspace
  4. Uranium.BrickColor = BrickColor.new(0,1,0)
  5. Uranium.Position = owner.Character.HumanoidRootPart.Position
  6. Sr = Instance.new("Part")
  7. Sr.Parent = Uranium
  8. Sr.Size = Vector3.new(10,10,10)
  9. Sr.Transparency = 1
  10. Sr.CanCollide = false
  11. Sr.CanTouch = true
  12. Sr.Position = Uranium.Position
  13. Weld = Instance.new("WeldConstraint",Uranium)
  14. Weld.Part0 = Sr
  15. Weld.Part1 = Uranium
  16. maxdis = 50
  17. Sound = Instance.new("Sound",Uranium)
  18. Sound.Looped = true
  19. Sound.SoundId = "rbxassetid://8009580020"
  20. Sound.EmitterSize = 5
  21. Sound.Looped = true
  22.  
  23. function uraniumTick()
  24.     Sr.Size = Uranium.Size * 10
  25.     local Parts = Sr:GetTouchingParts()
  26.     local Players = {}
  27.     local connection = Sr.Touched:Connect(function() end)
  28.     for i=1, #Parts do
  29.         if Parts[i].Parent:FindFirstChild("Humanoid") then
  30.             Players[#Players+1] = Parts[i].Parent
  31.         end
  32.     end
  33.     Sound.Playing = (#Players ~= 0)
  34.     for i=1, #Players do
  35.         local distance = Uranium.Position - Players[i].HumanoidRootPart.Position
  36.         distance = distance.X + distance.Y + distance.Z
  37.         distance = 0 - math.abs(distance)
  38.         distance = distance + 10
  39.         distance = distance * 0.6
  40.         Players[i].Humanoid.Health -= distance
  41.     end
  42. end
  43.  
  44. while wait(0.2) do
  45.     uraniumTick()
  46. end
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement