--[[

Want an explanation of the script? ٩(｡•́‿•̀｡)۶
https://youtu.be/a6WMCfSZF8k (Shirooo)
	
--]]


game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
 
 --< variables >--
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = workspace:WaitForChild(player.Name) -- added WaitForChild
local bp = player.Backpack
local hum = char:WaitForChild("Humanoid")
local frame = script.Parent.Frame
local template = frame.Template
local equipped = 0.2 -- icon transparencies
local unequipped = 0.7

local iconSize = template.Size
local iconBorder = {x = 15, y = 5} -- pixel space between icons

local inputKeys = { -- dictionary for effective referencing
	["One"] = {txt = "1"},
	["Two"] = {txt = "2"},
	["Three"] = {txt = "3"},
	["Four"] = {txt = "4"},
	["Five"] = {txt = "5"},
	["Six"] = {txt = "6"},
	["Seven"] = {txt = "7"},
	["Eight"] = {txt = "8"},
	["Nine"] = {txt = "9"},
	["Zero"] = {txt = "0"},
}

local inputOrder = { -- array for storing the order of the keys
	inputKeys["One"],inputKeys["Two"],inputKeys["Three"],inputKeys["Four"],inputKeys["Five"],
	inputKeys["Six"],inputKeys["Seven"],inputKeys["Eight"],inputKeys["Nine"],inputKeys["Zero"],
}
	