Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- stickyKeys.lua v 1.1
- by
- MarioChallengerX2
- --your hands are like glue to npcs!
- --]]
- local SK = {}
- SK.stickymovementstate = true
- SK.holdingtable = {}
- SK.holdingtable[45] = true
- SK.holdingtable[31] = true
- function SK.onInitAPI()
- registerEvent(SK, "onTick")
- registerEvent(SK, "onStart")
- end
- function SK.onTick()
- for k, p in ipairs(Player.get()) do
- local stickyitem = p.holdingNPC ~= nil and p.holdingNPC.isValid and SK.holdingtable[player.holdingNPC.id]
- if SK.stickymovementstate == true then --this option does not auto hold run button for you.
- if stickyitem then
- player:mem(0x62, FIELD_WORD, 10)
- end
- end
- if SK.stickymovementstate == false then --this option will always have the run button held for you
- if stickyitem then
- player.keys.run = KEYS_DOWN
- end
- end
- end
- end
- return SK
Advertisement
Add Comment
Please, Sign In to add comment