Cloning from ReplicatedStorage to Backpack

I have done something similar using ServerStorage in an initialization script that is called when a player is added. I used server storage for security reasons.

-- Required Game Services and Facilities
local playerService = game:GetService("Players")
local serverStorage = game:GetService("ServerStorage")

playerService.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local backpack = player.WaitForChild("Backpack", 10)
		for _, weapon in pairs(serverStorage.Weapons:GetChildren()) do
			local tool = weapon:Clone()
			tool.Parent = backpack
		end
	end)
end)

In ServerStorage, I have a folder called “Weapons” where everything in that folder is cloned into the player’s backpack. You can use ReplicatedStorage by just changing ServerStorage to ReplicatedStorage and it should work. However, I would recommend using ServerStorage for security reasons, and not a local script to clone tools to the player’s backpack. An exploiter can take advantage of this. But for input type detection, just do a FireServer event from the client to pass the information along to the server. Besides, I’m not sure if you can clone an item to a player’s backpack on the client side. Being able to do so would be a major security issue because then a player can clone any tool into your game. Now whether it works or not is a different issue.