Info/setup of button: https://i.postimg.cc/WbFd0zxg/Info.png It's also not displaying if you don't have enough money or if it was purchased etc. It does give you the jumpboost even if you don't have "Coins" for it for some reason?
the code for the button:
player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() if player.Character.Humanoid.JumpPower == 65 then script.Parent.Text "Already Bougth!" if player:FindFirstChild("leaderstats") then if player.leaderstats.Coins.Value == 10 then player.leaderstats.Coins.Value = player.leaderstats.Coins.Value -10 script.Parent.Text = "Purchased" player.Character.Humanoid.JumpPower = 65 elseif player.leaderstats.Coins.Value >= 10 then script.Parent.Text = "Not enough money!" end end end end)
my leaderstats (extra info):
game.Players.PlayerAdded:connect(function(plr) local stats = Instance.new("BoolValue",plr) stats.Name = "leaderstats" local Coins = Instance.new("IntValue",stats) Coins.Name = "Coins" Coins.Value = 0 end)
Ok, first of all. You're not setting the coins value to 10 in the beginning, second of all. Since that script is on the client and client can change anything, do game:GetService("Players").LocalPlayer.
Third, you checked to see if a player's coins are equal to 10,but keep in mind that player's that are more richer can't buy it, simply change it to >=10
And in the bottom, simply change it to <10