Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = script.Parent
- local Settings = tool:WaitForChild("Settings")
- local Strength = Settings.Strength
- local Player = game.Players.LocalPlayer
- local PlayerUI = Player:WaitForChild("PlayerGui").PlayerUI
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents")
- local CoinClicked = RemoteEvents.CoinClicked
- local Debounce = false
- tool.Activated:Connect(function()
- if Player.leaderstats.HiddenValues.CurrentValue.Value < Player.leaderstats.Storage.Value then
- if Debounce == false then
- Debounce = true
- CoinClicked:FireServer(Strength.Value)
- wait()
- Debounce = false
- end
- else
- if PlayerUI.StorageFull.Visible == false then
- if Debounce == false then
- Debounce = true
- PlayerUI.StorageFull.Visible = true
- wait(.5)
- Debounce = false
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment