mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Scratch making the framework/engine open source for now until i figure out a better file structure that will work with Rojo
34 lines
666 B
Lua
34 lines
666 B
Lua
local Binds = {}
|
|
Binds.__index = Binds
|
|
|
|
local BindsMap = {
|
|
Keys = {}
|
|
}
|
|
BindsMap.__index = BindsMap
|
|
|
|
local UIS = game:GetService("UserInputService")
|
|
|
|
function Binds.constructor() --Allow multiple bindings of the same keys, no overwrites
|
|
return setmetatable({}, BindsMap)
|
|
end
|
|
|
|
function BindsMap.new()
|
|
local InputBegan = UIS.InputBegan:Connect(function(input, gameProcessedEvent)
|
|
if not gameProcessedEvent then
|
|
|
|
end
|
|
end)
|
|
|
|
local InputEnded = UIS.InputEnded:Connect(function(input, gameProcessedEvent)
|
|
if not gameProcessedEvent then
|
|
|
|
end
|
|
end)
|
|
|
|
return setmetatable({
|
|
InputBegan = InputBegan,
|
|
InputEnded = InputEnded
|
|
}, BindsMap)
|
|
end
|
|
|
|
return Binds |