Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Click tool That gives money Stats? [closed]

Asked by 6 years ago

I need A tool that gives money on click... or script?

Closed as Not Constructive by Thundermaker300, TheeDeathCaster, and Programical

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago

Here is a script you can insert into a part. When a player touches the part, they will get the leaderstats (Money).



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("Money") --Get money cash.Value = cash.Value +500 --increase amount of money by the number displayed here (500) wait(3) --wait-time before button works again end end ting = 0 --remove debounce end end script.Parent.Touched:connect(onTouched)
Ad