Weapons={[Enum.KeyCode.One]=script.Parent.Primary;[Enum.KeyCode.Two]=script.Parent.Secondary;[Enum.KeyCode.Three]=script.Parent.Melee}Selected=script.Parent.Primary function Select(z)z:TweenSize(UDim2.new(.15,0,.1,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)end function Deselect(z)z:TweenSize(UDim2.new(.12,0,.1,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)end UIS.InputBegan:Connect(function(z)local h=Weapons[z.KeyCode]if h then Deselect(Selected)Selected=h Select(Selected)end end)
--Equip Handler

Weapons = {
	[Enum.KeyCode.One] = script.Parent.Primary,
	[Enum.KeyCode.Two] = script.Parent.Secondary,
	[Enum.KeyCode.Three] = script.Parent.Melee,
}

Selected = script.Parent.Primary

function Select(Weapon)
	Weapon:TweenSize(UDim2.new(0.15, 0, 0.1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1, true)
end

function Deselect(Weapon)
	Weapon:TweenSize(UDim2.new(0.12, 0, 0.1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1, true)
end

UIS.InputBegan:Connect(function(input)
	local Key = Weapons[input.KeyCode]
	if Key then
		Deselect(Selected)
		Selected = Key
		Select(Selected)
	end
end)
