The script is a donation script where you can give players in-game currency. The thing is, they have to type in the player's full username which is a hassle. I don't know how to make it so you don't have to type in the player's full username.
Here is the script:
player = game.Players.LocalPlayer
currency = "Money"
recipient = ""
amount = 0
script.Parent.MouseButton1Click:Connect(function()
recipient = script.Parent.Parent.Player.Text
amount = tonumber(script.Parent.Parent.Amount.Text)
if player.leaderstats[currency].Value >= tonumber(script.Parent.Parent.Amount.Text) then
game.Players[recipient].leaderstats[currency].Value = game.Players[recipient].leaderstats[currency].Value + amount
player.leaderstats[currency].Value = player.leaderstats[currency].Value - amount
script.Parent.Text = "Payment Successful!"
wait(1.5)
script.Parent.Text = "Send"
else
script.Parent.Text = "You don't have enough cash to donate!"
wait(2)
script.Parent.Text = "Send"
end
end)
