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

--[[
	
	Boolean   Keyboard:IsDown(keyCode)
	Boolean   Keyboard:AreAllDown(keyCodes...)
	Boolean   Keyboard:AreAnyDown(keyCodes...)
	
	Keyboard.KeyDown(keyCode)
	Keyboard.KeyUp(keyCode)
	
--]]



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