Advertisement
Guest User

Untitled

a guest
Oct 19th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.93 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. gui = script.Parent
  3.  
  4. player:WaitForChild("personalstats")
  5.  
  6. playing = player:FindFirstChild("Isplaying")
  7. menu = false
  8. clicked = false
  9.  
  10. stat = player:FindFirstChild("leaderstats")
  11. points = stat:FindFirstChild("Points")
  12. otherstat = player:FindFirstChild("localstats")
  13. level = otherstat:FindFirstChild("Level")
  14. xp = otherstat:FindFirstChild("Xp")
  15.  
  16. localstat = player:FindFirstChild("personalstats")
  17. played = localstat:FindFirstChild("Games played")
  18. lost = localstat:FindFirstChild("Games lost")
  19.  
  20. gui.Frame.TextButton.MouseButton1Down:connect(function()
  21.     if menu == false then
  22.         menu = true
  23.         gui.Frame.TextButton.Text = "CLOSE STATS & OPTIONS"
  24.         gui.OptFrame:TweenPosition(UDim2.new(0.5, -210, 0.5, -85), "Out", "Sine", 1, true)
  25.     elseif menu == true then
  26.         menu = false
  27.         gui.Frame.TextButton.Text = "OPEN STATS & OPTIONS"
  28.         gui.OptFrame:TweenPosition(UDim2.new(0, -420, 0.5, -85), "Out", "Sine", 1, true)
  29.     end
  30. end)
  31.  
  32. gui:WaitForChild("OptFrame")
  33. gui.OptFrame.PlayLabel.TextButton.MouseButton1Down:connect(function()
  34.     if playing.Value == true then
  35.         clicked = false
  36.     elseif playing.Value == false then
  37.         clicked = true
  38.     end
  39.     if clicked == false then
  40.         clicked = true
  41.         playing.Value = false
  42.     elseif clicked == true then
  43.         clicked = false
  44.         playing.Value = true
  45.     end
  46. end)
  47.  
  48. while wait() do
  49.     gui.Frame.PointsLabel.Text = points.Value .. " Points"
  50.     gui.Frame.LevelLabel.Text = "Level " .. level.Value .. " (" .. xp.Value .. "/" .. (level.Value * 125) .. " Xp)"
  51.    
  52.     gui.OptFrame.PlayedLabel.TextButton.Text = played.Value
  53.     gui.OptFrame.LostLabel.TextButton.Text = lost.Value
  54.    
  55.     if playing.Value == true then
  56.         gui.OptFrame.PlayLabel.TextButton.Text = "Yes"
  57.         gui.OptFrame.PlayLabel.TextButton.BackgroundColor3 = Color3.new(0/255, 255/255, 0/255)
  58.     else
  59.         gui.OptFrame.PlayLabel.TextButton.Text = "No"
  60.         gui.OptFrame.PlayLabel.TextButton.BackgroundColor3 = Color3.new(255/255, 0/255, 0/255)
  61.     end
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement