-- Sodaghost13
I defined the last two variables last which is why it looks messy :|
I know this is something to do with removing the amount Value and something to do with objects, how else would I take money from one player to donate to the other?
local frame = script.Parent
local imputname = frame:WaitForChild("ImputName")
local imputamount = frame:WaitForChild("ImputAmount")
local confirm = frame:WaitForChild("Confirm")
local playername = imputname:WaitForChild("PlayerName")
local amount = imputamount:WaitForChild("Amount")
confirm.MouseButton1Down:connect(function()
playername.Value = imputname.Text
amount.Value = imputamount.Text
game.Players.LocalPlayer.leaderstats.Money = game.Players.LocalPlayer.leaderstats.Money - amount.Value
game.Players[playername.Value].leaderstats.Money.Value = game.Players[playername.Value].leaderstats.Money.Value + amount.Value
end)
