-- // Equips & Unequip

Remotes.Main1.OnServerEvent:Connect(function(plr,firingtype)
	local LocalPlayer = plr
	local Character   = LocalPlayer.Character
	for GetType,_ in pairs(GetTable) do
		if firingtype == GetType then
			--LocalPlayer.PlayerGui.ScreenGui.Folder[Slots].Value = true
			
			--if LocalPlayer.PlayerGui.ScreenGui.Folder[Slots].Value then
				
			if Character:FindFirstChild(GetType) == nil then
			local FindWeapons = Weapons[GetType]:Clone()
				FindWeapons.Parent = Character
			if FindWeapons.WielderType.Value == _.WielderType then
				
				local DefineWeldings = Instance.new("Motor6D")
				DefineWeldings.Part0 = Character["Right Arm"]
				DefineWeldings.Part1 = FindWeapons.Handle
				DefineWeldings.C0 = _.WeldCFrame
				DefineWeldings.Parent = Character["Right Arm"]
				DefineWeldings.Name = GetType
				Name = GetType
				end
			end
		end
	end
	
	if firingtype == "Unequip" then
		pcall(function()
			Character[Name]:Destroy()
		end)
	end
end)
