Single/multi-key binder for Roblox. Ties actions to one key or multiple keys. Easy input tool for game controls. Saves events in table. Simple, flexible.
Use?
You can bind Keybinds using the name of the key or Enum:
local KeyStrok = require(script:WaitForChild("KeyStrok"))
local EventA = KeyStrok({Enum.KeyCode.W},function()
print("1")
end)
EventA:Disconnect()
local EventA = KeyStrok({"W"},function()
print("1")
end)
You can bind similar structure key combination just like:
local KeyStrok = require(script:WaitForChild("KeyStrok"))
local EventC = KeyStrok({"W"},function()
print("1")
end)
local EventB = KeyStrok({"W","D"},function()
print("2")
end)
local EventC = KeyStrok({"W","D","E"},function()
print("3")
end)
KeyStrok(KeyList,Callback,isHeld)
--[[
put true or anything
if you want it to be detect for holds
]]
Example Usage:
local KeyStrok = require(script:WaitForChild("KeyStrok"))
local A = KeyStrok({"W"},function(IsHeld)
if IsHeld then
print("held")
else
print("not held")
end
end,true)
KeyStrok({"W","D"},function()
warn("combo!")
end)
local A2 = KeyStrok({"W","D"},function(IsHeld)
print("combo held!",IsHeld)
end,true)
Behavior:
If your detecting for W or W+D, on holds, it will return nil on the event it’s released or another Key has been added to the list, so it!
Hi,
For the silly question, is this reading when the player does the combo?
Also is there anyway of adding a feature where it could limit how fast a player could do a combo… do slow down the input of players that use programmable keys that react faster then what a human could do? Thanks
local CoolDown = 5
local ComboEvent do
local LastUsage
ComboEvent = KeyStrok(Combo,function()
if LastUsage and (LastUsage - os.clock() ) <= CoolDown then return end
LastUsage = os.clock()
-- Combo Function Below
end)
-- How to clean:
ComboEvent:Disconnect()
ComboEvent = nil