-- Detect when prompt is triggered

local function onPromptTriggered(player)
	if player.Character and player.Character:FindFirstChild("Humanoid") ~= nil and player.Character.Humanoid.Health > 0 then

		for _,Child in pairs(player.Character:GetChildren()) do 
			if Child:IsA("Tool") and require(Child.ACS_Settings).Type == 'Gun' and Stored.Value > 0 then 
				if Universal then
					Evt.Refil:FireClient(player, Child, Infinite, Stored)
					script.Parent.Parent.RefilSound:Play()
				else
					if require(Child.ACS_Settings).BulletType == BulletType then
						Evt.Refil:FireClient(player, Child, Infinite, Stored)
						script.Parent.Parent.RefilSound:Play()
					end
				end
			end
		end
	end
end
