XaskeL

semiletov

Aug 15th, 2019
133
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local player = {
  2.     bank = 500;
  3.     money = 10;
  4.    
  5.     getPlayerMoney = function(self)
  6.         return self.money
  7.     end;
  8.  
  9.     givePlayerMoney = function(self, money)
  10.         self.money = self.money + money
  11.     end;
  12. }
  13.  
  14. print(player:getPlayerMoney()) -- узнать текущие бабки
  15.  
  16. local bank = {
  17.     withdraw = function(self, player, money)
  18.         player.bank = player.bank - money;
  19.         player:givePlayerMoney(money)
  20.     end;
  21. }
  22.  
  23. bank:withdraw(player, 500);
  24.  
  25. print(player:getPlayerMoney()) -- узнать текущие бабки
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×