-- local script inside the tool 

local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local isAdmin = true -- change this to true if the player is an admin
local normalHealth = humanoid.MaxHealth
local adminHealth = 1000

local function onEquipped()
	if isAdmin then
		humanoid.MaxHealth = adminHealth
		humanoid.Health = adminHealth
	end
end

local function onUnequipped()
	if isAdmin then
		humanoid.MaxHealth = normalHealth
		humanoid.Health = normalHealth
	end
end

tool.Equipped:Connect(onEquipped)
tool.Unequipped:Connect(onUnequipped)
