Mryeetmemes

GameStats Scriptz

Dec 9th, 2021
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local Workspace = game:GetService("Workspace")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3.  
  4. local Map = Workspace:WaitForChild("Map")
  5. local Path = Map:WaitForChild("Path")
  6. local Arrows = Map:WaitForChild("Arrows")
  7. local Sounds = Map:WaitForChild("Sounds")
  8. local Configuration = Map:WaitForChild("Configuration")
  9.  
  10. local Self = script.Parent
  11.  
  12. function refresh()
  13.     if Configuration.Health.Value <= 0 then
  14.         Self:WaitForChild("Bar").Size = UDim2.new(0, 0, 1, 0)
  15.         Self:WaitForChild("Label").Text = "0/100"
  16.     else
  17.         Self:WaitForChild("Bar").Size = UDim2.new((Configuration.Health.Value / 100), 0, 1, 0)
  18.         Self:WaitForChild("Label").Text = Configuration.Health.Value.. "/100"
  19.     end
  20. end
  21.  
  22. Configuration.Health.Changed:Connect(function()
  23.     refresh()
  24. end)
  25.  
  26. refresh()
Advertisement
Add Comment
Please, Sign In to add comment