local P, R, U, C = game:GetService("Players").LocalPlayer, game:GetService("RunService"), game:GetService("UserInputService"), workspace.CurrentCamera
local fly, bv, bg, conn = false, nil, nil, nil
local names = {"White", "Blue", "Black", "Green", "Yellow", "Red", "Magenta"}
local sg = Instance.new("ScreenGui", P:WaitForChild("PlayerGui"))
-- Изменили размер рамки по высоте (было 245, стало 205), чтобы не было пустых мест без кнопки NOCLIP
local frame = Instance.new("Frame", sg)
frame.Size, frame.Position, frame.BackgroundColor3 = UDim2.new(0, 180, 0, 205), UDim2.new(0.05, 0, 0.2, 0), Color3.fromRGB(30, 30, 30)
local lbl = Instance.new("TextLabel", frame)
lbl.Size, lbl.Text, lbl.TextColor3, lbl.BackgroundTransparency = UDim2.new(1, 0, 0, 25), "XENO MENU (K)", Color3.new(1,1,1), 1
-- Размер подменю команд тоже адаптирован
local subFrame = Instance.new("Frame", sg)
subFrame.Size, subFrame.Position, subFrame.BackgroundColor3, subFrame.Visible = UDim2.new(0, 140, 0, 205), UDim2.new(0.05, 185, 0.2, 0), Color3.fromRGB(20, 20, 20), false
local function btn(p, txt, y, h)
local b = Instance.new("TextButton", p)
b.Size, b.Position, b.Text, b.TextColor3, b.BackgroundColor3 = UDim2.new(0.9, 0, 0, h or 32), UDim2.new(0.05, 0, 0, y), txt, Color3.new(1,1,1), Color3.fromRGB(200, 50, 50)
return b
end
-- Оставили только FLY и TEAMS, кнопку NOCLIP полностью стёрли
local flyBtn, tpMenuBtn = btn(frame, "FLY: OFF", 30), btn(frame, "TEAMS >", 65)
local function createInput(ph, y)
local b = Instance.new("TextBox", frame)
b.Size, b.Position, b.BackgroundColor3, b.TextColor3, b.PlaceholderText, b.Text = UDim2.new(0.9, 0, 0, 30), UDim2.new(0.05, 0, 0, y), Color3.fromRGB(50, 50, 50), Color3.new(1,1,1), ph, ""
return b
end
-- Сдвинули текстовые поля ввода выше на место удалённой кнопки
local speedInput, jumpInput = createInput("Speed (Default: 16)", 100), createInput("Jump (Default: 50)", 135)
-- Логика безопасности полёта (CanCollide)
R.Stepped:Connect(function()
if fly and P.Character then
-- Если включен полет, отключаем коллизию тела, чтобы не дёргало физическим движком
for _, v in pairs(P.Character:GetDescendants()) do
if v:IsA("BasePart") then v.CanCollide = false end
end
end
end)
local function teleportToTeam(colorName)
local hrp = P.Character and P.Character:FindFirstChild("HumanoidRootPart") if not hrp then return end
local checkName = colorName:lower()
if checkName == "yellow" then checkName = "yeller" elseif checkName == "green" then checkName = "camo" end
for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("SpawnLocation") and v.BrickColor.Name:lower():find(checkName) then hrp.CFrame = v.CFrame * CFrame.new(0, 5, 0) return end
end
end
for i, name in ipairs(names) do
btn(subFrame, name .. " Team", 5 + (i-1)*28, 25).Activated:Connect(function() teleportToTeam(name) end)
end
tpMenuBtn.Activated:Connect(function() subFrame.Visible = not subFrame.Visible end)
local function toggle()
fly = not fly
local hrp, hum = P.Character and P.Character:FindFirstChild("HumanoidRootPart"), P.Character and P.Character:FindFirstChildOfClass("Humanoid")
if not hrp or not hum then fly = false return end
if fly then
flyBtn.Text, flyBtn.BackgroundColor3, hum.PlatformStand = "FLY: ON", Color3.fromRGB(50, 200, 50), true
bv = Instance.new("BodyVelocity", hrp)
bv.MaxForce = Vector3.new(1e5, 1e5, 1e5)
bg = Instance.new("BodyAngularVelocity", hrp)
bg.MaxTorque, bg.AngularVelocity = Vector3.new(1e5, 1e5, 1e5), Vector3.zero
conn = R.RenderStepped:Connect(function()
if not hrp or not hrp.Parent or not bv or not bv.Parent or not bg or not bg.Parent then
if conn then conn:Disconnect() end
return
end
local dir = Vector3.zero
if U:IsKeyDown("W") then dir = dir + C.CFrame.LookVector end
if U:IsKeyDown("S") then dir = dir - C.CFrame.LookVector end
if U:IsKeyDown("A") then dir = dir - C.CFrame.RightVector end
if U:IsKeyDown("D") then dir = dir + C.CFrame.RightVector end
if U:IsKeyDown("Space") then dir = dir + Vector3.new(0,1,0) end
if U:IsKeyDown("LeftShift") then dir = dir - Vector3.new(0,1,0) end
bv.Velocity = dir.Magnitude > 0 and dir.Unit * (tonumber(speedInput.Text) or 60) or Vector3.zero
hrp.CFrame = CFrame.lookAt(hrp.Position, hrp.Position + C.CFrame.LookVector)
end)
else
flyBtn.Text, flyBtn.BackgroundColor3, hum.PlatformStand = "FLY: OFF", Color3.fromRGB(200, 50, 50), false
if bv then bv:Destroy() end
if bg then bg:Destroy() end
if conn then conn:Disconnect() end
end
end
flyBtn.Activated:Connect(toggle)
local function apply()
local hum = P.Character and P.Character:FindFirstChildOfClass("Humanoid")
if hum then
hum.WalkSpeed = tonumber(speedInput.Text) or 16
local jv = tonumber(jumpInput.Text) or 50
if hum.UseJumpPower then hum.JumpPower = jv else hum.JumpHeight = jv end
end
end
speedInput.FocusLost:Connect(apply)
jumpInput.FocusLost:Connect(apply)
P.CharacterAdded:Connect(function()
fly = false
flyBtn.Text, flyBtn.BackgroundColor3 = "FLY: OFF", Color3.fromRGB(200, 50, 50)
if conn then conn:Disconnect() end
end)
-- Открытие/закрытие меню по-прежнему на клавишу К
U.InputBegan:Connect(function(i, g)
if not g and i.KeyCode == Enum.KeyCode.K then
frame.Visible = not frame.Visible
subFrame.Visible = false
end
end)