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




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 (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyUp:Fire(input.KeyCode)
		end
	end)
	
end


return Keyboard
