Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local KeybindsUtil = {}
- KeybindsUtil.Keybinds = {
- Idle = {
- [Enum.KeyCode.R] = "StateChange",
- [Enum.KeyCode.W] = "Run",
- [Enum.KeyCode.Equals] = "EventMenu",
- [Enum.KeyCode.Q] = "Dash",
- [Enum.KeyCode.G] = "Ragdoll",
- [Enum.KeyCode.K] = "Knockout",
- [Enum.KeyCode.One] = "EquipSword",
- },
- Combat = {
- [Enum.KeyCode.R] = "StateChange",
- [Enum.KeyCode.W] = "ChangeStance",
- [Enum.KeyCode.A] = "ChangeStance",
- [Enum.KeyCode.S] = "ChangeStance",
- [Enum.KeyCode.D] = "ChangeStance",
- [Enum.KeyCode.LeftShift] = "Slow",
- [Enum.UserInputType.MouseButton1] = "Combat",
- [Enum.UserInputType.MouseButton2] = "Combat"
- },
- Skills = {
- [Enum.KeyCode.Z] = "ThunderClap"
- }
- }
- function KeybindsUtil:GetAvailableBinds(Player)
- local State = self.DataStore:GetData(Player, "State")
- local UsableBinds = {}
- for AssociatedBinds, BindsTable in pairs(self.Keybinds) do
- local CorrectBinds = AssociatedBinds == State or AssociatedBinds == "Skills"
- if not CorrectBinds then continue end
- UsableBinds[AssociatedBinds] = BindsTable
- end
- return UsableBinds
- end
- return KeybindsUtil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement