-- Right click to enable gravity placement (Newt. gravity must be on)
isenabled = false
function crappy_step()
if isenabled == true then
tpt.drawtext(mousex+10, mousey-10, "Click to add gravity", 255, 255, 255, 255)
end
if mouseb == 1 and isenabled then
tpt.set_gravity(math.floor(mousex/4), math.floor(mousey/4), 1, 1, 8)
end
if mouseb == 4 and mousebq == 0 then
if isenabled == true then
isenabled = false
else
isenabled = true
end
end
if isenabled == true and mousex < 612 and mousey < 384 then
return true
else
return false
end
end
tpt.register_step(crappy_step)