Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Payout(amount)
- if (DEBUGMODE) then print('Going to payout '..amount[1]..'plat and '..amount[2]..'cc.') end
- wait(200)
- if not(amount[2] == 0) then
- if (itemcount(MONEYIDS[2],getuseroption('ccbp')) % 100 ~= 0) then
- extra = itemcount(MONEYIDS[2],getuseroption('ccbp')) % 100
- if (amount[2] > extra) then
- toPay2 = amount[2] - extra;
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),extra)
- wait(300)
- while itemcount(MONEYIDS[2],getuseroption('tempbp')) > extra do
- moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
- wait(300)
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),extra)
- wait(300)
- end
- moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),extra)
- wait(300)
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),toPay2)
- wait(300)
- while itemcount(MONEYIDS[2],getuseroption('tempbp')) > toPay2 do
- moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
- wait(300)
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),toPay2)
- wait(300)
- end
- moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),toPay2)
- wait(300)
- else
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
- wait(300)
- while itemcount(MONEYIDS[2],getuseroption('tempbp')) > amount[2] do
- moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
- wait(300)
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
- wait(300)
- end
- moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[2])
- wait(300)
- end
- else
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
- wait(300)
- while itemcount(MONEYIDS[2],getuseroption('tempbp')) > amount[2] do
- moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
- wait(300)
- moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
- wait(300)
- end
- moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[2])
- wait(300)
- end
- end
- if not(amount[1] == 0) then
- if (itemcount(MONEYIDS[1],getuseroption('platbp')) % 100 ~= 0) then
- extra = itemcount(MONEYIDS[1],getuseroption('platbp')) % 100
- if (amount[1] > extra) then
- toPay2 = amount[1] - extra;
- moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),extra)
- wait(300)
- moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),extra)
- wait(300)
- moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),toPay2)
- wait(300)
- moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),toPay2)
- wait(300)
- else
- moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),amount[1])
- wait(300)
- moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[1])
- wait(300)
- end
- else
- moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),amount[1])
- wait(300)
- moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[1])
- wait(300)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement