What I want to do is to make the script that make player purchase item one time only instead of spamming. How can I do that? Can anyone help me?
local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
local price = 1
local tool = game.Lighting:findFirstChild("Teleport")
function picture()
script.Parent.Parent.Picture.Image = "http://www.roblox.com/asset/?id=51067285"
script.Parent.Parent.Price.Text = "$1"
end
function buy()
wait(0.1)
local money = player.leaderstats.KOs
if money.Value >= price then
local a = tool:clone()
a.Parent = player.Backpack
else
end
end
script.Parent.MouseButton1Down:connect(buy)
script.Parent.MouseEnter:connect(picture)

3 comments
It's doesn't work,what should I do? D:
And yes, this is a normal script.
Oh great, the D in the Debounce Variable was uppercase, I changed it. Should work now. If not, then, either its a server script, else your original script doesn't work.