explore
key systems
new
docs
discord
search scripts
⌘K
explore
key systems
new
docs
discord
sign in
⌘↵
--
publishes from anywhere on this page
new paste
untitled.luau
empty
/ 512kb
open file
⌘O
explore
key systems
new
docs
sign in
open-src-ys-waypoint-setter-copy.luau
2648 lines · 87.7kb
/ 512kb
open file
⌘O
local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players['LocalPlayer'] local session = { uiName = "WaypointSetter", unloaded = false, connections = {}, tweens = {}, markers = {}, cleanups = {}, minimize = nil :: (() -> ())?, minimizedMenuGui = nil :: Instance?, } function session:track(connection) self.connections[connection] = true return connection end function session:release(connection) if not connection then return end self.connections[connection] = nil connection:Disconnect() end function session:onUnload(cleanup) table['insert'](self.cleanups, cleanup) end function session:unload() if self.unloaded then return end self.unloaded = true for _, cleanup in ipairs(self.cleanups) do local ok, err = pcall(cleanup) if not ok then warn(self.uiName .. " unload: " .. tostring(err)) end end table['clear'](self.cleanups) for connection in pairs(self.connections) do connection:Disconnect() self.connections[connection] = nil end for activeTween in pairs(self.tweens) do activeTween:Cancel() self.tweens[activeTween] = nil end for marker in pairs(self.markers) do if marker['Parent'] then marker:Destroy() end self.markers[marker] = nil end if self.gui then self.gui:Destroy() self.gui = nil end end local GLASS_TINT = Color3['fromRGB'](18, 22, 30) local GLASS_TRANSPARENCY = 0 local COLOR_GLASS = Color3['fromRGB'](255, 255, 255) local COLOR_RED = Color3['fromRGB'](255, 105, 97) local COLOR_DESTRUCTIVE = Color3['fromRGB'](255, 59, 48) local COLOR_DESTRUCTIVE_HOVER = Color3['fromRGB'](255, 80, 70) local COLOR_TEXT = Color3['fromRGB'](255, 255, 255) local COLOR_TEXT_SOFT = Color3['fromRGB'](240, 244, 250) local COLOR_SECONDARY = Color3['fromRGB'](222, 228, 238) local COLOR_TERTIARY = Color3['fromRGB'](200, 208, 220) local COLOR_STROKE = Color3['fromRGB'](255, 255, 255) local TL_RED = Color3['fromRGB'](255, 95, 87) local TL_YELLOW = Color3['fromRGB'](254, 188, 46) local TL_GREEN = Color3['fromRGB'](40, 200, 64) local T_PANEL = 0.94 local T_PANEL_HOVER = 0.9 local T_BUTTON = 0.91 local T_BUTTON_HOVER = 0.84 local T_PRIMARY = 0.82 local T_PRIMARY_HOVER = 0.72 local T_RIM = 0.4 local WINDOW_RADIUS = 26 local CARD_RADIUS = 20 local SIDEBAR_WIDTH = 170 local TITLEBAR_HEIGHT = 44 local FONT_REGULAR = Enum['Font'].BuilderSans local FONT_MEDIUM = Enum['Font'].BuilderSansMedium local FONT_BOLD = Enum['Font'].BuilderSansBold local FONT_MONO = Enum['Font'].RobotoMono local QUINT = Enum['EasingStyle'].Quint local QUAD = Enum['EasingStyle'].Quad local BACK = Enum['EasingStyle'].Back local OUT = Enum['EasingDirection'].Out local IN = Enum['EasingDirection'].In local INOUT = Enum['EasingDirection'].InOut local function create(className, props) local obj = Instance['new'](className) for key, value in pairs(props) do if key ~= "Parent" then obj[key] = value end end obj['Parent'] = props['Parent'] return obj end local function isPress(input) return input['UserInputType'] == Enum['UserInputType'].MouseButton1 or input['UserInputType'] == Enum['UserInputType'].Touch end local function trackDrag(startInput, onMove, onEnd) local isTouch = startInput['UserInputType'] == Enum['UserInputType'].Touch local moveConn, endConn moveConn = session:track(UserInputService['InputChanged']:Connect(function(input) if session.unloaded then return end if isTouch and input ~= startInput then return end if not isTouch and input['UserInputType'] ~= Enum['UserInputType'].MouseMovement then return end onMove(input) end)) endConn = session:track(UserInputService['InputEnded']:Connect(function(input) if isTouch and input ~= startInput then return end if not isTouch and input['UserInputType'] ~= Enum['UserInputType'].MouseButton1 then return end session:release(moveConn) session:release(endConn) if onEnd and not session.unloaded then onEnd() end end)) end local function offsetBy(pos, delta) return UDim2['new'](pos['X'].Scale, pos['X'].Offset + delta['X'], pos['Y'].Scale, pos['Y'].Offset + delta['Y']) end local function runSection(fn) fn() end local function corner(radius, parent) local c = create("UICorner", { CornerRadius = UDim['new'](0, radius), Parent = parent }) return c end local function stroke(parent, color, thickness, transparency) local s = create("UIStroke", { Color = color or COLOR_STROKE, Thickness = thickness or 1, Transparency = transparency or T_RIM, ApplyStrokeMode = Enum['ApplyStrokeMode'].Border, Parent = parent, }) return s end local function tween(obj, props, t, style, dir) local info = TweenInfo['new'](t or 0.2, style or QUINT, dir or OUT) local tw = TweenService:Create(obj, info, props) session.tweens[tw] = true tw['Completed']:Once(function() session.tweens[tw] = nil end) tw:Play() return tw end local function rimLight(strokeObj) local g = create("UIGradient", { Rotation = 35 }) g['Transparency'] = NumberSequence['new']({ NumberSequenceKeypoint['new'](0, 0), NumberSequenceKeypoint['new'](0.45, 0.75), NumberSequenceKeypoint['new'](0.75, 0.85), NumberSequenceKeypoint['new'](1, 0.35), }) g['Parent'] = strokeObj return g end local function glassSheen(obj) if obj:IsA("CanvasGroup") then local sheen = create("Frame", { Name = "sheen", BackgroundColor3 = Color3['fromRGB'](255, 255, 255), BackgroundTransparency = 0.94, BorderSizePixel = 0, Size = UDim2['new'](1, 0, 0.55, 0), ZIndex = 0, Active = false, Parent = obj, }) local g = create("UIGradient", { Rotation = 90 }) g['Transparency'] = NumberSequence['new']({ NumberSequenceKeypoint['new'](0, 0), NumberSequenceKeypoint['new'](1, 1), }) g['Parent'] = sheen return g end local g = create("UIGradient", { Rotation = 90 }) g['Transparency'] = NumberSequence['new']({ NumberSequenceKeypoint['new'](0, 0), NumberSequenceKeypoint['new'](1, 0.35), }) g['Parent'] = obj return g end local function innerEdge(obj, radius) local edge = create("Frame", { Name = "innerEdge", BackgroundTransparency = 1, Position = UDim2['new'](0, 1, 0, 1), Size = UDim2['new'](1, -2, 1, -2), ZIndex = obj['ZIndex'], Active = false, Parent = obj, }) corner(math['max'](radius - 1, 0), edge) local s = stroke(edge, COLOR_STROKE, 1, 0.8) local g = create("UIGradient", { Rotation = 215 }) g['Transparency'] = NumberSequence['new']({ NumberSequenceKeypoint['new'](0, 0.2), NumberSequenceKeypoint['new'](0.35, 0.9), NumberSequenceKeypoint['new'](1, 1), }) g['Parent'] = s return edge end local function glass(obj, transparency, radius, rimTransparency) obj['BackgroundColor3'] = COLOR_GLASS obj['BackgroundTransparency'] = transparency or T_PANEL obj['BorderSizePixel'] = 0 if radius then corner(radius, obj) if radius >= 12 then innerEdge(obj, radius) end end glassSheen(obj) local s = stroke(obj, COLOR_STROKE, 1, rimTransparency or T_RIM) rimLight(s) return s end local settings = { toggleKey = Enum['KeyCode'].K, topbarButtons = "Default", notificationTransparency = 0, minimizedMenuTransparency = 0, notifications = { menuClosed = true, clearAll = true, waypointAdded = false, teleported = false, renamed = false, }, } local saveSettings runSection(function() local HttpService = game:GetService("HttpService") local SETTINGS_FOLDER = "YSWAYPOINTSETTER" local SETTINGS_FILE = SETTINGS_FOLDER .. "/settings_" .. tostring(LocalPlayer['UserId']) .. ".json" local canSave = typeof(writefile) == "function" and typeof(readfile) == "function" local migratedSettings = false if canSave then local ok, raw = pcall(readfile, SETTINGS_FILE) if not ok or type(raw) ~= "string" or raw == "" then local previousFile = "WaypointClicker/settings_" .. tostring(LocalPlayer['UserId']) .. ".json" ok, raw = pcall(readfile, previousFile) migratedSettings = ok and type(raw) == "string" and raw ~= "" end if ok and type(raw) == "string" and raw ~= "" then local decodedOk, data = pcall(function() return HttpService:JSONDecode(raw) end) if decodedOk and type(data) == "table" then if type(data['toggleKey']) == "string" then local keyOk, key = pcall(function() return Enum['KeyCode'][data['toggleKey']] end) if keyOk and key then settings['toggleKey'] = key end end if type(data['notifications']) == "table" then for name, value in pairs(data['notifications']) do if settings['notifications'][name] ~= nil and type(value) == "boolean" then settings['notifications'][name] = value end end end if type(data['transparency']) == "number" then GLASS_TRANSPARENCY = math['clamp'](data['transparency'], 0, 0.95) end if data['topbarButtons'] == "Default" or data['topbarButtons'] == "Mac" then settings['topbarButtons'] = data['topbarButtons'] end if type(data['notificationTransparency']) == "number" then settings['notificationTransparency'] = math['clamp'](data['notificationTransparency'], 0, 0.95) end if type(data['minimizedMenuTransparency']) == "number" then settings['minimizedMenuTransparency'] = math['clamp'](data['minimizedMenuTransparency'], 0, 0.95) end end end end local savePending = false saveSettings = function() if not canSave or savePending then return end savePending = true task['delay'](0.3, function() savePending = false local payload = { toggleKey = settings['toggleKey'].Name, notifications = settings['notifications'], transparency = GLASS_TRANSPARENCY, notificationTransparency = settings['notificationTransparency'], minimizedMenuTransparency = settings['minimizedMenuTransparency'], topbarButtons = settings['topbarButtons'], } pcall(function() if typeof(isfolder) == "function" and typeof(makefolder) == "function" and not isfolder(SETTINGS_FOLDER) then makefolder(SETTINGS_FOLDER) end writefile(SETTINGS_FILE, HttpService:JSONEncode(payload)) end) end) end if canSave and typeof(isfolder) == "function" and typeof(makefolder) == "function" then local ok, err = pcall(function() if not isfolder(SETTINGS_FOLDER) then makefolder(SETTINGS_FOLDER) end end) if not ok then warn("WaypointSetter: could not create settings folder: " .. tostring(err)) end end if migratedSettings then saveSettings() end end) local notify local function copyToClipboard(text) local clipFn = setclipboard or toclipboard or (Clipboard and Clipboard['set']) if not clipFn then return false end local ok = pcall(clipFn, text) return ok end local function swapText(label, newText, newColor) if label['Text'] == newText and (not newColor or label['TextColor3'] == newColor) then return end local fadeOut = tween(label, { TextTransparency = 1 }, 0.1, QUAD, IN) fadeOut['Completed']:Connect(function(state) if state ~= Enum['PlaybackState'].Completed then return end label['Text'] = newText if newColor then label['TextColor3'] = newColor end tween(label, { TextTransparency = 0 }, 0.18, QUAD, OUT) end) end local function applyHover(button, baseColor, hoverColor, baseTransparency, hoverTransparency, isActive) local scale = create("UIScale", { Parent = button }) local hovering = false local baseT = baseTransparency ~= nil and baseTransparency or button['BackgroundTransparency'] local hoverT = hoverTransparency ~= nil and hoverTransparency or baseT local function refresh() local active = isActive and isActive() if hovering and not active then tween(button, { BackgroundColor3 = hoverColor, BackgroundTransparency = hoverT, }, 0.18, QUINT, OUT) else tween(button, { BackgroundColor3 = baseColor, BackgroundTransparency = baseT, }, 0.28, QUINT, OUT) end end button['MouseEnter']:Connect(function() hovering = true refresh() end) button['MouseLeave']:Connect(function() hovering = false refresh() tween(scale, { Scale = 1 }, 0.3, QUINT, OUT) end) button['MouseButton1Down']:Connect(function() tween(scale, { Scale = 0.96 }, 0.1, QUAD, OUT) end) button['MouseButton1Up']:Connect(function() tween(scale, { Scale = 1 }, 0.35, BACK, OUT) end) return refresh end local function makePillButton(parent, text, kind, width, height) local baseT, hoverT, textColor = T_BUTTON, T_BUTTON_HOVER, COLOR_TEXT local baseColor, hoverColor = COLOR_GLASS, COLOR_GLASS if kind == "primary" then baseT, hoverT = T_PRIMARY, T_PRIMARY_HOVER elseif kind == "destructive" then baseT, hoverT = 0.45, 0.28 baseColor, hoverColor = COLOR_DESTRUCTIVE, COLOR_DESTRUCTIVE_HOVER end local btn = create("TextButton", { Size = width and UDim2['new'](0, width, 0, height or 26) or UDim2['new'](1, 0, 0, height or 26), AutoButtonColor = false, Font = FONT_MEDIUM, Text = text, }) btn['TextColor3'] = textColor btn['TextSize'] = 14 btn['Parent'] = parent local rim = glass(btn, baseT, math['floor']((height or 26) / 2), kind == "primary" and 0.3 or T_RIM) btn['BackgroundColor3'] = baseColor if kind == "destructive" then btn['Font'] = FONT_BOLD rim['Color'] = Color3['fromRGB'](255, 160, 155) rim['Transparency'] = 0.25 end applyHover(btn, baseColor, hoverColor, baseT, hoverT) return btn end local guiParent if typeof(gethui) == "function" then local ok, hiddenRoot = pcall(gethui) if ok and typeof(hiddenRoot) == "Instance" then guiParent = hiddenRoot end end if not guiParent then warn(session.uiName .. ": gethui parent unavailable") guiParent = LocalPlayer:WaitForChild("PlayerGui", 10) if not guiParent then error(session.uiName .. ": PlayerGui unavailable", 2) end end for _, previousName in ipairs({ "WaypointSetter", "WaypointClicker" }) do local previousGui = guiParent:FindFirstChild(previousName) if previousGui and previousGui:IsA("ScreenGui") then previousGui:Destroy() end end local screenGui = create("ScreenGui", { Name = session.uiName, ResetOnSpawn = false, ZIndexBehavior = Enum['ZIndexBehavior'].Sibling, DisplayOrder = 2147483647, IgnoreGuiInset = true, Parent = guiParent, }) session.gui = screenGui session:track(screenGui['Destroying']:Connect(function() session.gui = nil session:unload() end)) local mainFrame = create("CanvasGroup", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 580, 0, 390), BackgroundColor3 = GLASS_TINT, BackgroundTransparency = GLASS_TRANSPARENCY, BorderSizePixel = 0, ClipsDescendants = true, Parent = screenGui, }) corner(WINDOW_RADIUS, mainFrame) create("UISizeConstraint", { MinSize = Vector2['new'](240, 180), MaxSize = Vector2['new'](580, 390), Parent = mainFrame, }) glassSheen(mainFrame) rimLight(stroke(mainFrame, COLOR_STROKE, 1.5, 0.2)) innerEdge(mainFrame, WINDOW_RADIUS) local mainScale = create("UIScale", { Parent = mainFrame }) local openTargetSize = mainFrame['Size'] function session:windowScale() local camera = workspace['CurrentCamera'] if not camera then return 1 end local viewport = camera['ViewportSize'] return math['max'](0.45, math['min'](1, (viewport['X'] - 24) / openTargetSize['X'].Offset, (viewport['Y'] - 24) / openTargetSize['Y'].Offset )) end local sidebarBg = create("Frame", { Name = "sidebarBg", Size = UDim2['new'](0, SIDEBAR_WIDTH, 1, 0), BackgroundColor3 = COLOR_GLASS, BackgroundTransparency = 0.97, BorderSizePixel = 0, ZIndex = 1, Parent = mainFrame, }) create("Frame", { AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, 0, 0, 16), Size = UDim2['new'](0, 1, 1, -32), BackgroundColor3 = COLOR_STROKE, BackgroundTransparency = 0.82, BorderSizePixel = 0, Parent = sidebarBg, }) local titleBar = create("Frame", { Name = "titleBar", Size = UDim2['new'](1, 0, 0, TITLEBAR_HEIGHT), BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 10, Parent = mainFrame, }) local LOGO_IMAGE = "rbxassetid://136593826397730" local hasLogo = LOGO_IMAGE ~= "" and LOGO_IMAGE ~= "rbxassetid://0" local titleCenter = create("Frame", { BackgroundTransparency = 1, Position = UDim2['new'](0, SIDEBAR_WIDTH + 24, 0, 0), Size = UDim2['new'](1, -(SIDEBAR_WIDTH + 24 + TITLEBAR_HEIGHT * 3 + 8), 1, 0), ZIndex = 10, Parent = titleBar, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, HorizontalAlignment = Enum['HorizontalAlignment'].Left, VerticalAlignment = Enum['VerticalAlignment'].Center, Padding = UDim['new'](0, 8), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = titleCenter, }) local logo = create("ImageLabel", { Name = "logo", LayoutOrder = 1, BackgroundTransparency = 1, Size = UDim2['new'](0, 24, 0, 16), Image = LOGO_IMAGE, ImageColor3 = COLOR_TEXT, ScaleType = Enum['ScaleType'].Fit, Visible = hasLogo, ZIndex = 10, Parent = titleCenter, }) if hasLogo then task['spawn'](function() local ContentProvider = game:GetService("ContentProvider") local loaded = false pcall(function() ContentProvider:PreloadAsync({ logo }, function(_, status) if status == Enum['AssetFetchStatus'].Success then loaded = true end end) end) if session.unloaded or not logo['Parent'] then return end if loaded then return end local ok, objects = pcall(function() return game:GetObjects(LOGO_IMAGE) end) if session.unloaded or not logo['Parent'] then return end if ok and objects and objects[1] then local obj = objects[1] if obj:IsA("Decal") or obj:IsA("Texture") then logo['Image'] = obj['Texture'] elseif obj:IsA("ImageLabel") or obj:IsA("ImageButton") then logo['Image'] = obj['Image'] end else warn("Logo kunne ikke indl\xc3\xa6ses: " .. LOGO_IMAGE) end end) end create("TextLabel", { LayoutOrder = 2, BackgroundTransparency = 1, AutomaticSize = Enum['AutomaticSize'].X, Size = UDim2['new'](0, 0, 0, 18), Font = FONT_MEDIUM, Text = "Waypoint Setter", TextColor3 = COLOR_TEXT_SOFT, TextSize = 16, ZIndex = 10, Parent = titleCenter, }) runSection(function() local TOAST_WIDTH = 320 local TOAST_HEIGHT = 66 local TOAST_GAP = 10 local TOAST_MAX = 4 local toastHolder = create("Frame", { Name = "toastHolder", AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, -16, 0, 64), Size = UDim2['new'](0, TOAST_WIDTH, 1, -80), BackgroundTransparency = 1, ZIndex = 50, Parent = screenGui, }) create("UIListLayout", { SortOrder = Enum['SortOrder'].LayoutOrder, VerticalAlignment = Enum['VerticalAlignment'].Top, Padding = UDim['new'](0, 0), Parent = toastHolder, }) local toastOrder = 0 local activeToasts = {} function session:refreshNotifications() for _, entry in ipairs(activeToasts) do if not entry['closing'] and entry['toast']['Parent'] and entry['refreshBackground'] then entry['refreshBackground'](true) end end end session:onUnload(function() for _, entry in ipairs(activeToasts) do entry['closing'] = true session:release(entry['conn']) end table['clear'](activeToasts) end) local function dismissToast(entry) if entry['closing'] then return end entry['closing'] = true session:release(entry['conn']) for i, t in ipairs(activeToasts) do if t == entry then table['remove'](activeToasts, i) break end end tween(entry['toast'], { Position = UDim2['new'](0, 40, 0, 0), GroupTransparency = 1 }, 0.3, QUINT, IN) tween(entry['overlay'], { Position = UDim2['new'](0, 40, 0, 0) }, 0.3, QUINT, IN) tween(entry['closeBtn'], { BackgroundTransparency = 1, TextTransparency = 1 }, 0.15, QUAD, OUT) tween(entry['closeStroke'], { Transparency = 1 }, 0.15, QUAD, OUT) task['delay'](0.2, function() if session.unloaded or not entry['slot']['Parent'] then return end local collapse = tween(entry['slot'], { Size = UDim2['new'](1, 0, 0, 0) }, 0.32, QUINT, INOUT) collapse['Completed']:Connect(function(state) if state == Enum['PlaybackState'].Completed and entry['slot']['Parent'] then entry['slot']:Destroy() end end) end) end notify = function(title, text, duration, category) if session.unloaded then return end if category and settings['notifications'][category] == false then return end duration = duration or 3 if #activeToasts >= TOAST_MAX then dismissToast(activeToasts[1]) end toastOrder = toastOrder + 1 local slot = create("Frame", { Name = "toastSlot", LayoutOrder = -toastOrder, BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, 0), ZIndex = 50, Parent = toastHolder, }) local toast = create("CanvasGroup", { Name = "toast", Position = UDim2['new'](0, 40, 0, 0), Size = UDim2['new'](1, 0, 0, TOAST_HEIGHT), GroupTransparency = 1, ZIndex = 50, Parent = slot, }) glass(toast, settings['notificationTransparency'], 22, 0.2) toast['BackgroundColor3'] = GLASS_TINT local iconTile = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 12, 0.5, 0), Size = UDim2['new'](0, 40, 0, 40), ZIndex = 51, Parent = toast, }) glass(iconTile, 0.88, 20, 0.3) if hasLogo then create("ImageLabel", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 28, 0, 12), Image = logo['Image'], ImageColor3 = COLOR_TEXT, ScaleType = Enum['ScaleType'].Fit, ZIndex = 52, Parent = iconTile, }) else create("TextLabel", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), Font = FONT_BOLD, Text = "!", TextColor3 = COLOR_TEXT, TextSize = 20, ZIndex = 52, Parent = iconTile, }) end create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 64, 0, 13), Size = UDim2['new'](1, -120, 0, 18), Font = FONT_BOLD, Text = title, TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Left, TextTruncate = Enum['TextTruncate'].AtEnd, ZIndex = 51, Parent = toast, }) create("TextLabel", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, -14, 0, 14), Size = UDim2['new'](0, 40, 0, 16), Font = FONT_REGULAR, Text = "now", TextColor3 = COLOR_SECONDARY, TextSize = 14, TextXAlignment = Enum['TextXAlignment'].Right, ZIndex = 51, Parent = toast, }) create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 64, 0, 33), Size = UDim2['new'](1, -78, 0, 18), Font = FONT_REGULAR, Text = text, TextColor3 = COLOR_TEXT_SOFT, TextSize = 14, TextXAlignment = Enum['TextXAlignment'].Left, TextTruncate = Enum['TextTruncate'].AtEnd, ZIndex = 51, Parent = toast, }) local hitArea = create("TextButton", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), Text = "", AutoButtonColor = false, ZIndex = 53, Parent = toast, }) local overlay = create("Frame", { Name = "overlay", Position = toast['Position'], Size = toast['Size'], BackgroundTransparency = 1, ZIndex = 54, Parent = slot, }) local closeBtn = create("TextButton", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0, 4, 0, 4), Size = UDim2['new'](0, 20, 0, 20), BackgroundColor3 = GLASS_TINT, BackgroundTransparency = 1, AutoButtonColor = false, Font = FONT_BOLD, Text = "\xc3\x97", TextColor3 = COLOR_TEXT_SOFT, TextTransparency = 1, TextSize = 14, ZIndex = 55, Parent = overlay, }) corner(10, closeBtn) local closeStroke = stroke(closeBtn, COLOR_STROKE, 1, 1) local entry = { slot = slot, toast = toast, overlay = overlay, closeBtn = closeBtn, closeStroke = closeStroke, closing = false, } table['insert'](activeToasts, entry) tween(slot, { Size = UDim2['new'](1, 0, 0, TOAST_HEIGHT + TOAST_GAP) }, 0.4, QUINT, OUT) tween(toast, { Position = UDim2['new'](0, 0, 0, 0), GroupTransparency = 0 }, 0.5, QUINT, OUT) tween(overlay, { Position = UDim2['new'](0, 0, 0, 0) }, 0.5, QUINT, OUT) local hoverToast = false local hoverClose = false local function refreshHover(instant) if entry['closing'] then return end local show = hoverToast or hoverClose local transparency = math['max'](0, settings['notificationTransparency'] - (show and 0.08 or 0)) if instant then closeBtn['BackgroundTransparency'] = show and 0 or 1 closeBtn['TextTransparency'] = show and 0 or 1 closeStroke['Transparency'] = show and 0.3 or 1 toast['BackgroundTransparency'] = transparency else tween(closeBtn, { BackgroundTransparency = show and 0 or 1, TextTransparency = show and 0 or 1 }, 0.18, QUINT, OUT) tween(closeStroke, { Transparency = show and 0.3 or 1 }, 0.18, QUINT, OUT) tween(toast, { BackgroundTransparency = transparency }, 0.2, QUINT, OUT) end end entry['refreshBackground'] = refreshHover hitArea['MouseEnter']:Connect(function() hoverToast = true refreshHover() end) hitArea['MouseLeave']:Connect(function() hoverToast = false refreshHover() end) closeBtn['MouseEnter']:Connect(function() hoverClose = true refreshHover() end) closeBtn['MouseLeave']:Connect(function() hoverClose = false refreshHover() end) hitArea['MouseButton1Click']:Connect(function() dismissToast(entry) end) closeBtn['MouseButton1Click']:Connect(function() dismissToast(entry) end) local elapsed = 0 entry['conn'] = session:track(RunService['Heartbeat']:Connect(function(dt) if hoverToast or hoverClose then return end elapsed = elapsed + dt if elapsed >= duration then dismissToast(entry) end end)) return entry end end) local trafficLights = create("Frame", { Name = "trafficLights", AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 16, 0.5, 0), Size = UDim2['new'](0, 52, 0, 12), BackgroundTransparency = 1, ZIndex = 11, Parent = titleBar, }) local lightGlyphs = {} local function makeLight(index, color, glyph) local light = create("TextButton", { Position = UDim2['new'](0, (index - 1) * 20, 0, 0), Size = UDim2['new'](0, 12, 0, 12), Text = "", AutoButtonColor = false, }) light['BackgroundColor3'] = color light['BorderSizePixel'] = 0 light['AutoButtonColor'] = false light['Text'] = "" light['ZIndex'] = 11 light['Parent'] = trafficLights corner(6, light) stroke(light, Color3['fromRGB'](0, 0, 0), 1, 0.82) local glyphColor = color:Lerp(Color3['fromRGB'](0, 0, 0), 0.62) local bars = {} if glyph == "close" then bars = { { center = true, w = 7, h = 1.5, r = 45 }, { center = true, w = 7, h = 1.5, r = -45 } } elseif glyph == "minimize" then bars = { { x = 3, y = 5, w = 6, h = 2 } } elseif glyph == "zoom" then bars = { { x = 3, y = 5, w = 6, h = 2 }, { x = 5, y = 3, w = 2, h = 6 } } end for _, bar in ipairs(bars) do local b = Instance['new']("Frame") if bar['center'] then b['AnchorPoint'] = Vector2['new'](0.5, 0.5) b['Position'] = UDim2['new'](0.5, 0, 0.5, 0) b['Rotation'] = bar['r'] else b['Position'] = UDim2['new'](0, bar['x'], 0, bar['y']) end b['Size'] = UDim2['new'](0, bar['w'], 0, bar['h']) b['BackgroundColor3'] = glyphColor b['BackgroundTransparency'] = 1 b['BorderSizePixel'] = 0 b['ZIndex'] = 12 b['Parent'] = light corner(1, b) table['insert'](lightGlyphs, b) end local pressed = color:Lerp(Color3['fromRGB'](0, 0, 0), 0.25) light['MouseButton1Down']:Connect(function() tween(light, { BackgroundColor3 = pressed }, 0.08, QUAD, OUT) end) light['MouseButton1Up']:Connect(function() tween(light, { BackgroundColor3 = color }, 0.2, QUAD, OUT) end) light['MouseLeave']:Connect(function() tween(light, { BackgroundColor3 = color }, 0.2, QUAD, OUT) end) return light end local closeBtn = makeLight(1, TL_RED, "close") local toggleBtn = makeLight(2, TL_YELLOW, "minimize") local zoomBtn = makeLight(3, TL_GREEN, "zoom") trafficLights['MouseEnter']:Connect(function() for _, g in ipairs(lightGlyphs) do tween(g, { BackgroundTransparency = 0.15 }, 0.15, QUAD, OUT) end end) trafficLights['MouseLeave']:Connect(function() for _, g in ipairs(lightGlyphs) do tween(g, { BackgroundTransparency = 1 }, 0.2, QUAD, OUT) end end) runSection(function() local TOPBAR_IMAGES = { minimize = "rbxassetid://95070996149109", zoom = "rbxassetid://135105418501265", close = "rbxassetid://116396312853810", } local defaultButtons = create("Frame", { Name = "defaultTopbarButtons", AnchorPoint = Vector2['new'](1, 0.5), Position = UDim2['new'](1, -8, 0.5, 0), Size = UDim2['new'](0, TITLEBAR_HEIGHT * 3, 0, TITLEBAR_HEIGHT), BackgroundTransparency = 1, ZIndex = 11, Parent = titleBar, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, Padding = UDim['new'](0, 0), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = defaultButtons, }) local function makeDefaultButton(order, action) local button = create("TextButton", { Name = action .. "Button", LayoutOrder = order, Size = UDim2['new'](0, TITLEBAR_HEIGHT, 0, TITLEBAR_HEIGHT), BackgroundColor3 = COLOR_GLASS, BackgroundTransparency = 1, BorderSizePixel = 0, AutoButtonColor = false, Text = "", ZIndex = 12, Parent = defaultButtons, }) corner(6, button) local focusRim = stroke(button, COLOR_STROKE, 1, 1) local icon = create("ImageLabel", { Name = action .. "Icon", AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 16, 0, 16), BackgroundTransparency = 1, Image = TOPBAR_IMAGES[action], ImageColor3 = COLOR_TEXT_SOFT, ScaleType = Enum['ScaleType'].Fit, ZIndex = 13, Parent = button, }) local hovering, pressing, focused = false, false, false local function refreshButton() local shade = pressing and 0.82 or ((hovering or focused) and 0.92 or 1) local iconColor = (action == "close" and hovering) and COLOR_RED or ((hovering or focused) and COLOR_TEXT or COLOR_TEXT_SOFT) tween(button, { BackgroundTransparency = shade }, 0.12, QUAD, OUT) tween(icon, { ImageColor3 = iconColor }, 0.12, QUAD, OUT) tween(focusRim, { Transparency = focused and 0.65 or 1 }, 0.12, QUAD, OUT) end button['MouseEnter']:Connect(function() hovering = true refreshButton() end) button['MouseLeave']:Connect(function() hovering, pressing = false, false refreshButton() end) button['InputBegan']:Connect(function(input) if not isPress(input) then return end pressing = true refreshButton() end) button['InputEnded']:Connect(function(input) if not isPress(input) then return end pressing = false refreshButton() end) button['SelectionGained']:Connect(function() focused = true refreshButton() end) button['SelectionLost']:Connect(function() focused = false refreshButton() end) return button end session.topbar = { mac = trafficLights, default = defaultButtons, minimize = makeDefaultButton(1, "minimize"), zoom = makeDefaultButton(2, "zoom"), close = makeDefaultButton(3, "close"), } function session:refreshTopbarButtons() local mac = settings['topbarButtons'] == "Mac" self.topbar.mac['Visible'] = mac self.topbar.default['Visible'] = not mac end session:refreshTopbarButtons() end) local mainShown = true local visibilityToken = 0 local function showMain() visibilityToken = visibilityToken + 1 mainShown = true if not mainFrame['Visible'] then mainScale['Scale'] = session:windowScale() * 0.95 mainFrame['GroupTransparency'] = 1 mainFrame['Visible'] = true end tween(mainScale, { Scale = session:windowScale() }, 0.45, QUINT, OUT) tween(mainFrame, { GroupTransparency = 0 }, 0.3, QUAD, OUT) end local function hideMain() visibilityToken = visibilityToken + 1 local myToken = visibilityToken mainShown = false tween(mainScale, { Scale = session:windowScale() * 0.95 }, 0.22, QUINT, IN) local fade = tween(mainFrame, { GroupTransparency = 1 }, 0.22, QUAD, IN) fade['Completed']:Connect(function(state) if state == Enum['PlaybackState'].Completed and myToken == visibilityToken then mainFrame['Visible'] = false end end) end runSection(function() local closeNotificationCount = 0 local function closeWindow() local minimize = session.minimize if UserInputService['TouchEnabled'] and not UserInputService['KeyboardEnabled'] and minimize then task['spawn'](minimize) return end hideMain() if closeNotificationCount < 2 and settings['notifications'].menuClosed then closeNotificationCount = closeNotificationCount + 1 notify("Waypoint Setter", "Menu closed \xe2\x80\x93 press " .. settings['toggleKey'].Name .. " to open", 3.5, "menuClosed") end end closeBtn['Activated']:Connect(closeWindow) session.topbar.close['Activated']:Connect(closeWindow) local function recenterWindow() tween(mainFrame, { Position = UDim2['new'](0.5, 0, 0.5, 0) }, 0.5, QUINT, OUT) end zoomBtn['Activated']:Connect(recenterWindow) session.topbar.zoom['Activated']:Connect(recenterWindow) end) mainScale['Scale'] = session:windowScale() * 0.95 mainFrame['GroupTransparency'] = 1 tween(mainScale, { Scale = session:windowScale() }, 0.5, QUINT, OUT) tween(mainFrame, { GroupTransparency = 0 }, 0.35, QUAD, OUT) local function makeDraggable(handle) handle['InputBegan']:Connect(function(input) if not isPress(input) then return end local dragStart = input['Position'] local startFramePos = mainFrame['Position'] trackDrag(input, function(moveInput) mainFrame['Position'] = offsetBy(startFramePos, moveInput['Position'] - dragStart) end) end) end makeDraggable(titleBar) makeDraggable(sidebarBg) local NAV_TOP = 74 local NAV_ITEM_HEIGHT = 32 local NAV_ITEM_GAP = 2 create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 20, 0, 50), Size = UDim2['new'](0, SIDEBAR_WIDTH - 30, 0, 16), Font = FONT_BOLD, Text = "General", TextColor3 = COLOR_TERTIARY, TextSize = 14, TextXAlignment = Enum['TextXAlignment'].Left, ZIndex = 3, Parent = mainFrame, }) local pillLayer = create("Frame", { Name = "pillLayer", BackgroundTransparency = 1, Position = UDim2['new'](0, 0, 0, NAV_TOP), Size = UDim2['new'](0, SIDEBAR_WIDTH, 1, -NAV_TOP), ZIndex = 2, Active = false, Parent = mainFrame, }) local selectionPill = create("CanvasGroup", { Name = "selectionPill", Position = UDim2['new'](0, 10, 0, 0), Size = UDim2['new'](1, -20, 0, NAV_ITEM_HEIGHT), ZIndex = 2, Parent = pillLayer, }) glass(selectionPill, 0.87, NAV_ITEM_HEIGHT / 2, 0.3) local sidebar = create("Frame", { Name = "sidebar", BackgroundTransparency = 1, Position = UDim2['new'](0, 0, 0, NAV_TOP), Size = UDim2['new'](0, SIDEBAR_WIDTH, 1, -NAV_TOP), ZIndex = 3, Parent = mainFrame, }) create("UIListLayout", { Padding = UDim['new'](0, NAV_ITEM_GAP), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = sidebar, }) create("UIPadding", { PaddingLeft = UDim['new'](0, 10), PaddingRight = UDim['new'](0, 10), Parent = sidebar, }) local currentPageName = "Main" local navButtons = {} local navLabels = {} local navRefresh = {} local navOrder = { "Main", "Waypoints" } local SCRIPT_VERSION = "1.2.2" local MADE_BY = "clark.me" local ICON_BTN_SIZE = 34 local T_ICON_BTN = 0.88 local T_ICON_BTN_HOVER = 0.78 local T_ICON_BTN_ACTIVE = 0.7 local gearBtn, gearIcon runSection(function() local sidebarBottom = create("Frame", { Name = "sidebarBottom", BackgroundTransparency = 1, AnchorPoint = Vector2['new'](0, 1), Position = UDim2['new'](0, 14, 1, -14), Size = UDim2['new'](0, ICON_BTN_SIZE, 0, ICON_BTN_SIZE), ZIndex = 3, Parent = mainFrame, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, Padding = UDim['new'](0, 8), SortOrder = Enum['SortOrder'].LayoutOrder, VerticalAlignment = Enum['VerticalAlignment'].Center, Parent = sidebarBottom, }) local function makeIconButton(order, isActive) local btn = create("TextButton", { LayoutOrder = order, Size = UDim2['new'](0, ICON_BTN_SIZE, 0, ICON_BTN_SIZE), AutoButtonColor = false, Text = "", ZIndex = 3, Parent = sidebarBottom, }) glass(btn, T_ICON_BTN, ICON_BTN_SIZE / 2, 0.3) local scale = create("UIScale", { Parent = btn }) local function restT() return (isActive and isActive()) and T_ICON_BTN_ACTIVE or T_ICON_BTN end btn['MouseEnter']:Connect(function() tween(btn, { BackgroundTransparency = math['min'](T_ICON_BTN_HOVER, restT()) }, 0.18, QUINT, OUT) end) btn['MouseLeave']:Connect(function() tween(btn, { BackgroundTransparency = restT() }, 0.28, QUINT, OUT) tween(scale, { Scale = 1 }, 0.3, QUINT, OUT) end) btn['MouseButton1Down']:Connect(function() tween(scale, { Scale = 0.9 }, 0.1, QUAD, OUT) end) btn['MouseButton1Up']:Connect(function() tween(scale, { Scale = 1 }, 0.4, BACK, OUT) end) return btn, restT end gearBtn = makeIconButton(1, function() return currentPageName == "Settings" end) gearBtn['Name'] = "settingsBtn" gearIcon = create("Frame", { Name = "gear", AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 18, 0, 18), BackgroundTransparency = 1, ZIndex = 4, Parent = gearBtn, }) local ring = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 10, 0, 10), BackgroundTransparency = 1, ZIndex = 4, Parent = gearIcon, }) corner(5, ring) create("UIStroke", { Color = COLOR_TEXT, Thickness = 2.5, Parent = ring }) for i = 0, 7 do local angle = math['rad'](i * 45) local tooth = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, math['cos'](angle) * 7.5, 0.5, math['sin'](angle) * 7.5), Size = UDim2['new'](0, 4, 0, 4), Rotation = i * 45, BackgroundColor3 = COLOR_TEXT, BorderSizePixel = 0, ZIndex = 4, Parent = gearIcon, }) corner(1, tooth) end gearBtn['MouseEnter']:Connect(function() tween(gearIcon, { Rotation = 45 }, 0.45, QUINT, OUT) end) gearBtn['MouseLeave']:Connect(function() tween(gearIcon, { Rotation = 0 }, 0.45, QUINT, OUT) end) end) for i, name in ipairs(navOrder) do local btn = create("TextButton", { Name = "nav_" .. name, LayoutOrder = i, Size = UDim2['new'](1, 0, 0, NAV_ITEM_HEIGHT), BackgroundColor3 = COLOR_STROKE, BackgroundTransparency = 1, AutoButtonColor = false, Text = "", ZIndex = 3, Parent = sidebar, }) corner(NAV_ITEM_HEIGHT / 2, btn) local label = create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 14, 0, 0), Size = UDim2['new'](1, -20, 1, 0), Font = FONT_MEDIUM, Text = name, TextColor3 = name == currentPageName and COLOR_TEXT or COLOR_TEXT_SOFT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Left, ZIndex = 4, Parent = btn, }) navButtons[name] = btn navLabels[name] = label navRefresh[name] = applyHover(btn, COLOR_GLASS, COLOR_GLASS, 1, 0.94, function() return currentPageName == name end) end local content = create("Frame", { Position = UDim2['new'](0, SIDEBAR_WIDTH, 0, TITLEBAR_HEIGHT), Size = UDim2['new'](1, -SIDEBAR_WIDTH, 1, -TITLEBAR_HEIGHT), BackgroundTransparency = 1, ClipsDescendants = true, ZIndex = 1, Parent = mainFrame, }) local pages = {} local function makePageTitle(parent, titleStr) local titleLbl = create("TextLabel", { LayoutOrder = 0, BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, 32), Font = FONT_BOLD, Text = titleStr, TextColor3 = COLOR_TEXT, TextSize = 28, TextXAlignment = Enum['TextXAlignment'].Left, Parent = parent, }) return titleLbl end local function makeScrollPage(name) local wrapper = create("CanvasGroup", { Name = name .. "Page", BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), BorderSizePixel = 0, ClipsDescendants = true, Visible = false, Parent = content, }) local scroller = create("ScrollingFrame", { Name = name .. "Scroller", BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), BorderSizePixel = 0, ScrollingEnabled = true, ScrollingDirection = Enum['ScrollingDirection'].Y, ElasticBehavior = Enum['ElasticBehavior'].WhenScrollable, ScrollBarThickness = 3, ScrollBarImageColor3 = COLOR_SECONDARY, ScrollBarImageTransparency = 0.5, CanvasSize = UDim2['new'](0, 0, 0, 0), AutomaticCanvasSize = Enum['AutomaticSize'].Y, Parent = wrapper, }) create("UIPadding", { PaddingTop = UDim['new'](0, 4), PaddingLeft = UDim['new'](0, 24), PaddingRight = UDim['new'](0, 22), PaddingBottom = UDim['new'](0, 18), Parent = scroller, }) create("UIListLayout", { Padding = UDim['new'](0, 12), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = scroller, }) pages[name] = wrapper return wrapper, scroller end local mainPage, mainScroller = makeScrollPage("Main") mainPage['Visible'] = true local waypointPage, waypointScroller = makeScrollPage("Waypoints") local WAYPOINT_HEADER_HEIGHT = 40 waypointScroller['Position'] = UDim2['new'](0, 0, 0, WAYPOINT_HEADER_HEIGHT) waypointScroller['Size'] = UDim2['new'](1, 0, 1, -WAYPOINT_HEADER_HEIGHT) local wpScrollerPad = waypointScroller:FindFirstChildOfClass("UIPadding") if wpScrollerPad then wpScrollerPad['PaddingTop'] = UDim['new'](0, 8) end local pageEnterCallbacks = {} local function makeCard(order, height, parent, plain) local card = Instance['new'](plain and "Frame" or "CanvasGroup") card['LayoutOrder'] = order card['Size'] = UDim2['new'](1, 0, 0, height) card['Parent'] = parent glass(card, T_PANEL, CARD_RADIUS) card['MouseEnter']:Connect(function() tween(card, { BackgroundTransparency = T_PANEL_HOVER }, 0.25, QUINT, OUT) end) card['MouseLeave']:Connect(function() tween(card, { BackgroundTransparency = T_PANEL }, 0.35, QUINT, OUT) end) return card end local function makeIconTile(parent, size, text) local tile = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 14, 0.5, 0), Size = UDim2['new'](0, size, 0, size), Parent = parent, }) glass(tile, 0.88, size / 2, 0.3) if text then create("TextLabel", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), Font = FONT_BOLD, Text = text, TextColor3 = COLOR_TEXT, TextSize = math['floor'](size * 0.46), Parent = tile, }) end return tile end local function makeLabel(parent, text, x, y, height, font, size, color) local lbl = create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, x, 0, y), Size = UDim2['new'](1, -(x + 14), 0, height), Font = font, Text = text, }) lbl['TextColor3'] = color lbl['TextSize'] = size lbl['TextXAlignment'] = Enum['TextXAlignment'].Left lbl['TextTruncate'] = Enum['TextTruncate'].AtEnd lbl['Parent'] = parent return lbl end makePageTitle(mainScroller, "Main") local MAIN_TEXT_X = 70 local statusCard = makeCard(2, 76, mainScroller) local statusIcon = makeIconTile(statusCard, 42, nil) local statusRing = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 12, 0, 12), BackgroundColor3 = COLOR_RED, BackgroundTransparency = 1, BorderSizePixel = 0, Parent = statusIcon, }) corner(100, statusRing) local statusDot = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, 0, 0.5, 0), Size = UDim2['new'](0, 12, 0, 12), BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.35, BorderSizePixel = 0, Parent = statusIcon, }) corner(100, statusDot) makeLabel(statusCard, "Status", MAIN_TEXT_X, 13, 16, FONT_MEDIUM, 13, COLOR_SECONDARY) local statusLabel = makeLabel(statusCard, "Idle", MAIN_TEXT_X, 28, 22, FONT_BOLD, 19, COLOR_TEXT) statusLabel['Name'] = "statusLabel" local statusHint = makeLabel(statusCard, "Press Start to begin capturing waypoints", MAIN_TEXT_X, 50, 16, FONT_REGULAR, 13, COLOR_SECONDARY) local countCard = makeCard(3, 76, mainScroller) makeIconTile(countCard, 42, "#") makeLabel(countCard, "Waypoints", MAIN_TEXT_X, 13, 16, FONT_MEDIUM, 13, COLOR_SECONDARY) local countValue = makeLabel(countCard, "0", MAIN_TEXT_X, 28, 22, FONT_BOLD, 19, COLOR_TEXT) countValue['Name'] = "waypointCountLabel" local lastWaypointLabel = makeLabel(countCard, "No waypoints yet", MAIN_TEXT_X, 50, 16, FONT_REGULAR, 13, COLOR_SECONDARY) local pulseTween = nil session:onUnload(function() if pulseTween then pulseTween:Cancel() pulseTween = nil end end) local function setStatus(value, hint, recording) swapText(statusLabel, value, COLOR_TEXT) swapText(statusHint, hint) if recording ~= nil then if recording then tween(statusDot, { BackgroundColor3 = COLOR_RED, BackgroundTransparency = 0, Size = UDim2['new'](0, 14, 0, 14) }, 0.35, BACK, OUT) if not pulseTween then statusRing['Size'] = UDim2['new'](0, 14, 0, 14) statusRing['BackgroundTransparency'] = 0.45 pulseTween = TweenService:Create(statusRing, TweenInfo['new'](1.3, QUAD, OUT, -1), { Size = UDim2['new'](0, 34, 0, 34), BackgroundTransparency = 1, }) pulseTween:Play() end else tween(statusDot, { BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.35, Size = UDim2['new'](0, 12, 0, 12) }, 0.35, QUINT, OUT) if pulseTween then pulseTween:Cancel() pulseTween = nil end tween(statusRing, { BackgroundTransparency = 1 }, 0.2, QUAD, OUT) end end end local buttonRow = create("Frame", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, 40), LayoutOrder = 5, Parent = mainScroller, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, Padding = UDim['new'](0, 10), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = buttonRow, }) local startWaypointBtn = makePillButton(buttonRow, "Start", "primary", nil, 40) startWaypointBtn['Name'] = "startWaypointBtn" startWaypointBtn['LayoutOrder'] = 1 startWaypointBtn['Size'] = UDim2['new'](0.5, -5, 1, 0) startWaypointBtn['TextSize'] = 15 local stopWaypointBtn = makePillButton(buttonRow, "Stop", "secondary", nil, 40) stopWaypointBtn['Name'] = "stopWaypointBtn" stopWaypointBtn['LayoutOrder'] = 2 stopWaypointBtn['Size'] = UDim2['new'](0.5, -5, 1, 0) stopWaypointBtn['TextSize'] = 15 local waypointRecording = false session:onUnload(function() waypointRecording = false end) local waypoints = {} local nextWaypointIndex = 1 local mouse = LocalPlayer:GetMouse() startWaypointBtn['MouseButton1Click']:Connect(function() waypointRecording = true setStatus("Recording", "Click anywhere in the world to drop a waypoint", true) end) stopWaypointBtn['MouseButton1Click']:Connect(function() waypointRecording = false setStatus("Idle", "Press Start to begin capturing waypoints", false) end) local function parseWaypoint(str) if not str or str == "" then return nil end local x, y, z = string['match'](str, "%(([%d%.%-]+),%s*([%d%.%-]+),%s*([%d%.%-]+)%)") if not x then x, y, z = string['match'](str, "([%d%.%-]+),%s*([%d%.%-]+),%s*([%d%.%-]+)") end if x and y and z then return Vector3['new'](tonumber(x), tonumber(y), tonumber(z)) end return nil end local headerFrame = create("Frame", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, WAYPOINT_HEADER_HEIGHT), Parent = waypointPage, }) create("UIPadding", { PaddingTop = UDim['new'](0, 4), PaddingLeft = UDim['new'](0, 24), PaddingRight = UDim['new'](0, 22), Parent = headerFrame, }) local titleLbl = makePageTitle(headerFrame, "Waypoints") local clearAllBtn = makePillButton(headerFrame, "Clear All", "destructive", 84, 26) clearAllBtn['Name'] = "clearAllBtn" clearAllBtn['AnchorPoint'] = Vector2['new'](1, 0.5) clearAllBtn['Position'] = UDim2['new'](1, 0, 0, 16) clearAllBtn['TextSize'] = 13 clearAllBtn['ZIndex'] = 2 local function isWaypointCard(child) return child['Name'] == "waypointCard" and child:IsA("GuiObject") and not child:GetAttribute("Removing") end local emptyState = create("CanvasGroup", { Name = "emptyState", LayoutOrder = 0, BackgroundTransparency = 1, BorderSizePixel = 0, Size = UDim2['new'](1, 0, 0, 150), Parent = waypointScroller, }) local emptyScale = create("UIScale", { Parent = emptyState }) create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 0, 0, 52), Size = UDim2['new'](1, 0, 0, 22), Font = FONT_BOLD, Text = "No waypoints yet", TextColor3 = COLOR_TEXT_SOFT, TextSize = 20, Parent = emptyState, }) create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 0, 0, 78), Size = UDim2['new'](1, 0, 0, 16), Font = FONT_REGULAR, Text = "Press Start in Main and click the world", TextColor3 = COLOR_SECONDARY, TextSize = 14, Parent = emptyState, }) local emptyShown = true local emptyToken = 0 local function setEmptyVisible(visible) if visible == emptyShown then return end emptyShown = visible emptyToken = emptyToken + 1 if visible then emptyState['GroupTransparency'] = 1 emptyScale['Scale'] = 0.96 emptyState['Visible'] = true tween(emptyState, { GroupTransparency = 0 }, 0.3, QUAD, OUT) tween(emptyScale, { Scale = 1 }, 0.45, QUINT, OUT) else emptyState['Visible'] = false end end local function updateVisualCount() local newText = tostring(#waypoints) if countValue['Text'] ~= newText then swapText(countValue, newText) end local last = waypoints[#waypoints] local lastText = last and ("Last: " .. last['coords']) or "No waypoints yet" if lastWaypointLabel['Text'] ~= lastText then swapText(lastWaypointLabel, lastText) end if #waypoints == 0 then task['delay'](0.3, function() if not session.unloaded and #waypoints == 0 then setEmptyVisible(true) end end) else setEmptyVisible(false) end end local CARD_HEIGHT = 58 local CARD_GAP = 8 local function removeCard(slot, delay) if slot:GetAttribute("Removing") then return end slot:SetAttribute("Removing", true) local function run() if not slot['Parent'] then return end local card = slot:FindFirstChild("card") if card then tween(card, { GroupTransparency = 1 }, 0.16, QUAD, OUT) end local collapse = tween(slot, { Size = UDim2['new'](1, 0, 0, 0) }, 0.3, QUINT, INOUT) collapse['Completed']:Connect(function() slot:Destroy() end) end if delay and delay > 0 then task['delay'](delay, run) else run() end end local function removeWaypointData(data) for i, entry in ipairs(waypoints) do if entry == data then table['remove'](waypoints, i) break end end updateVisualCount() end clearAllBtn['MouseButton1Click']:Connect(function() if #waypoints == 0 then notify("Waypoints", "No waypoints to clear", 3, "clearAll") return end table['clear'](waypoints) nextWaypointIndex = 1 updateVisualCount() local i = 0 for _, child in ipairs(waypointScroller:GetChildren()) do if isWaypointCard(child) then removeCard(child, i * 0.04) i = i + 1 end end notify("Waypoints", "All waypoints cleared", 3, "clearAll") end) local waypointList = waypointScroller:FindFirstChildOfClass("UIListLayout") if waypointList then waypointList['Padding'] = UDim['new'](0, 0) end local cardOrder = 0 local function createWaypointCard(data) local waypointName = data['name'] local coords = data['coords'] cardOrder = cardOrder + 1 local slot = create("Frame", { Name = "waypointCard", LayoutOrder = cardOrder, BackgroundTransparency = 1, BorderSizePixel = 0, ClipsDescendants = true, Size = UDim2['new'](1, 0, 0, CARD_HEIGHT + CARD_GAP), Parent = waypointScroller, }) local card = create("CanvasGroup", { Name = "card", Position = UDim2['new'](0, 1, 0, 1), Size = UDim2['new'](1, -2, 0, CARD_HEIGHT), GroupTransparency = 1, Parent = slot, }) glass(card, T_PANEL, CARD_RADIUS) tween(card, { GroupTransparency = 0 }, 0.35, QUAD, OUT) card['MouseEnter']:Connect(function() tween(card, { BackgroundTransparency = T_PANEL_HOVER }, 0.25, QUINT, OUT) end) card['MouseLeave']:Connect(function() tween(card, { BackgroundTransparency = T_PANEL }, 0.35, QUINT, OUT) end) local nameBox = create("TextBox", { Name = "nameBox", BackgroundColor3 = COLOR_GLASS, BackgroundTransparency = 1, BorderSizePixel = 0, Position = UDim2['new'](0, 12, 0, 8), Size = UDim2['new'](1, -244, 0, 22), ClearTextOnFocus = false, Font = FONT_MEDIUM, Text = waypointName, PlaceholderText = "Waypoint name", PlaceholderColor3 = COLOR_TERTIARY, TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Left, TextTruncate = Enum['TextTruncate'].AtEnd, Parent = card, }) corner(8, nameBox) create("UIPadding", { PaddingLeft = UDim['new'](0, 6), PaddingRight = UDim['new'](0, 6), Parent = nameBox, }) local nameStroke = stroke(nameBox, COLOR_STROKE, 1, 1) local nameFocused = false nameBox['MouseEnter']:Connect(function() if not nameFocused then tween(nameBox, { BackgroundTransparency = 0.93 }, 0.18, QUINT, OUT) end end) nameBox['MouseLeave']:Connect(function() if not nameFocused then tween(nameBox, { BackgroundTransparency = 1 }, 0.25, QUINT, OUT) end end) nameBox['Focused']:Connect(function() nameFocused = true nameBox['TextTruncate'] = Enum['TextTruncate'].None tween(nameBox, { BackgroundTransparency = 0.88 }, 0.18, QUINT, OUT) tween(nameStroke, { Transparency = 0.45 }, 0.18, QUINT, OUT) end) nameBox['FocusLost']:Connect(function() nameFocused = false nameBox['TextTruncate'] = Enum['TextTruncate'].AtEnd tween(nameBox, { BackgroundTransparency = 1 }, 0.25, QUINT, OUT) tween(nameStroke, { Transparency = 1 }, 0.25, QUINT, OUT) local newName = string['gsub'](nameBox['Text'], "^%s*(.-)%s*$", "%1") if newName == "" then nameBox['Text'] = data['name'] return end newName = string['sub'](newName, 1, 32) nameBox['Text'] = newName if newName ~= data['name'] then local oldName = data['name'] data['name'] = newName notify("Waypoint renamed", oldName .. " \xe2\x86\x92 " .. newName, 3, "renamed") end end) create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 18, 0, 31), Size = UDim2['new'](1, -240, 0, 16), Font = FONT_MONO, Text = coords, TextColor3 = COLOR_SECONDARY, TextSize = 12, TextXAlignment = Enum['TextXAlignment'].Left, TextTruncate = Enum['TextTruncate'].AtEnd, Parent = card, }) local actionRow = create("Frame", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](1, 0.5), Position = UDim2['new'](1, -14, 0.5, 0), Size = UDim2['new'](0, 210, 0, 28), Parent = card, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, Padding = UDim['new'](0, 6), HorizontalAlignment = Enum['HorizontalAlignment'].Right, VerticalAlignment = Enum['VerticalAlignment'].Center, SortOrder = Enum['SortOrder'].LayoutOrder, Parent = actionRow, }) local copyBtn = makePillButton(actionRow, "Copy", "secondary", 56, 26) copyBtn['Name'] = "copyBtn" copyBtn['LayoutOrder'] = 1 copyBtn['TextSize'] = 13 local copyToken = 0 copyBtn['MouseButton1Click']:Connect(function() local copied = copyToClipboard("Waypoint: (" .. coords .. ")") swapText(copyBtn, copied and "Copied" or "No access") copyToken = copyToken + 1 local myToken = copyToken task['delay'](1.2, function() if myToken == copyToken and copyBtn['Parent'] then swapText(copyBtn, "Copy") end end) end) local tpBtn = makePillButton(actionRow, "Teleport", "primary", 76, 26) tpBtn['Name'] = "teleportBtn" tpBtn['LayoutOrder'] = 2 tpBtn['TextSize'] = 13 tpBtn['MouseButton1Click']:Connect(function() local pos = parseWaypoint(coords) if not pos then return end local char = LocalPlayer['Character'] local root = char and char:FindFirstChild("HumanoidRootPart") if root then root['CFrame'] = CFrame['new'](pos + Vector3['new'](0, 3, 0)) setStatus("Teleported", "Moved to " .. data['name'], nil) notify("Teleported", "Moved to " .. data['name'], 2.5, "teleported") end end) local delBtn = makePillButton(actionRow, "Delete", "destructive", 62, 26) delBtn['Name'] = "deleteBtn" delBtn['LayoutOrder'] = 3 delBtn['TextSize'] = 13 delBtn['MouseButton1Click']:Connect(function() removeWaypointData(data) removeCard(slot) end) return slot end local function addWaypoint(pos) local data = { name = "Waypoint " .. tostring(nextWaypointIndex), coords = string['format']("%.1f, %.1f, %.1f", pos['X'], pos['Y'], pos['Z']), } nextWaypointIndex = nextWaypointIndex + 1 table['insert'](waypoints, data) createWaypointCard(data) updateVisualCount() notify("Waypoint added", data['name'] .. " saved at " .. data['coords'], 2.5, "waypointAdded") return data end local function spawnMarker(pos) if session.unloaded then return end local marker = create("Part", { Name = "WaypointMarker", Size = Vector3['new'](1, 0.1, 1), CFrame = CFrame['new'](pos), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false, Material = Enum['Material'].Neon, Color = COLOR_TEXT, Transparency = 1, Parent = workspace, }) session.markers[marker] = true tween(marker, { Transparency = 0, Size = Vector3['new'](1.6, 0.1, 1.6) }, 0.25, QUINT, OUT) task['delay'](2.4, function() if session.unloaded or not marker['Parent'] then return end local fade = tween(marker, { Transparency = 1, Size = Vector3['new'](0.4, 0.1, 0.4) }, 0.5, QUAD, IN) fade['Completed']:Connect(function() marker:Destroy() session.markers[marker] = nil end) end) end updateVisualCount() local listeningForKey = false runSection(function() local _, settingsScroller = makeScrollPage("Settings") makePageTitle(settingsScroller, "Settings") local function makeSectionLabel(order, text) local lbl = create("TextLabel", { LayoutOrder = order, BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, 16), Font = FONT_BOLD, Text = text, TextColor3 = COLOR_SECONDARY, TextSize = 14, TextXAlignment = Enum['TextXAlignment'].Left, Parent = settingsScroller, }) create("UIPadding", { PaddingLeft = UDim['new'](0, 6), Parent = lbl }) return lbl end makeSectionLabel(2, "Keybind") local keyCard = makeCard(3, 60, settingsScroller) makeLabel(keyCard, "Toggle Menu", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -140, 0, 18) makeLabel(keyCard, "Key that opens and closes the menu", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY).Size = UDim2['new'](1, -140, 0, 16) local keyBtn = makePillButton(keyCard, settings['toggleKey'].Name, "primary", 104, 30) keyBtn['Name'] = "keybindBtn" keyBtn['AnchorPoint'] = Vector2['new'](1, 0.5) keyBtn['Position'] = UDim2['new'](1, -14, 0.5, 0) keyBtn['TextSize'] = 14 listeningForKey = false local keyListenConn = nil local BLOCKED_KEYS = { [Enum['KeyCode'].Unknown] = true, [Enum['KeyCode'].W] = true, [Enum['KeyCode'].A] = true, [Enum['KeyCode'].S] = true, [Enum['KeyCode'].D] = true, [Enum['KeyCode'].Space] = true, [Enum['KeyCode'].Slash] = true, } local function stopListening(newText) task['defer'](function() listeningForKey = false end) if keyListenConn then session:release(keyListenConn) keyListenConn = nil end swapText(keyBtn, newText or settings['toggleKey'].Name) end keyBtn['MouseButton1Click']:Connect(function() if listeningForKey then stopListening() return end listeningForKey = true swapText(keyBtn, "Press a key\xe2\x80\xa6") keyListenConn = session:track(UserInputService['InputBegan']:Connect(function(input) if input['UserInputType'] ~= Enum['UserInputType'].Keyboard then return end if input['KeyCode'] == Enum['KeyCode'].Escape then stopListening() return end if BLOCKED_KEYS[input['KeyCode']] then swapText(keyBtn, "Not allowed") return end settings['toggleKey'] = input['KeyCode'] saveSettings() stopListening(input['KeyCode'].Name) notify("Keybind updated", "Press " .. input['KeyCode'].Name .. " to open and close the menu", 3) end)) end) session:onUnload(function() if keyListenConn then session:release(keyListenConn) end listeningForKey = false end) makeSectionLabel(9, "Notifications") local NOTIFICATION_OPTIONS = { { key = "menuClosed", title = "Menu closed", desc = "Reminder of the keybind when closing" }, { key = "clearAll", title = "Clear All", desc = "When all waypoints are cleared" }, { key = "waypointAdded", title = "Waypoint added", desc = "Every time a waypoint is saved" }, { key = "teleported", title = "Teleported", desc = "When you teleport to a waypoint" }, { key = "renamed", title = "Waypoint renamed", desc = "When a waypoint gets a new name" }, } local ROW_HEIGHT = 54 local COLOR_SWITCH_ON = Color3['fromRGB'](52, 199, 89) local HEADER_HEIGHT = 58 local collapsedHeight = HEADER_HEIGHT local expandedHeight = HEADER_HEIGHT + ROW_HEIGHT * #NOTIFICATION_OPTIONS local notifCard = makeCard(10, collapsedHeight, settingsScroller) local header = create("TextButton", { Name = "notificationsHeader", BackgroundTransparency = 1, AutoButtonColor = false, Text = "", Size = UDim2['new'](1, 0, 0, HEADER_HEIGHT), Parent = notifCard, }) makeLabel(header, "Notification Settings", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -70, 0, 18) local summaryLabel = makeLabel(header, "", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY) summaryLabel['Size'] = UDim2['new'](1, -70, 0, 16) local chevron = create("Frame", { Name = "chevron", AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](1, -30, 0.5, 0), Size = UDim2['new'](0, 16, 0, 16), BackgroundTransparency = 1, Parent = header, }) for _, side in ipairs({ -1, 1 }) do local bar = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0.5, side * 3, 0.5, 0), Size = UDim2['new'](0, 9, 0, 2), Rotation = side * -40, BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.1, BorderSizePixel = 0, Parent = chevron, }) corner(1, bar) end local function refreshSummary() local enabled = 0 for _, option in ipairs(NOTIFICATION_OPTIONS) do if settings['notifications'][option['key']] then enabled = enabled + 1 end end local text = enabled .. " of " .. #NOTIFICATION_OPTIONS .. " enabled" if summaryLabel['Text'] == "" then summaryLabel['Text'] = text elseif summaryLabel['Text'] ~= text then swapText(summaryLabel, text) end end local headerSep = create("Frame", { AnchorPoint = Vector2['new'](0, 1), Position = UDim2['new'](0, 18, 0, HEADER_HEIGHT), Size = UDim2['new'](1, -18, 0, 1), BackgroundColor3 = COLOR_STROKE, BackgroundTransparency = 1, BorderSizePixel = 0, Parent = notifCard, }) local notifRows = {} local expanded = false header['MouseButton1Click']:Connect(function() expanded = not expanded if expanded then for _, row in ipairs(notifRows) do row['Visible'] = true end end local resize = tween(notifCard, { Size = UDim2['new'](1, 0, 0, expanded and expandedHeight or collapsedHeight) }, 0.4, QUINT, OUT) resize['Completed']:Connect(function() if not expanded then for _, row in ipairs(notifRows) do row['Visible'] = false end end end) tween(chevron, { Rotation = expanded and 180 or 0 }, 0.4, QUINT, OUT) tween(headerSep, { BackgroundTransparency = expanded and 0.85 or 1 }, 0.25, QUAD, OUT) end) local function makeSwitch(parent, initial, onChange) local track = create("TextButton", { AnchorPoint = Vector2['new'](1, 0.5), Position = UDim2['new'](1, -16, 0.5, 0), Size = UDim2['new'](0, 46, 0, 28), AutoButtonColor = false, Text = "", Parent = parent, }) glass(track, 0.86, 14, 0.35) local knob = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Size = UDim2['new'](0, 24, 0, 24), BackgroundColor3 = COLOR_TEXT, BorderSizePixel = 0, ZIndex = track['ZIndex'] + 1, Parent = track, }) corner(12, knob) local state = initial local function render(instant) local t = instant and 0 or 0.3 local knobPos = state and UDim2['new'](0, 20, 0.5, 0) or UDim2['new'](0, 2, 0.5, 0) local trackColor = state and COLOR_SWITCH_ON or COLOR_GLASS local trackT = state and 0.15 or 0.86 if instant then knob['Position'] = knobPos track['BackgroundColor3'] = trackColor track['BackgroundTransparency'] = trackT else tween(knob, { Position = knobPos }, t, BACK, OUT) tween(track, { BackgroundColor3 = trackColor, BackgroundTransparency = trackT }, 0.25, QUINT, OUT) end end track['MouseButton1Down']:Connect(function() tween(knob, { Size = UDim2['new'](0, 28, 0, 24) }, 0.12, QUAD, OUT) end) track['MouseButton1Click']:Connect(function() state = not state tween(knob, { Size = UDim2['new'](0, 24, 0, 24) }, 0.25, QUINT, OUT) render(false) onChange(state) end) track['MouseLeave']:Connect(function() tween(knob, { Size = UDim2['new'](0, 24, 0, 24) }, 0.25, QUINT, OUT) end) render(true) return track end for i, option in ipairs(NOTIFICATION_OPTIONS) do local row = create("Frame", { BackgroundTransparency = 1, Position = UDim2['new'](0, 0, 0, HEADER_HEIGHT + (i - 1) * ROW_HEIGHT), Size = UDim2['new'](1, 0, 0, ROW_HEIGHT), Visible = false, Parent = notifCard, }) table['insert'](notifRows, row) makeLabel(row, option['title'], 18, 10, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -90, 0, 18) makeLabel(row, option['desc'], 18, 29, 16, FONT_REGULAR, 13, COLOR_SECONDARY).Size = UDim2['new'](1, -90, 0, 16) makeSwitch(row, settings['notifications'][option['key']], function(on) settings['notifications'][option['key']] = on refreshSummary() saveSettings() end) if i < #NOTIFICATION_OPTIONS then create("Frame", { AnchorPoint = Vector2['new'](0, 1), Position = UDim2['new'](0, 18, 1, 0), Size = UDim2['new'](1, -18, 0, 1), BackgroundColor3 = COLOR_STROKE, BackgroundTransparency = 0.85, BorderSizePixel = 0, Parent = row, }) end end refreshSummary() makeSectionLabel(4, "Appearance") local MIN_T = 0 local MAX_T = 0.95 local appearanceCard = makeCard(5, 78, settingsScroller, true) makeLabel(appearanceCard, "Menu Transparency", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -90, 0, 18) makeLabel(appearanceCard, "How see-through the menu window is", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY).Size = UDim2['new'](1, -90, 0, 16) local valueLabel = create("TextLabel", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, -18, 0, 12), Size = UDim2['new'](0, 60, 0, 18), Font = FONT_BOLD, Text = "0%", TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Right, Parent = appearanceCard, }) local sliderHit = create("TextButton", { Name = "transparencySlider", BackgroundTransparency = 1, AutoButtonColor = false, Text = "", Position = UDim2['new'](0, 18, 0, 50), Size = UDim2['new'](1, -36, 0, 20), Parent = appearanceCard, }) local track = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](1, 0, 0, 6), Parent = sliderHit, }) glass(track, 0.82, 3, 0.45) local fill = create("Frame", { BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.25, BorderSizePixel = 0, Size = UDim2['new'](0, 0, 1, 0), Parent = track, }) corner(3, fill) local knob = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](0, 18, 0, 18), BackgroundColor3 = COLOR_TEXT, BorderSizePixel = 0, ZIndex = 3, Parent = sliderHit, }) corner(9, knob) stroke(knob, Color3['fromRGB'](0, 0, 0), 1, 0.85) local currentAlpha = (GLASS_TRANSPARENCY - MIN_T) / (MAX_T - MIN_T) local targetAlpha = currentAlpha local lastApplied = nil local dragging = false local followConn = nil local function applyAlpha(alpha) local value = MIN_T + alpha * (MAX_T - MIN_T) local rounded = math['floor'](value * 100 + 0.5) / 100 GLASS_TRANSPARENCY = rounded knob['Position'] = UDim2['new'](alpha, 0, 0.5, 0) fill['Size'] = UDim2['new'](alpha, 0, 1, 0) if rounded ~= lastApplied then lastApplied = rounded valueLabel['Text'] = tostring(math['floor'](rounded * 100 + 0.5)) .. "%" mainFrame['BackgroundTransparency'] = rounded end end local function startFollow() if followConn then return end followConn = session:track(RunService['RenderStepped']:Connect(function(dt) local diff = targetAlpha - currentAlpha if math['abs'](diff) < 0.001 then currentAlpha = targetAlpha applyAlpha(currentAlpha) if not dragging then session:release(followConn) followConn = nil end return end currentAlpha = currentAlpha + diff * math['min'](1, dt * 22) applyAlpha(currentAlpha) end)) end local function alphaFromX(x) local left = sliderHit['AbsolutePosition'].X local width = math['max'](sliderHit['AbsoluteSize'].X, 1) return math['clamp']((x - left) / width, 0, 1) end sliderHit['InputBegan']:Connect(function(input) if not isPress(input) then return end dragging = true targetAlpha = alphaFromX(input['Position'].X) startFollow() tween(knob, { Size = UDim2['new'](0, 22, 0, 22) }, 0.15, QUINT, OUT) trackDrag(input, function(moveInput) targetAlpha = alphaFromX(moveInput['Position'].X) end, function() dragging = false tween(knob, { Size = UDim2['new'](0, 18, 0, 18) }, 0.3, BACK, OUT) task['delay'](0.35, saveSettings) end) end) applyAlpha(currentAlpha) session:onUnload(function() if followConn then session:release(followConn) end end) local minimizedCard = makeCard(6, 78, settingsScroller, true) local minimizedTitle = makeLabel(minimizedCard, "Minimized Menu Transparency", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT) minimizedTitle['Size'] = UDim2['new'](1, -90, 0, 18) makeLabel(minimizedCard, "0% keeps the reopen button opaque", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY) local minimizedValue = create("TextLabel", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, -18, 0, 12), Size = UDim2['new'](0, 60, 0, 18), Font = FONT_BOLD, Text = "0%", TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Right, Parent = minimizedCard, }) local minimizedSlider = create("TextButton", { Name = "minimizedMenuTransparencySlider", BackgroundTransparency = 1, AutoButtonColor = false, Text = "", Position = UDim2['new'](0, 18, 0, 50), Size = UDim2['new'](1, -36, 0, 20), Parent = minimizedCard, }) local minimizedTrack = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](1, 0, 0, 6), Parent = minimizedSlider, }) glass(minimizedTrack, 0.82, 3, 0.45) local minimizedFill = create("Frame", { BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.25, BorderSizePixel = 0, Size = UDim2['new'](0, 0, 1, 0), Parent = minimizedTrack, }) corner(3, minimizedFill) local minimizedKnob = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](0, 18, 0, 18), BackgroundColor3 = COLOR_TEXT, BorderSizePixel = 0, ZIndex = 3, Parent = minimizedSlider, }) corner(9, minimizedKnob) stroke(minimizedKnob, Color3['fromRGB'](0, 0, 0), 1, 0.85) local function setMinimizedTransparency(alpha) alpha = math['clamp'](alpha, 0, 1) local rounded = math['floor'](alpha * 95 + 0.5) / 100 local fraction = rounded / 0.95 minimizedFill['Size'] = UDim2['new'](fraction, 0, 1, 0) minimizedKnob['Position'] = UDim2['new'](fraction, 0, 0.5, 0) minimizedValue['Text'] = tostring(math['floor'](rounded * 100 + 0.5)) .. "%" settings['minimizedMenuTransparency'] = rounded local minimizedGui = session.minimizedMenuGui if minimizedGui and minimizedGui:IsA("CanvasGroup") then minimizedGui['BackgroundTransparency'] = rounded end end local function minimizedAlphaFromX(x: number) local left = minimizedSlider['AbsolutePosition'].X local width = math['max'](minimizedSlider['AbsoluteSize'].X, 1) return (x - left) / width end minimizedSlider['InputBegan']:Connect(function(input) if not isPress(input) then return end setMinimizedTransparency(minimizedAlphaFromX(input['Position'].X)) tween(minimizedKnob, { Size = UDim2['new'](0, 22, 0, 22) }, 0.15, QUINT, OUT) trackDrag(input, function(moveInput) setMinimizedTransparency(minimizedAlphaFromX(moveInput['Position'].X)) end, function() tween(minimizedKnob, { Size = UDim2['new'](0, 18, 0, 18) }, 0.3, BACK, OUT) saveSettings() end) end) setMinimizedTransparency(settings['minimizedMenuTransparency'] / 0.95) local notificationCard = makeCard(7, 78, settingsScroller, true) makeLabel(notificationCard, "Notification Transparency", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -90, 0, 18) makeLabel(notificationCard, "0% keeps notifications opaque", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY) local notificationValue = create("TextLabel", { BackgroundTransparency = 1, AnchorPoint = Vector2['new'](1, 0), Position = UDim2['new'](1, -18, 0, 12), Size = UDim2['new'](0, 60, 0, 18), Font = FONT_BOLD, Text = "0%", TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Right, Parent = notificationCard, }) local notificationSlider = create("TextButton", { Name = "notificationTransparencySlider", BackgroundTransparency = 1, AutoButtonColor = false, Text = "", Position = UDim2['new'](0, 18, 0, 50), Size = UDim2['new'](1, -36, 0, 20), Parent = notificationCard, }) local notificationTrack = create("Frame", { AnchorPoint = Vector2['new'](0, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](1, 0, 0, 6), Parent = notificationSlider, }) glass(notificationTrack, 0.82, 3, 0.45) local notificationFill = create("Frame", { BackgroundColor3 = COLOR_TEXT, BackgroundTransparency = 0.25, BorderSizePixel = 0, Size = UDim2['new'](0, 0, 1, 0), Parent = notificationTrack, }) corner(3, notificationFill) local notificationKnob = create("Frame", { AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0, 0, 0.5, 0), Size = UDim2['new'](0, 18, 0, 18), BackgroundColor3 = COLOR_TEXT, BorderSizePixel = 0, ZIndex = 3, Parent = notificationSlider, }) corner(9, notificationKnob) stroke(notificationKnob, Color3['fromRGB'](0, 0, 0), 1, 0.85) local function setNotificationTransparency(alpha) alpha = math['clamp'](alpha, 0, 1) local rounded = math['floor'](alpha * 95 + 0.5) / 100 local fraction = rounded / 0.95 notificationFill['Size'] = UDim2['new'](fraction, 0, 1, 0) notificationKnob['Position'] = UDim2['new'](fraction, 0, 0.5, 0) notificationValue['Text'] = tostring(math['floor'](rounded * 100 + 0.5)) .. "%" if rounded ~= settings['notificationTransparency'] then settings['notificationTransparency'] = rounded session:refreshNotifications() end end local function notificationAlphaFromX(x) local left = notificationSlider['AbsolutePosition'].X local width = math['max'](notificationSlider['AbsoluteSize'].X, 1) return (x - left) / width end notificationSlider['InputBegan']:Connect(function(input) if not isPress(input) then return end setNotificationTransparency(notificationAlphaFromX(input['Position'].X)) tween(notificationKnob, { Size = UDim2['new'](0, 22, 0, 22) }, 0.15, QUINT, OUT) trackDrag(input, function(moveInput) setNotificationTransparency(notificationAlphaFromX(moveInput['Position'].X)) end, function() tween(notificationKnob, { Size = UDim2['new'](0, 18, 0, 18) }, 0.3, BACK, OUT) saveSettings() end) end) setNotificationTransparency(settings['notificationTransparency'] / 0.95) local topbarCard = makeCard(8, 112, settingsScroller, true) makeLabel(topbarCard, "Topbar Buttons", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT) makeLabel(topbarCard, "Choose the window controls", 18, 31, 16, FONT_REGULAR, 13, COLOR_SECONDARY) local topbarChoices = create("Frame", { BackgroundTransparency = 1, Position = UDim2['new'](0, 18, 0, 66), Size = UDim2['new'](1, -36, 0, 34), Parent = topbarCard, }) create("UIListLayout", { FillDirection = Enum['FillDirection'].Horizontal, Padding = UDim['new'](0, 8), SortOrder = Enum['SortOrder'].LayoutOrder, Parent = topbarChoices, }) local styleButtons = {} local function refreshChoices() for style, button in pairs(styleButtons) do local selected = settings['topbarButtons'] == style button['BackgroundTransparency'] = selected and 0.78 or 0.94 button['TextColor3'] = selected and COLOR_TEXT or COLOR_SECONDARY end end for i, style in ipairs({ "Default", "Mac" }) do local button = create("TextButton", { Name = style .. "Style", LayoutOrder = i, Size = UDim2['new'](0.5, -4, 1, 0), AutoButtonColor = false, Text = style, Font = FONT_MEDIUM, TextSize = 14, TextColor3 = COLOR_TEXT, Parent = topbarChoices, }) glass(button, 0.94, 8, 0.48) styleButtons[style] = button button['Activated']:Connect(function() if settings['topbarButtons'] == style then return end settings['topbarButtons'] = style session:refreshTopbarButtons() refreshChoices() saveSettings() end) button['MouseEnter']:Connect(function() tween(button, { BackgroundTransparency = 0.7 }, 0.15, QUAD, OUT) end) button['MouseLeave']:Connect(refreshChoices) end refreshChoices() makeSectionLabel(11, "Session") local unloadCard = makeCard(12, 64, settingsScroller, true) makeLabel(unloadCard, "Unload", 18, 12, 18, FONT_MEDIUM, 15, COLOR_TEXT).Size = UDim2['new'](1, -120, 0, 18) makeLabel(unloadCard, "Stop and remove the GUI", 18, 33, 16, FONT_REGULAR, 13, COLOR_SECONDARY).Size = UDim2['new'](1, -120, 0, 16) local unloadButton = makePillButton(unloadCard, "Unload", "destructive", 96, 32) unloadButton['Name'] = "unloadButton" unloadButton['AnchorPoint'] = Vector2['new'](1, 0.5) unloadButton['Position'] = UDim2['new'](1, -14, 0.5, 0) unloadButton['Activated']:Connect(function() session:unload() end) create("TextLabel", { LayoutOrder = 13, BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 0, 30), Font = FONT_REGULAR, Text = "Waypoint Setter v" .. SCRIPT_VERSION .. " \xc2\xb7 Made by " .. MADE_BY, TextColor3 = COLOR_TERTIARY, TextSize = 14, Parent = settingsScroller, }) end) local waypointsEnterToken = 0 pageEnterCallbacks["Waypoints"] = function() if #waypoints == 0 then return end waypointsEnterToken = waypointsEnterToken + 1 local myToken = waypointsEnterToken titleLbl['TextTransparency'] = 1 titleLbl['Position'] = UDim2['new'](0, 10, 0, 0) tween(titleLbl, { TextTransparency = 0, Position = UDim2['new'](0, 0, 0, 0) }, 0.45, QUINT, OUT) local clearScale = clearAllBtn:FindFirstChildOfClass("UIScale") if clearScale then clearScale['Scale'] = 0.85 tween(clearScale, { Scale = 1 }, 0.45, BACK, OUT) end local slots = {} for _, child in ipairs(waypointScroller:GetChildren()) do if isWaypointCard(child) then table['insert'](slots, child) end end table['sort'](slots, function(x, y) return x['LayoutOrder'] < y['LayoutOrder'] end) for i, slot in ipairs(slots) do local card = slot:FindFirstChild("card") if card then card['GroupTransparency'] = 1 card['Position'] = UDim2['new'](0, 22, 0, 1) task['delay'](0.05 + math['min'](i - 1, 8) * 0.04, function() if myToken ~= waypointsEnterToken or not card['Parent'] then return end tween(card, { GroupTransparency = 0 }, 0.3, QUAD, OUT) tween(card, { Position = UDim2['new'](0, 1, 0, 1) }, 0.5, QUINT, OUT) end) end end end local function setSelected(name, instant) for navName, refresh in pairs(navRefresh) do refresh() end for navName, label in pairs(navLabels) do local color = navName == name and COLOR_TEXT or COLOR_TEXT_SOFT if instant then label['TextColor3'] = color else tween(label, { TextColor3 = color }, 0.25, QUINT, OUT) end end local settingsActive = name == "Settings" if instant then gearBtn['BackgroundTransparency'] = settingsActive and T_ICON_BTN_ACTIVE or T_ICON_BTN else tween(gearBtn, { BackgroundTransparency = settingsActive and T_ICON_BTN_ACTIVE or T_ICON_BTN }, 0.28, QUINT, OUT) end local index = table['find'](navOrder, name) if not index then tween(selectionPill, { GroupTransparency = 1 }, 0.2, QUAD, OUT) return end local targetPos = UDim2['new'](0, 10, 0, (index - 1) * (NAV_ITEM_HEIGHT + NAV_ITEM_GAP)) if instant then selectionPill['Position'] = targetPos selectionPill['GroupTransparency'] = 0 return end if selectionPill['GroupTransparency'] > 0.5 then selectionPill['Position'] = targetPos tween(selectionPill, { GroupTransparency = 0 }, 0.25, QUAD, OUT) else tween(selectionPill, { Position = targetPos }, 0.42, QUINT, OUT) end end local function resetPage(page) page['Visible'] = false page['Position'] = UDim2['new'](0, 0, 0, 0) page['GroupTransparency'] = 0 end local function switchPage(name) if name == currentPageName or not pages[name] then return end local oldPage = pages[currentPageName] local newPage = pages[name] currentPageName = name setSelected(name) for _, page in pairs(pages) do if page ~= oldPage and page ~= newPage then resetPage(page) end end local fadeOut = tween(oldPage, { GroupTransparency = 1, Position = UDim2['new'](0, -10, 0, 0), }, 0.18, QUINT, OUT) fadeOut['Completed']:Connect(function() if pages[currentPageName] ~= oldPage then resetPage(oldPage) end end) if not newPage['Visible'] then newPage['Position'] = UDim2['new'](0, 12, 0, 0) newPage['GroupTransparency'] = 1 newPage['Visible'] = true end tween(newPage, { GroupTransparency = 0, Position = UDim2['new'](0, 0, 0, 0), }, 0.35, QUINT, OUT) if pageEnterCallbacks[name] then pageEnterCallbacks[name]() end end for name, btn in pairs(navButtons) do btn['MouseButton1Click']:Connect(function() switchPage(name) end) end gearBtn['MouseButton1Click']:Connect(function() switchPage("Settings") end) setSelected("Main", true) local miniGroup, isMinimized, isAnimating runSection(function() local MINI_WIDTH = 116 local MINI_HEIGHT = 52 local MINI_SCALE_FROM_MAIN = MINI_HEIGHT / openTargetSize['Y'].Offset miniGroup = create("CanvasGroup", { Name = "reopenButton", AnchorPoint = Vector2['new'](0, 0), Size = UDim2['new'](0, MINI_WIDTH, 0, MINI_HEIGHT), ZIndex = 60, Visible = false, Parent = screenGui, }) session.minimizedMenuGui = miniGroup glass(miniGroup, settings['minimizedMenuTransparency'], 16, 0.2) miniGroup['BackgroundColor3'] = GLASS_TINT local miniScale = create("UIScale", { Parent = miniGroup }) local miniBtn = create("TextButton", { BackgroundTransparency = 1, Size = UDim2['new'](1, 0, 1, 0), AutoButtonColor = false, Text = "", ZIndex = 61, Parent = miniGroup, }) local miniLogo = create("ImageLabel", { Name = "miniLogo", BackgroundTransparency = 1, AnchorPoint = Vector2['new'](0.5, 0.5), Position = UDim2['new'](0, 30, 0.5, 0), Size = UDim2['new'](0, 38, 0, 17), Image = logo['Image'], ImageColor3 = COLOR_TEXT, ScaleType = Enum['ScaleType'].Fit, ZIndex = 62, Visible = hasLogo, Parent = miniBtn, }) if not hasLogo then create("TextLabel", { BackgroundTransparency = 1, Position = UDim2['new'](0, 12, 0, 9), Size = UDim2['new'](0, 36, 0, 34), Font = FONT_BOLD, Text = "W", TextColor3 = COLOR_TEXT, TextSize = 20, ZIndex = 62, Parent = miniBtn, }) end create("TextLabel", { Name = "reopenLabel", BackgroundTransparency = 1, Position = UDim2['new'](0, 57, 0, 0), Size = UDim2['new'](1, -65, 1, 0), Font = FONT_MEDIUM, Text = "Open", TextColor3 = COLOR_TEXT, TextSize = 16, TextXAlignment = Enum['TextXAlignment'].Left, ZIndex = 62, Parent = miniBtn, }) logo:GetPropertyChangedSignal("Image"):Connect(function() if not session.unloaded then miniLogo['Image'] = logo['Image'] end end) isMinimized = false isAnimating = false local miniHovering = false local restorePosition = mainFrame['Position'] local function clampMiniPosition(position) local camera = workspace['CurrentCamera'] if not camera then return position end local viewport = camera['ViewportSize'] local x = viewport['X'] * position['X'].Scale + position['X'].Offset local y = viewport['Y'] * position['Y'].Scale + position['Y'].Offset return UDim2['new'](0, math['clamp'](x, 12, math['max'](12, viewport['X'] - MINI_WIDTH - 12)), 0, math['clamp'](y, 12, math['max'](12, viewport['Y'] - MINI_HEIGHT - 12))) end local camera = workspace['CurrentCamera'] if camera then session:track(camera:GetPropertyChangedSignal("ViewportSize"):Connect(function() if session.unloaded then return end if isMinimized then miniGroup['Position'] = clampMiniPosition(miniGroup['Position']) elseif not isAnimating then mainScale['Scale'] = session:windowScale() end end)) end miniBtn['MouseEnter']:Connect(function() miniHovering = true if not isAnimating then tween(miniScale, { Scale = 1.08 }, 0.3, QUINT, OUT) end end) miniBtn['MouseLeave']:Connect(function() miniHovering = false if not isAnimating then tween(miniScale, { Scale = 1 }, 0.3, QUINT, OUT) end end) local function minimize() if session.unloaded or isMinimized or isAnimating or not mainShown then return end isMinimized = true isAnimating = true restorePosition = mainFrame['Position'] local topLeft = mainFrame['AbsolutePosition'] miniGroup['Position'] = clampMiniPosition(UDim2['new'](0, topLeft['X'], 0, topLeft['Y'])) local p = miniGroup['Position'] local miniCenter = UDim2['new'](0, p['X'].Offset + MINI_WIDTH / 2, 0, p['Y'].Offset + MINI_HEIGHT / 2) local shrink = tween(mainScale, { Scale = MINI_SCALE_FROM_MAIN }, 0.42, QUINT, INOUT) tween(mainFrame, { Position = miniCenter }, 0.42, QUINT, INOUT) tween(mainFrame, { GroupTransparency = 1 }, 0.36, QUAD, IN) task['delay'](0.22, function() if session.unloaded or not isMinimized then return end miniGroup['GroupTransparency'] = 1 miniScale['Scale'] = 0.55 miniGroup['Visible'] = true tween(miniGroup, { GroupTransparency = 0 }, 0.25, QUAD, OUT) tween(miniScale, { Scale = 1 }, 0.5, BACK, OUT) end) local state = shrink['Completed']:Wait() if session.unloaded or state ~= Enum['PlaybackState'].Completed then return end mainFrame['Visible'] = false mainShown = false isAnimating = false end local function restore() if session.unloaded or not isMinimized or isAnimating then return end isMinimized = false isAnimating = true visibilityToken = visibilityToken + 1 local p = miniGroup['Position'] local target = restorePosition local fromCenter = UDim2['new'](0, p['X'].Offset + MINI_WIDTH / 2, 0, p['Y'].Offset + MINI_HEIGHT / 2) tween(miniScale, { Scale = 0.6 }, 0.2, QUINT, IN) local miniFade = tween(miniGroup, { GroupTransparency = 1 }, 0.18, QUAD, IN) miniFade['Completed']:Connect(function(state) if state == Enum['PlaybackState'].Completed and not isMinimized and not session.unloaded then miniGroup['Visible'] = false miniScale['Scale'] = 1 end end) mainFrame['Position'] = fromCenter mainScale['Scale'] = MINI_SCALE_FROM_MAIN mainFrame['GroupTransparency'] = 1 mainFrame['Visible'] = true mainShown = true local regrow = tween(mainScale, { Scale = session:windowScale() }, 0.5, QUINT, OUT) tween(mainFrame, { Position = target }, 0.5, QUINT, OUT) tween(mainFrame, { GroupTransparency = 0 }, 0.3, QUAD, OUT) local state = regrow['Completed']:Wait() if session.unloaded or state ~= Enum['PlaybackState'].Completed then return end isAnimating = false end session.minimize = minimize session.restore = restore toggleBtn['Activated']:Connect(function() task['spawn'](minimize) end) session.topbar.minimize['Activated']:Connect(function() task['spawn'](minimize) end) local miniWasDragged = false miniBtn['Activated']:Connect(function(input) if not miniWasDragged or not isPress(input) then task['spawn'](restore) end end) miniBtn['InputBegan']:Connect(function(input) if not isPress(input) then return end if isAnimating then return end local startPos = input['Position'] local startBtnPos = miniGroup['Position'] miniWasDragged = false local threshold = input['UserInputType'] == Enum['UserInputType'].Touch and 12 or 4 tween(miniScale, { Scale = 0.94 }, 0.12, QUAD, OUT) trackDrag(input, function(moveInput) local delta = moveInput['Position'] - startPos if not miniWasDragged and Vector2['new'](delta['X'], delta['Y']).Magnitude > threshold then miniWasDragged = true tween(miniScale, { Scale = 1.05 }, 0.2, QUINT, OUT) end if miniWasDragged then miniGroup['Position'] = clampMiniPosition(offsetBy(startBtnPos, delta)) end end, function() tween(miniScale, { Scale = miniHovering and 1.08 or 1 }, 0.4, BACK, OUT) end) end) session:onUnload(function() isMinimized = false isAnimating = false end) end) session:track(UserInputService['InputBegan']:Connect(function(input, gameProcessed) if session.unloaded or gameProcessed or isAnimating then return end if listeningForKey then return end if input['KeyCode'] == settings['toggleKey'] then if isMinimized then if session.restore then task['spawn'](session.restore) end elseif mainShown then hideMain() else showMain() end end end)) local function softShadow(obj) if obj:IsA("TextLabel") or obj:IsA("TextButton") then obj['TextStrokeColor3'] = Color3['fromRGB'](20, 26, 38) obj['TextStrokeTransparency'] = 0.8 end end for _, obj in ipairs(screenGui:GetDescendants()) do softShadow(obj) end session:track(screenGui['DescendantAdded']:Connect(softShadow)) local function isPointOverGui(guiObject, point) if not guiObject['Visible'] then return false end local pos = guiObject['AbsolutePosition'] local size = guiObject['AbsoluteSize'] return point['X'] >= pos['X'] and point['X'] <= pos['X'] + size['X'] and point['Y'] >= pos['Y'] and point['Y'] <= pos['Y'] + size['Y'] end session:track(mouse['Button1Down']:Connect(function() if session.unloaded or not waypointRecording then return end if not mainShown and not isMinimized then return end local point = UserInputService:GetMouseLocation() if isPointOverGui(mainFrame, point) or isPointOverGui(miniGroup, point) then return end local target = mouse['Target'] if not target then return end local pos = mouse['Hit'].Position addWaypoint(pos) spawnMarker(pos) end))