
Key RequiredUniversal

-- SERVICES
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local player = Players.LocalPlayer
local NORMAL_GRAVITY = 196.2
-- GUI
local gui = Instance.new("ScreenGui")
gui.Name = "MainMenuGui"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
-- MENU PRINCIPAL
local menu = Instance.new("Frame")
menu.Size = UDim2.new(0, 200, 0, 40)
menu.Position = UDim2.new(0.05, 0, 0.3, 0)
menu.BackgroundColor3 = Color3.fromRGB(30,30,30)
menu.BorderSizePixel = 0
menu.Parent = gui
local menuTitle = Instance.new("TextButton")
menuTitle.Size = UDim2.new(1,0,0,40)
menuTitle.Position = UDim2.new(0,0,0,0)
menuTitle.BackgroundColor3 = Color3.fromRGB(50,50,50)
menuTitle.Text = "Menu ▼"
menuTitle.TextColor3 = Color3.fromRGB(255,255,255)
menuTitle.TextScaled = true
menuTitle.BorderSizePixel = 0
menuTitle.Parent = menu
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0,12)
corner.Parent = menu
-- CONTENEUR BOUTONS
local buttonsFrame = Instance.new("Frame")
buttonsFrame.Size = UDim2.new(1, 0, 1, -40)
buttonsFrame.Position = UDim2.new(0, 0, 0, 40)
buttonsFrame.BackgroundTransparency = 1
buttonsFrame.Visible = false
buttonsFrame.Parent = menu
-- VARIABLES
local gravityOn = true
local isSitting = false
local noclipEnabled = false
local xrayEnabled = false
local noclipConnection = nil
local savedXray = {}
local savedLighting = {
FogStart = Lighting.FogStart,
FogEnd = Lighting.FogEnd,
GlobalShadows = Lighting.GlobalShadows
}
-- UTILITAIRES
local function getHumanoid()
local character = player.Character or player.CharacterAdded:Wait()
return character:WaitForChild("Humanoid")
end
local function getCharacter()
return player.Character or player.CharacterAdded:Wait()
end
-- RESET AU RESPAWN
player.CharacterAdded:Connect(function()
workspace.Gravity = NORMAL_GRAVITY
gravityOn = true
isSitting = false
if noclipEnabled then
task.wait(0.1)
noclipConnection = RunService.Stepped:Connect(function()
local character = getCharacter()
if character then
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
end
end)
end
if xrayEnabled then
task.wait(0.1)
savedXray = {}
for _, obj in pairs(workspace:GetDescendants()) do
if obj:IsA("BasePart") and not obj:IsDescendantOf(getCharacter()) then
savedXray[obj] = obj.Transparency
obj.Transparency = 0.8
end
end
Lighting.FogStart = 0
Lighting.FogEnd = 1e7
Lighting.GlobalShadows = false
end
end)
-- BOUTONS NOIRS
local function createButton(yPos, text)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0, 160, 0, 40)
btn.Position = UDim2.new(0.5, -80, 0, yPos)
btn.BackgroundColor3 = Color3.fromRGB(0,0,0)
btn.TextColor3 = Color3.fromRGB(255,255,255)
btn.TextScaled = true
btn.Text = text
btn.BorderSizePixel = 0
btn.Parent = buttonsFrame
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0,8)
corner.Parent = btn
return btn
end
-- Créer les boutons et stocker références
local gravityBtn = createButton(0, "Gravity: ON")
local sitBtn = createButton(50, "S’asseoir")
local noclipBtn = createButton(100, "Noclip: OFF")
local xrayBtn = createButton(150, "XRAY: OFF")
-- FONCTIONS BOUTONS
gravityBtn.MouseButton1Click:Connect(function()
gravityOn = not gravityOn
if gravityOn then
workspace.Gravity = NORMAL_GRAVITY
gravityBtn.Text = "Gravity: ON"
else
workspace.Gravity = 0
gravityBtn.Text = "Gravity: OFF"
end
end)
sitBtn.MouseButton1Click:Connect(function()
local humanoid = getHumanoid()
if humanoid then
isSitting = not isSitting
if isSitting then
humanoid.Sit = true
sitBtn.Text = "Se lever"
else
humanoid.Sit = false
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
sitBtn.Text = "S’asseoir"
end
end
end)
noclipBtn.MouseButton1Click:Connect(function()
noclipEnabled = not noclipEnabled
if noclipEnabled then
noclipConnection = RunService.Stepped:Connect(function()
local character = getCharacter()
if character then
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
end
end)
noclipBtn.Text = "Noclip: ON"
else
if noclipConnection then
noclipConnection:Disconnect()
noclipConnection = nil
end
local character = getCharacter()
if character then
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = true
end
end
end
noclipBtn.Text = "Noclip: OFF"
end
end)
xrayBtn.MouseButton1Click:Connect(function()
xrayEnabled = not xrayEnabled
if xrayEnabled then
savedXray = {}
for _, obj in pairs(workspace:GetDescendants()) do
if obj:IsA("BasePart") and not obj:IsDescendantOf(getCharacter()) then
savedXray[obj] = obj.Transparency
obj.Transparency = 0.8
end
end
Lighting.FogStart = 0
Lighting.FogEnd = 1e7
Lighting.GlobalShadows = false
xrayBtn.Text = "XRAY: ON"
else
for obj, trans in pairs(savedXray) do
if obj and obj.Parent then
obj.Transparency = trans
end
end
savedXray = {}
Lighting.FogStart = savedLighting.FogStart
Lighting.FogEnd = savedLighting.FogEnd
Lighting.GlobalShadows = savedLighting.GlobalShadows
xrayBtn.Text = "XRAY: OFF"
end
end)
-- OUVRIR / FERMER MENU
menuTitle.MouseButton1Click:Connect(function()
buttonsFrame.Visible = not buttonsFrame.Visible
if buttonsFrame.Visible then
menu.Size = UDim2.new(0, 200, 0, 240)
menuTitle.Text = "Menu ▲"
else
menu.Size = UDim2.new(0, 200, 0, 40)
menuTitle.Text = "Menu ▼"
end
end)
-- DRAGGABLE MENU
local dragging = false
local dragStart
local startPos
menu.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = menu.Position
end
end)
menu.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
local delta = input.Position - dragStart
menu.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)



Oi
@Scrkjh oi
ts is FE, its so fkin good for the jokes lmao