-- 🔥 MEGA ADMIN + ŒUFS IDENTIQUES AU SPAWNER 🔥
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
-- RemoteEvent pour GUI GlobalMessage
local globalMsgRemote = Instance.new("RemoteEvent")
globalMsgRemote.Name = "GlobalMessageGUI"
globalMsgRemote.Parent = ReplicatedStorage
local SUPER_ADMINS = {"Lumyxor"}
local ADMINS = {"killuasuuuuuuu", "matyxor"}
local ALL_ADMINS = {"Lumyxor", "killuasuuuuuuu", "matyxor"}
local FlyStates = {}
local BannedPlayers = {}
local function isSuperAdmin(player) return table.find(SUPER_ADMINS, player.Name) ~= nil end
local function isAdmin(player) return table.find(ALL_ADMINS, player.Name) ~= nil end
local function notifyAdmin(player, msg)
pcall(function()
game.StarterGui:SetCore("SendNotification", {
Title = "🌱 GROW ADMIN"; Text = msg; Duration = 3;
})
end)
end
-- 🥚 SPAWN ŒUF EXACTEMENT COMME TON SPAWNER
local function spawnOeufSpawnerStyle(position)
local eggModel = ServerStorage:FindFirstChild("Egg")
if not eggModel then
warn("❌ Modèle 'Egg' non trouvé dans ServerStorage !")
return
end
local eggClone = eggModel:Clone()
local rootPart = eggClone:FindFirstChildOfClass("BasePart")
if rootPart then
rootPart.CFrame = CFrame.new(position) + Vector3.new(0, 3, 0)
rootPart.Anchored = false
end
eggClone.Parent = workspace
end
-- 🥚 COMMANDE ;spawneufs 100
local function spawnOeufs(amount)
for i = 1, amount do
local x = math.random(-100, 100)
local z = math.random(-100, 100)
spawnOeufSpawnerStyle(Vector3.new(x, 0, z))
task.wait(0.05) -- Anti-lag
end
end
local function sendGlobalGUI(adminName, message)
globalMsgRemote:FireAllClients(adminName, message)
end
-- Ton fly existant (inchangé)
local function toggleFly(player, state)
local char = player.Character
if not char or not char:FindFirstChild("HumanoidRootPart") then return end
local root = char.HumanoidRootPart
local hum = char:FindFirstChild("Humanoid")
if state then
FlyStates[player] = {bodyVelocity = nil, bodyAngularVelocity = nil, connection = nil, speed = 50}
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(4000, 4000, 4000)
bv.Velocity = Vector3.new(0, 0, 0)
bv.Parent = root
local bav = Instance.new("BodyAngularVelocity")
bav.MaxTorque = Vector3.new(0, math.huge, 0)
bav.AngularVelocity = Vector3.new(0, 0, 0)
bav.Parent = root
FlyStates[player].bodyVelocity = bv
FlyStates[player].bodyAngularVelocity = bav
FlyStates[player].connection = RunService.Heartbeat:Connect(function()
if not FlyStates[player] or not char.Parent then return end
local cam = workspace.CurrentCamera
local moveVector = hum.MoveDirection
if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then moveVector = moveVector * 2 end
local velocity = cam.CFrame:VectorToWorldSpace(moveVector * FlyStates[player].speed)
bv.Velocity = velocity
end)
notifyAdmin(player, "✈️ FLY ON (WASD + SHIFT=rapide)")
else
if FlyStates[player] then
if FlyStates[player].bodyVelocity then FlyStates[player].bodyVelocity:Destroy() end
if FlyStates[player].bodyAngularVelocity then FlyStates[player].bodyAngularVelocity:Destroy() end
if FlyStates[player].connection then FlyStates[player].connection:Disconnect() end
end
FlyStates[player] = nil
notifyAdmin(player, "🛬 FLY OFF")
end
end
Players.PlayerAdded:Connect(function(player)
if BannedPlayers[player.UserId] then player:Kick("🚫 Banni du serveur") return end
player.Chatted:Connect(function(msg)
local args = msg:split(" ")
local cmd = args[1]:lower()
if cmd == ";globalmessage" then
local text = table.concat(args, " ", 2)
if text ~= "" and isAdmin(player) then
sendGlobalGUI(player.Name, text)
notifyAdmin(player, "📢 GLOBAL GUI envoyé")
end
return
end
if not isAdmin(player) then return end
-- 🥚 ;spawneufs 100 - EXACTEMENT COMME TON SPAWNER
if cmd == ";spawneufs" and args[2] then
local amount = tonumber(args[2])
if amount and amount > 0 and amount <= 100 then
spawnOeufs(amount)
notifyAdmin(player, "🥚 " .. amount .. " œufs SPAWNER spawnés !")
else
notifyAdmin(player, "❌ 1-100 œufs max")
end
return
end
-- Toutes tes autres commandes...
if cmd == ";fly" then toggleFly(player, not FlyStates[player])
elseif cmd == ";nofly" then toggleFly(player, false)
elseif cmd == ";killall" then
for _, p in pairs(Players:GetPlayers()) do
if p ~= player and p.Character and p.Character:FindFirstChild("Humanoid") then
p.Character.Humanoid.Health = 0
end
end
notifyAdmin(player, "💥 TOUS tués")
-- ... (kill, invis, big, etc. restent identiques)
end
end)
end)
print("🥚 MEGA ADMIN + SPAWNER ŒUFS - ;spawneufs 100 !")