game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)

local AK47 = game:GetService("StarterPack"):WaitForChild("AK47")

local player = game.Players.LocalPlayer
local char = player.CharacterAdded:Wait()
local hum = char.Humanoid

local input = game:GetService("UserInputService")

input.InputBegan:Connect(function(key)
	  if key.Keycode == Enum.KeyCode.One then
	   hum:EquipTool(AK47)
	end
end)

If you spot anything please tell me!