script.Parent.Equipped:Connect(function()
  -- nothing you need to know
	
  game:GetService("UserInputService").InputBegan:Connect(function(key)
   if key.KeyCode == Enum.KeyCode.R then
	if script.Parent.Equipped then
	 if ammo ~= 30 then
      debounce = 1
      script.Parent.Reload:Play()
      wait(2)
      ammo = 30
      print(ammo)
	  debounce = 0	
	 end
    end
   end
  end)
	
end)

Help please! I have no error and I really need to do this!