while wait(0.2) do
	    if keys["p"] then
	        print "Replacing the idol"
			Player.Backpack.Bag:Destroy()
			local idol = game.ServerStorage.Idol:Clone()
			idol.Parent = Player.Backpack
	    end
	end

I already have Player defined earlier in the script. This is supposed to, when 'P' is pressed, remove the tool called "Bag" and clone the tool called "Idol" into the backpack.