Please help make it so this script first checks leaderboard stats to see if you have enough money or more then take that amount and finish the rest of the code (please do not make it so it gives the item i just need it so it checks if player has enough money and takes that amount!)
script.Parent.MouseButton1Click:connect(function() if not game.Players.LocalPlayer.Backpack:FindFirstChild("SpeedCoil") then print("Giving "..game.Players.LocalPlayer.Name.." Item.") Sword = game.Lighting.SpeedCoil:Clone() Sword.Parent = game.Players.LocalPlayer.Backpack elseif game.Players.LocalPlayer:FindFirstChild("SpeedCoil") then print(game.Players.LocalPlayer.Name.." Already received the item.") end end)
Thank you for your time! Please help me out!

3 comments
place your code in a code block pls
Maybe I Can Figure That Out! Mind If I Share You Another Script?
Do not use lighting as storage.