loadstring(game:HttpGet(('https://raw.githubusercontent.com/ToonX056Script/main/gofishing)))() #4561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
-- Service to handle players
local Players = game:GetService("Players")
-- Function to add money to a player
local function addMoney(player, amount)
-- Check if the player has a leaderstats folder
local leaderstats = player:FindFirstChild("leaderstats")
if leaderstats then
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value = money.Value + amount
end
end
end
-- Create a leaderstats folder when a player joins Players.PlayerAdded:Connect(function(player)
-- Create leaderstats folder
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
end)
-- Example: Adding a button to give money
local button = Instance.new("TextButton")
button.Text = "Add Money"
button.Size = UDim2.new(0, 200, 0, 50)
button.Position = UDim2.new(0.5, -100, 0.5, -25)
button.Parent = game.StarterGui.ScreenGui
-- Add money when the button is clicked
button.MouseButton1Click:Connect(function()
local player = Players.LocalPlayer
if player then
addMoney(player, 100) -- Add 100 money
end
end)
Reasons for making this change:
TODO
Links to documentation supporting these rule changes:
TODO
If this is a new template: