local O={}local z=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")function O.IsDown(s,O)return z:IsKeyDown(O)end function O.AreAllDown(O,...)for O,s in pairs({...})do if not z:IsKeyDown(s)then return false end end return true end function O.AreAnyDown(O,...)for O,s in pairs({...})do if z:IsKeyDown(s)then return true end end return false end function O.Start(O) end function O.Init(O)O.KeyDown=O.Shared.Event.new()O.KeyUp=O.Shared.Event.new()z.InputBegan:Connect(function(z,s)if s then return end if z.UserInputType==Enum.UserInputType.Keyboard then O.KeyDown:Fire(z.KeyCode)end end)z.InputEnded:Connect(function(z,s)if z.UserInputType==Enum.UserInputType.Keyboard then O.KeyUp:Fire(z.KeyCode)end end)end return O




local Keyboard = {}

local userInput = game:GetService("UserInputService")


function Keyboard:IsDown(keyCode)
	return userInput:IsKeyDown(keyCode)
end


function Keyboard:AreAllDown(...)
	for _,keyCode in pairs{...} do
		if (not userInput:IsKeyDown(keyCode)) then
			return false
		end
	end
	return true
end


function Keyboard:AreAnyDown(...)
	for _,keyCode in pairs{...} do
		if (userInput:IsKeyDown(keyCode)) then
			return true
		end
	end
	return false
end


function Keyboard:Start()
	
end


function Keyboard:Init()
	
	self.KeyDown = self.Shared.Event.new()
	self.KeyUp = self.Shared.Event.new()
	
	userInput.InputBegan:Connect(function(input, processed)
		if (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyDown:Fire(input.KeyCode)
		end
	end)
	
	userInput.InputEnded:Connect(function(input, processed)
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyUp:Fire(input.KeyCode)
		end
	end)
	
end


return Keyboard
