Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. -Open_Close
  2. -----------------------
  3. ---สร้างโดย The epic
  4. local StatButton = script.Parent
  5. local Stat = script.Parent.Parent.Stat
  6. local Open = false
  7.  
  8. StatButton.Text.MouseButton1Click:Connect(function()
  9. if Open == false then
  10. Stat.StatText.Visible = true
  11. Open = true
  12. elseif Open == true then
  13. Stat.StatText.Visible = false
  14. Open = false
  15. end
  16. end)
  17. ---สร้างโดย The epic
  18. -----------------------
  19.  
  20. --SetupForPlayer
  21. -----------------------
  22. ---สร้างโดย The epic
  23. game.Players.PlayerAdded:Connect(function(player)
  24. local Folder = Instance.new("Folder",player)
  25. Folder.Name = "Stat"
  26.  
  27. local Beli = Instance.new("IntValue",Folder)
  28. Beli.Name = "Beli"
  29. Beli.Value = 100
  30.  
  31. local Bounty = Instance.new("IntValue",Folder)
  32. Bounty.Name = "Bounty"
  33. Bounty.Value = 0
  34.  
  35. local Strength = Instance.new("IntValue",Folder)
  36. Strength.Name = "Strength"
  37. Strength.Value = 0
  38.  
  39. local Sword = Instance.new("IntValue",Folder)
  40. Sword.Name = "Sword"
  41. Sword.Value = 0
  42.  
  43. local Range = Instance.new("IntValue",Folder)
  44. Range.Name = "Range"
  45. Range.Value = 0
  46.  
  47. local DevilFruit = Instance.new("IntValue",Folder)
  48. DevilFruit.Name = "DevilFruit"
  49. DevilFruit.Value = 0
  50. print("Setup Done")
  51. end)
  52. ---สร้างโดย The epic
  53. ----------------------
  54.  
  55. --ShowStat
  56. ----------------------
  57. ---สร้างโดย The epic
  58. local Player = game.Players.LocalPlayer
  59. local StatText = script.Parent.StatText
  60. script.Parent.StatText.Visible = false
  61. while wait(0.1) do
  62. local beli = Player.Stat.Beli.Value
  63. local bounty = Player.Stat.Bounty.Value
  64. local strength = Player.Stat.Strength.Value
  65. local sword = Player.Stat.Sword.Value
  66. local range = Player.Stat.Range.Value
  67. local devilfruit = Player.Stat.DevilFruit.Value
  68. Player.Stat.Beli.Value = beli + 1
  69. Player.Stat.Bounty.Value = bounty + 1
  70. Player.Stat.Strength.Value = strength + 1
  71. Player.Stat.Sword.Value = sword + 1
  72. Player.Stat.Range.Value = range + 1
  73. Player.Stat.DevilFruit.Value = devilfruit + 1
  74. print("Stat Changed")
  75. StatText.Beli.BeliNum.Text = tostring(beli)
  76. StatText.Bounty.BountyNum.Text = tostring(bounty)
  77. StatText.Strength.StrengthNum.Text = tostring(strength)
  78. StatText.Sword.SwordNum.Text = tostring(sword)
  79. StatText.Range.RangeNum.Text = tostring(range)
  80. StatText.DevilFruit.DevilFruitNum.Text = tostring(devilfruit)
  81. print("Stat Show")
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement