Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Nick = script.Parent.Nick
- local Price = script.Parent.Price
- local Button = script.Parent.Button
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TransferEvent = ReplicatedStorage.events.TransferMoney
- local Rubles = game.Players.LocalPlayer.leaderstats.Ru
- function TransferingMoney()
- local Money = tonumber(Price.Text)
- if Price.Text == nil then
- Button.Text = "Введите число"
- wait(2)
- Button.Text = "Передать деньги"
- end
- if Rubles.Value < Money then
- Button.Text = "Недостаточно денег"
- wait(2)
- Button.Text = "Передать деньги"
- end
- if Nick.Text == nil then
- Button.Text = "Введите никнейм игрока"
- wait(2)
- Button.Text = "Передать деньги"
- end
- if Rubles.Value >= Money then
- TransferEvent:FireServer(game.Players:FindFirstChild(Nick.Text), Money)
- end
- end
- Button.MouseButton1Click:Connect(TransferingMoney)
Advertisement
Add Comment
Please, Sign In to add comment