Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function sprint()
- --Cant sprint while aiming or jumping
- let unallowedActions = {Whatever.Aim.Is, Enum.Keycode.Space}
- --Filter unallowed actions
- for i, v in pairs(unallowedActions) do:
- if hotkeysStateTable[v] then return end
- end
- hotkeysStateTable[Enum.Keycode.Shift] = True
- hotkeysFunctionTable[Enum.Keycode.Shift]()
- end
- hotkeysFunctionTable = {[Enum.Keycode.Shift] = sprint, [Whatever.Aim.Is] = aimThing}
- hotkeysStateTable = {[Enum.Keycode.Shift] = false, [Whatever.Aim.Is] = false}
- UIS.InputBegan:Connect(function(key, isTyping)
- if isTyping then return end
- --If we have a binding for the key
- if hotkeysFunctionTable[key] then
- hotkeysFunctionTable[key]()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement