Well I got The Script but I dont know how to convert it into a gui. How will i be able to do that?
Here is the script
--Basically checks if the toucher of the button is a player, then adds money to that player.
local ting = 0 --debouncer
function onTouched(hit)
if ting == 0 then --debounce check
ting = 1 --activate debounce
check = hit.Parent:FindFirstChild("Humanoid") --Find the human that touched the button
if check ~= nil then --If a human is found, then
local user = game.Players:GetPlayerFromCharacter(hit.Parent) --get player from touching human
local stats = user:findFirstChild("leaderstats") --Find moneyholder
if stats ~= nil then --If moneyholder exists then
local cash = stats:findFirstChild("Cookie") --Get Cookie
cash.Value = cash.Value +5 --increase amount of money by the number displayed here (500)
wait(0) --wait-time before button works again
end
end
ting = 0 --remove debounce
end
end
script.Parent.Touched:connect(onTouched)

2 comments
So D oI insert into text button or leave it out in gui?
Into the TextButton