Advertisement
HowToRoblox

ATMClient

Apr 13th, 2022
1,570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. script.Parent.Visible = false
  2.  
  3.  
  4. local re = game.ReplicatedStorage:WaitForChild("ATMRemoteEvent")
  5.  
  6.  
  7. re.OnClientEvent:Connect(function(deposited)
  8.  
  9.     script.Parent.DepositedAmount.Text = "Deposited: $" .. deposited
  10.     script.Parent.CashInput.Text = ""
  11.  
  12.     script.Parent.Visible = true
  13. end)
  14.  
  15.  
  16. script.Parent.CloseButton.MouseButton1Click:Connect(function()
  17.  
  18.     script.Parent.Visible = false
  19. end)
  20.  
  21.  
  22. script.Parent.DepositButton.MouseButton1Click:Connect(function()
  23.  
  24.     re:FireServer(script.Parent.CashInput.Text, "deposit")
  25.    
  26.     script.Parent.Visible = false
  27. end)
  28.  
  29. script.Parent.WithdrawButton.MouseButton1Click:Connect(function()
  30.  
  31.     re:FireServer(script.Parent.CashInput.Text, "withdraw")
  32.    
  33.     script.Parent.Visible = false
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement