Sure.
function Buy1 ()
local money = getPlayerMoney(source)
if (money > 5000) then
takePlayerMoney(source,5000)
local vehicleModel = 602
local x,y,z = getElementPosition(source)
y = y + 10
z = z + 5
local veh = createVehicle(tonumber(vehicleModel),x,y,z)
setElementData(veh, "owner", getPlayerName(source))
else
outputChatBox ( "You need more cash bro..", source, 255, 255, 255, true )
end
end
addEvent("Car1",true)
addEventHandler( "Car1", getRootElement(), Buy1 )