Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mods = peripheral.wrap "back"
- local owner = "gollark"
- while true do
- local meta = mods.getMetaByName(owner)
- -- We calculate the required motion we need to take
- local mY = meta.motionY
- mY = (mY - 0.138) / 0.8
- -- If it is sufficiently large then we fire ourselves in that direction.
- if mY > 0.5 or mY < 0 then
- local sign = 1
- if mY < 0 then sign = -1 end
- mods.launch(0, 90 * sign, math.min(4, math.abs(mY)))
- end
- sleep()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement