-- 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
-- Create a Money value
local money = Instance.new("IntValue")
money.Name = "Money"
money.Value = 0 -- Initial money
money.Parent = leaderstats
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)
Move language is used for MoveVM based blockchains as the language
native to them. The compiler provides a folder build/ that holds
the build artifacts.
The .aptos/ folder is ignored so people do not upload their private
keys to a git repository.
`Directory.Build.rsp` is a [documented file][1] that allows setting default arguments to command line builds. However, our .gitignore template ignores _all_ `*.rsp` files. which causes confusion:
1. Devs write an .rsp file and if they aren't being attentive forget to commit it
2. Adding it to git requires `git add --force`, which some devs mistake for a destructive or not-recommended action
Thus, explicitly allow the `Directory.Build.rsp` file.
[1]: https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-response-files?view=vs-2022#directorybuildrsp