Advertisement
Guest User

Gui Script

a guest
Mar 26th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. -- MainFrame
  2. -- ExpBar
  3. -- ExpBar
  4. -- Animation
  5.  
  6.  
  7.  
  8. local player = game.Players.LocalPlayer
  9. local exp = player:WaitForChild("leaderstats"):WaitForChild("Exp")
  10. local axp = player:WaitForChild("leaderstats"):WaitForChild("ExpNeeded")
  11.  
  12. while true do
  13.     wait()
  14.     local expBarSize = (exp.Value/axp.Value)
  15.     if exp.Value == 0 then
  16.         expBarSize = 0
  17.         script.Parent:TweenSize(UDim2.new(expBarSize, 0, 0, 20), "Out", "Quad", 0.25)
  18.     else
  19.         script.Parent:TweenSize(UDim2.new(expBarSize, 0, 0, 20), "Out", "Quad", 0.25)
  20.     end
  21. end
  22.  
  23.  
  24.  
  25.  
  26.  
  27. -- MainFrame
  28. -- CurrentLevel
  29. -- GetLevel
  30.  
  31. local player = game.Players.LocalPlayer
  32. local level = player:WaitForChild("leaderstats"):WaitForChild("Level")
  33.  
  34. script.Parent.Text = "Level:" .. level.Value
  35.  
  36. level.Changed:Connect(function(value)
  37.     script.Parent.Text = "Level:" .. value
  38. end)
  39.  
  40. -- ExpText
  41.  
  42. local player = game.Players.LocalPlayer
  43. local exp = player:WaitForChild("leaderstats"):WaitForChild("Exp")
  44. local axp = player:WaitForChild("leaderstats"):WaitForChild("ExpNeeded")
  45.  
  46.  
  47. while true do
  48.     wait()
  49.     script.Parent.Text = exp.Value.."/"..axp.Value
  50.    
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement