--[[ Jump Button Editor Resize, fade, move, hide and lock the on-screen jump button (touch devices). Run it again to replace a copy that is already running. ]] local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local env = (getgenv and getgenv()) or _G if env.JumpEditorUnload then pcall(env.JumpEditorUnload) end ---------------------------------------------------------------------- -- Settings ---------------------------------------------------------------------- local COLORS = { Window = Color3.fromRGB(34, 34, 36), Title = Color3.fromRGB(24, 24, 26), Button = Color3.fromRGB(62, 62, 66), ButtonOn = Color3.fromRGB(64, 132, 92), Line = Color3.fromRGB(54, 54, 58), Text = Color3.fromRGB(232, 232, 232), Dim = Color3.fromRGB(150, 150, 155), } local FONT, FONT_BOLD = Enum.Font.SourceSans, Enum.Font.SourceSansBold local SIZE_MIN, SIZE_MAX, SIZE_STEP = 30, 300, 5 local OPACITY_MIN, OPACITY_STEP = 10, 10 local MOVE_STEP = 5 local connections = {} local function track(connection) connections[#connections + 1] = connection return connection end ---------------------------------------------------------------------- -- Jump button logic ---------------------------------------------------------------------- local State = { Size = 70, Opacity = 100, -- percent OffsetX = 0, -- pixels moved from the default spot OffsetY = 0, Hidden = false, Lock = false, -- re-applies the settings every frame so the game can't change them } local defaults = { Size = 70, Opacity = 100 } local engaged = false -- stays false until we actually change the button local orig, margin -- the button's original look, and its default distance from the bottom-right corner local refresh -- set once the menu exists local function set(object, property, value) if object[property] ~= value then object[property] = value end end local function snapshot(button) local area = button.Parent.AbsoluteSize local pos = button.AbsolutePosition - button.Parent.AbsolutePosition local size = button.AbsoluteSize orig = { AnchorPoint = button.AnchorPoint, Position = button.Position, Size = button.Size, ImageTransparency = button.ImageTransparency, Visible = button.Visible, } margin = Vector2.new(area.X - (pos.X + size.X), area.Y - (pos.Y + size.Y)) defaults.Size = math.floor(size.X + 0.5) defaults.Opacity = math.floor((1 - button.ImageTransparency) * 100 + 0.5) if not engaged then State.Size, State.Opacity = defaults.Size, defaults.Opacity end if refresh then refresh() end end local function getButton() local playerGui = player:FindFirstChild("PlayerGui") local touchGui = playerGui and playerGui:FindFirstChild("TouchGui") local controls = touchGui and touchGui:FindFirstChild("TouchControlFrame") local button = controls and controls:FindFirstChild("JumpButton") if button and button:IsA("ImageButton") then if not orig then snapshot(button) end return button end end local function applyButton() local button = getButton() if not (button and engaged) then return end local area = button.Parent.AbsoluteSize local size = State.Size local x = math.clamp(-margin.X + State.OffsetX, math.min(size - area.X, 0), 0) local y = math.clamp(-margin.Y + State.OffsetY, math.min(size - area.Y, 0), 0) State.OffsetX, State.OffsetY = x + margin.X, y + margin.Y set(button, "AnchorPoint", Vector2.new(1, 1)) set(button, "Size", UDim2.fromOffset(size, size)) set(button, "Position", UDim2.new(1, x, 1, y)) set(button, "ImageTransparency", 1 - State.Opacity / 100) set(button, "Visible", not State.Hidden) end local function restoreOriginal() local button = getButton() if button and orig then for property, value in pairs(orig) do set(button, property, value) end end engaged = false end local function change() engaged = true applyButton() refresh() end track(RunService.Heartbeat:Connect(function() if State.Lock then applyButton() end end)) ---------------------------------------------------------------------- -- Menu helpers ---------------------------------------------------------------------- local function new(class, props, parent) local object = Instance.new(class) for key, value in pairs(props) do object[key] = value end object.Parent = parent return object end local function makeButton(parent, text, size, position) return new("TextButton", { BackgroundColor3 = COLORS.Button, BorderSizePixel = 0, Font = FONT_BOLD, Text = text, TextColor3 = COLORS.Text, TextSize = 18, Size = size, Position = position or UDim2.new(), }, parent) end local function makeText(parent, text, props) local label = new("TextLabel", { BackgroundTransparency = 1, Font = FONT, Text = text, TextColor3 = COLORS.Text, TextSize = 18, }, parent) for key, value in pairs(props or {}) do label[key] = value end return label end -- Calls fn once on press, then repeatedly while the button is held down. local function onHold(button, fn) local press = 0 button.MouseButton1Down:Connect(function() press += 1 local mine = press fn() task.delay(0.4, function() while press == mine and button.Parent do fn() task.wait(0.05) end end) end) local function release() press += 1 end button.MouseButton1Up:Connect(release) button.MouseLeave:Connect(release) button.InputEnded:Connect(release) end local function makeDraggable(handle, target) local dragging, moved = false, false local dragStart, startPos handle.InputBegan:Connect(function(input) local inputType = input.UserInputType if inputType == Enum.UserInputType.MouseButton1 or inputType == Enum.UserInputType.Touch then dragging, moved = true, false dragStart, startPos = input.Position, target.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) track(UserInputService.InputChanged:Connect(function(input) local inputType = input.UserInputType if dragging and (inputType == Enum.UserInputType.MouseMovement or inputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart if delta.Magnitude > 6 then moved = true end target.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end)) return function() return moved end end ---------------------------------------------------------------------- -- Menu ---------------------------------------------------------------------- local gui = new("ScreenGui", { Name = "JumpButtonEditor", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 999, }, (gethui and gethui()) or player:WaitForChild("PlayerGui")) local window = new("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(240, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = COLORS.Window, BorderSizePixel = 0, }, gui) new("UIStroke", { Color = COLORS.Line, Thickness = 1 }, window) new("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder }, window) local order = 0 local function makeRow(height) order += 1 local row = new("Frame", { BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, height or 40), LayoutOrder = order, }, window) new("Frame", { BackgroundColor3 = COLORS.Line, BorderSizePixel = 0, AnchorPoint = Vector2.new(0, 1), Position = UDim2.fromScale(0, 1), Size = UDim2.new(1, 0, 0, 1), }, row) return row end -- Title bar local titleBar = new("Frame", { BackgroundColor3 = COLORS.Title, BorderSizePixel = 0, Size = UDim2.new(1, 0, 0, 32), LayoutOrder = 0, }, window) makeText(titleBar, "Jump Button Editor", { Font = FONT_BOLD, TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -50, 1, 0), }) local closeButton = makeButton(titleBar, "x", UDim2.fromOffset(32, 32), UDim2.new(1, -32, 0, 0)) closeButton.BackgroundTransparency = 1 -- Size and opacity: [-] value [+] local function makeStepper(label, onStep) local row = makeRow() makeText(row, label, { TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2.fromOffset(10, 0), Size = UDim2.new(0, 70, 1, 0), }) local box = new("Frame", { BackgroundTransparency = 1, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(136, 28), }, row) local minus = makeButton(box, "-", UDim2.fromOffset(34, 28)) local plus = makeButton(box, "+", UDim2.fromOffset(34, 28), UDim2.fromOffset(102, 0)) local value = makeText(box, "", { Position = UDim2.fromOffset(34, 0), Size = UDim2.fromOffset(68, 28), }) onHold(minus, function() onStep(-1) end) onHold(plus, function() onStep(1) end) return value end local sizeValue = makeStepper("Size", function(direction) State.Size = math.clamp(State.Size + direction * SIZE_STEP, SIZE_MIN, SIZE_MAX) change() end) local opacityValue = makeStepper("Opacity", function(direction) State.Opacity = math.clamp(State.Opacity + direction * OPACITY_STEP, OPACITY_MIN, 100) change() end) -- Position: four direction buttons local moveRow = makeRow() local moves = { { "Left", -1, 0 }, { "Up", 0, -1 }, { "Down", 0, 1 }, { "Right", 1, 0 }, } for index, move in ipairs(moves) do local button = makeButton(moveRow, move[1], UDim2.fromOffset(52, 28), UDim2.new(0, 10 + (index - 1) * 56, 0.5, -14)) button.TextSize = 16 onHold(button, function() State.OffsetX += move[2] * MOVE_STEP State.OffsetY += move[3] * MOVE_STEP change() end) end -- Hide and Lock: On/Off buttons local toggles = {} local function makeToggle(label, key) local row = makeRow() makeText(row, label, { TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -90, 1, 0), }) local button = makeButton(row, "", UDim2.fromOffset(60, 28), UDim2.new(1, -70, 0.5, -14)) button.Activated:Connect(function() State[key] = not State[key] change() end) toggles[#toggles + 1] = function() button.Text = State[key] and "On" or "Off" button.BackgroundColor3 = State[key] and COLORS.ButtonOn or COLORS.Button end end makeToggle("Hide button", "Hidden") makeToggle("Lock settings", "Lock") -- Reset local resetRow = makeRow() local resetButton = makeButton(resetRow, "Reset to default", UDim2.new(1, -20, 0, 28), UDim2.fromOffset(10, 6)) -- Status line order += 1 local statusLabel = makeText(window, "", { TextColor3 = COLORS.Dim, TextSize = 15, Size = UDim2.new(1, 0, 0, 24), LayoutOrder = order, }) -- Small tab that opens and closes the window local tab = makeButton(gui, "Jump", UDim2.fromOffset(56, 28), UDim2.new(0, 10, 0.3, 0)) new("UIStroke", { Color = COLORS.Line, Thickness = 1 }, tab) ---------------------------------------------------------------------- -- Wiring ---------------------------------------------------------------------- function refresh() sizeValue.Text = tostring(State.Size) opacityValue.Text = State.Opacity .. "%" for _, render in ipairs(toggles) do render() end statusLabel.Text = orig and "Jump button found" or "Jump button not found (touch only)" end makeDraggable(titleBar, window) local tabWasDragged = makeDraggable(tab, tab) closeButton.Activated:Connect(function() window.Visible = false end) tab.Activated:Connect(function() if not tabWasDragged() then window.Visible = not window.Visible end end) resetButton.Activated:Connect(function() restoreOriginal() State.Size, State.Opacity = defaults.Size, defaults.Opacity State.OffsetX, State.OffsetY = 0, 0 State.Hidden, State.Lock = false, false refresh() end) env.JumpEditorUnload = function() for _, connection in ipairs(connections) do connection:Disconnect() end restoreOriginal() gui:Destroy() env.JumpEditorUnload = nil end getButton() -- reads the button's current size and look as the defaults refresh()