local function r(r)if r.Character and(r.Character:FindFirstChild("\072\117\109\097\110\111\105\100")~=nil and r.Character.Humanoid.Health>0)then for B,p in pairs(r.Character:GetChildren())do if p:IsA("\084\111\111\108")and((require(p.ACS_Settings)).Type=="\071\117\110"and Stored.Value>0)then if Universal then Evt.Refil:FireClient(r,p,Infinite,Stored)script.Parent.Parent.RefilSound:Play()else if(require(p.ACS_Settings)).BulletType==BulletType then Evt.Refil:FireClient(r,p,Infinite,Stored)script.Parent.Parent.RefilSound:Play()end end end end end end
-- 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
