local v={}local Y=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")function v.IsDown(y,v)return Y:IsKeyDown(v)end function v.AreAllDown(v,...)for v,y in pairs({...})do if not Y:IsKeyDown(y)then return false end end return true end function v.AreAnyDown(v,...)for v,y in pairs({...})do if Y:IsKeyDown(y)then return true end end return false end function v.Start(v) end function v.Init(v)v.KeyDown=v.Shared.Event.new()v.KeyUp=v.Shared.Event.new()Y.InputBegan:Connect(function(Y,y)if y then return end if Y.UserInputType==Enum.UserInputType.Keyboard then v.KeyDown:Fire(Y.KeyCode)end end)Y.InputEnded:Connect(function(Y,y)if y then return end if Y.UserInputType==Enum.UserInputType.Keyboard then v.KeyUp:Fire(Y.KeyCode)end end)end return v
--[[
	
	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 processed then
			return
		end
		if input.UserInputType == Enum.UserInputType.Keyboard then
			self.KeyUp:Fire(input.KeyCode)
		end
	end)
end

return Keyboard
