local d=0 function onTouched(x)if d==0 then d=1 check=x.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if check~=nil then local d=game.Players:GetPlayerFromCharacter(x.Parent)local z=d:findFirstChild("\108\101\097\100\101\114\115\116\097\116\115")if z~=nil then local d=z:findFirstChild("\076\097\112\115")d.Value=d.Value+1 wait(.1)end end d=0 end end script.Parent.Touched:connect(onTouched)


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("Laps") --Change Cash To The Money In The Leaderboard
			cash.Value  = cash.Value +1 --increase amount of money by the number displayed here (1)
			wait(0.1) --wait-time before button works again
		end

	end

	ting = 0 --remove debounce
	end

end

script.Parent.Touched:connect(onTouched)
