Usa éste para ocupar menos espacio. Si puedes simplificar tu script, mejor
addCommandHandler("flip",
function(thePlayer, flip, ammount)
if tonumber(ammount) > tonumber(getElementData(thePlayer,"data.money")) then
outputChatBox("You don't have that kind of money",thePlayer,255,0,0)
elseif ammount > 1000 then
outputChatBox("You can't flip more than 1000$",thePlayer,255,0,0)
end
if math.random ( 2 ) == 1 then givePlayerMoney(thePlayer, tonumber(ammount))
else takePlayerMoney(thePlayer, tonumber(ammount)) end
end)