Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LocalScript for activation of tool (put both of these scripts inside a tool.)
- local Tool = script.Parent
- Tool.Activated:Connect(function()
- if Tool.Parent == game.Players.LocalPlayer.Character then
- script.Parent.GainCurrency:FireServer()
- end
- end)
- -- Script for the tool when server is fired.
- local ClickValue = script.Parent.ClickValue
- script.Parent.GainCurrency.OnServerEvent:Connect(function()
- local Points = game.Players[script.Parent.Parent.Name].leaderstats.Points
- Points.Value = Points.Value + ClickValue.Value
- end)
- -- All you need for the script is: RemoteEvent, LocalScript, Script, Part Called Handle, And an IntValue called ClickValue. (also don't forget about the tool.)
- -- Made by: GaryScripts on Pastebin.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement