Making ammo frame show up for tool that's in GUI in StarterGUI

I’m using this free model script that on equipped, a gui called AmmoFrame will show up. But it already shows up from the tool simply being in StarterGUI (i’m putting it in there because it’s for a class selection GUI). I only want the GUI to show up on equipped. I’ve set the Frame’s Visible thing to false, but then it doesn’t show up. I don’t really know how to code something in this code to make the GUI be invincible when the tool is not being used, and make it show up when it is. The tool’s gui script just dupes the gui already inside it.

Tool = script.Parent

function onEquippedLocal()

local character = Tool.Parent

local player = game.Players:GetPlayerFromCharacter(character)

gui = script.Parent.AmmoFrame:clone()

gui.Parent = player.PlayerGui


function onUnequippedLocal()





For this GUI to appear, would you want it to make it appear when a tool is equipped? If so, use this dev hub link: