-- ═══════════════════════════════════════════════════════ -- KAY'S HUB v1.2 | Full Build | Purple Theme -- ═══════════════════════════════════════════════════════ local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TextChatService = game:GetService("TextChatService") local TeleportService = game:GetService("TeleportService") local Stats = game:GetService("Stats") local Lighting = game:GetService("Lighting") local MarketplaceService = game:GetService("MarketplaceService") local Debris = game:GetService("Debris") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local camera = workspace.CurrentCamera if not camera then workspace:GetPropertyChangedSignal("CurrentCamera"):Wait() camera = workspace.CurrentCamera end if camera.ViewportSize.X == 0 then while camera.ViewportSize.X == 0 do task.wait() end end local ICON_ID = "rbxassetid://97227455427834" local MM2_PLACE_ID = 142823291 local isInMM2 = (game.PlaceId == MM2_PLACE_ID) local MUSIC_FOLDER = "KaysHub/music" local WIN_W = 860 local WIN_H = 530 local SIDE_W = 210 local HDR_H = 52 local ROW_H = 44 local SLD_H = 58 local TXT = 13 local TXT_SM = 11 local TXT_XS = 10 local ICON_BTN_SIZE = 68 local C = { bg = Color3.fromRGB(12, 12, 12), surface = Color3.fromRGB(20, 20, 20), card = Color3.fromRGB(32, 32, 32), cardHov = Color3.fromRGB(40, 40, 40), border = Color3.fromRGB(50, 50, 50), accent = Color3.fromRGB(149, 88, 255), accentDark = Color3.fromRGB(100, 50, 200), accentGlow = Color3.fromRGB(180, 130, 255), text = Color3.fromRGB(235, 235, 235), sub = Color3.fromRGB(140, 140, 140), dim = Color3.fromRGB(80, 80, 80), white = Color3.fromRGB(255, 255, 255), red = Color3.fromRGB(220, 50, 50), green = Color3.fromRGB(80, 220, 120), yellow = Color3.fromRGB(255, 210, 0), } local State = { walkSpeed = 16, jumpPower = 50, flySpeed = 70, infJump = false, flying = false, noclip = false, espOn = false, fullBright = false, clickTp = false, fpsCap = 60, gravity = 196, fov = 70, spinOn = false, spinSpeed = 2000, invisible = false, dmgEnabled = false, infDmg = false, customDmg = 50, } local Connections = {} local function track(c) Connections[#Connections + 1] = c return c end local function cleanAll() for _, c in ipairs(Connections) do pcall(function() c:Disconnect() end) end Connections = {} end local function tween(obj, t, props, style, dir) TweenService:Create( obj, TweenInfo.new(t, style or Enum.EasingStyle.Quad, dir or Enum.EasingDirection.Out), props ):Play() end local function corner(p, r) local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, r or 8) c.Parent = p return c end local function stroke(p, col, th, tr) local s = Instance.new("UIStroke") s.Color = col or C.border s.Thickness = th or 1 s.Transparency = tr or 0 s.Parent = p return s end local function newFrame(parent, props) local f = Instance.new("Frame") f.BorderSizePixel = 0 for k, v in pairs(props or {}) do f[k] = v end f.Parent = parent return f end local function newLabel(parent, props) local l = Instance.new("TextLabel") l.BorderSizePixel = 0 l.BackgroundTransparency = 1 for k, v in pairs(props or {}) do l[k] = v end l.Parent = parent return l end local function newButton(parent, props) local b = Instance.new("TextButton") b.BorderSizePixel = 0 b.AutoButtonColor = false for k, v in pairs(props or {}) do b[k] = v end b.Parent = parent return b end local function sendChat(text) if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then pcall(function() TextChatService.TextChannels.RBXGeneral:SendAsync(text) end) else pcall(function() game:GetService("ReplicatedStorage") :WaitForChild("DefaultChatSystemChatEvents") :WaitForChild("SayMessageRequest") :FireServer(text, "All") end) end end local hubGui = Instance.new("ScreenGui") hubGui.Name = "KaysHub" hubGui.ResetOnSpawn = false hubGui.IgnoreGuiInset = true hubGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling hubGui.Parent = playerGui local toastQueue = {} local toastActive = false local function showToast(title, body, duration) duration = duration or 3.5 table.insert(toastQueue, { title = title, body = body, duration = duration }) if toastActive then return end toastActive = true task.spawn(function() while #toastQueue > 0 do local d = table.remove(toastQueue, 1) local f = newFrame(hubGui, { Size = UDim2.fromOffset(290, 64), Position = UDim2.new(1, 10, 1, -80), AnchorPoint = Vector2.new(1, 1), BackgroundColor3 = C.card, ZIndex = 500, }) corner(f, 10) stroke(f, C.accent, 1.5, 0) local bar = newFrame(f, { Size = UDim2.fromOffset(4, 44), Position = UDim2.fromOffset(10, 10), BackgroundColor3 = C.accent, ZIndex = 501, }) corner(bar, 2) local ico = Instance.new("ImageLabel") ico.Size = UDim2.fromOffset(26, 26) ico.Position = UDim2.fromOffset(22, 19) ico.BackgroundTransparency = 1 ico.Image = ICON_ID ico.ScaleType = Enum.ScaleType.Crop ico.ZIndex = 501 ico.Parent = f corner(ico, 6) newLabel(f, { Position = UDim2.fromOffset(56, 11), Size = UDim2.new(1, -66, 0, 18), Text = d.title, Font = Enum.Font.GothamBold, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 501, }) newLabel(f, { Position = UDim2.fromOffset(56, 30), Size = UDim2.new(1, -66, 0, 14), Text = d.body, Font = Enum.Font.Gotham, TextSize = TXT_SM, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 501, }) tween(f, 0.35, { Position = UDim2.new(1, -10, 1, -80) }, Enum.EasingStyle.Back) task.wait(d.duration) tween(f, 0.25, { Position = UDim2.new(1, 310, 1, -80) }) task.wait(0.28) f:Destroy() end toastActive = false end) end local iconOuter = newFrame(hubGui, { Size = UDim2.fromOffset(ICON_BTN_SIZE, ICON_BTN_SIZE), Position = UDim2.fromOffset(24, 24), BackgroundColor3 = C.accent, ZIndex = 300, Visible = false, }) corner(iconOuter, 16) local iconInner = newFrame(iconOuter, { Size = UDim2.new(1, -4, 1, -4), Position = UDim2.fromOffset(2, 2), BackgroundColor3 = C.bg, ClipsDescendants = true, ZIndex = 301, }) corner(iconInner, 14) local iconImg = Instance.new("ImageLabel") iconImg.Size = UDim2.fromScale(1, 1) iconImg.BackgroundTransparency = 1 iconImg.Image = ICON_ID iconImg.ScaleType = Enum.ScaleType.Crop iconImg.ZIndex = 302 iconImg.Parent = iconInner local iconHitbox = newButton(iconOuter, { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", ZIndex = 310, }) local iDrag, iMoved, iDS, iSP = false, false, nil, nil iconHitbox.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then iDrag = true iMoved = false iDS = i.Position iSP = iconOuter.Position end end) UserInputService.InputChanged:Connect(function(i) if not iDrag then return end if i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch then local d = i.Position - iDS if math.abs(d.X) > 4 or math.abs(d.Y) > 4 then iMoved = true end iconOuter.Position = UDim2.fromOffset(iSP.X.Offset + d.X, iSP.Y.Offset + d.Y) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then iDrag = false end end) local winOuter = newFrame(hubGui, { Size = UDim2.fromOffset(WIN_W, WIN_H), Position = UDim2.fromScale(0.5, 0.5), AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = C.bg, ZIndex = 10, ClipsDescendants = true, }) corner(winOuter, 10) stroke(winOuter, C.accent, 1.5, 0) local header = newFrame(winOuter, { Size = UDim2.new(1, 0, 0, HDR_H), BackgroundColor3 = C.surface, ZIndex = 11, }) corner(header, 10) newFrame(header, { Size = UDim2.new(1, 0, 0, 10), Position = UDim2.new(0, 0, 1, -10), BackgroundColor3 = C.surface, ZIndex = 11, }) newFrame(header, { Size = UDim2.new(1, 0, 0, 2), Position = UDim2.new(0, 0, 1, -2), BackgroundColor3 = C.accent, ZIndex = 12, }) local hdrIcon = newFrame(header, { Size = UDim2.fromOffset(36, 36), Position = UDim2.fromOffset(12, 8), BackgroundColor3 = C.accent, ZIndex = 12, }) corner(hdrIcon, 9) local hIco = Instance.new("ImageLabel") hIco.Size = UDim2.fromScale(1, 1) hIco.BackgroundTransparency = 1 hIco.Image = ICON_ID hIco.ScaleType = Enum.ScaleType.Crop hIco.ZIndex = 13 hIco.Parent = hdrIcon corner(hIco, 9) newLabel(header, { Position = UDim2.fromOffset(56, 10), Size = UDim2.fromOffset(160, 22), Text = "KAY'S HUB", Font = Enum.Font.GothamBold, TextSize = 16, TextColor3 = C.white, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 12, }) newLabel(header, { Position = UDim2.fromOffset(56, 32), Size = UDim2.fromOffset(160, 14), Text = "v1.2", Font = Enum.Font.Gotham, TextSize = TXT_XS, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 12, }) local hdrCenter = newLabel(header, { Position = UDim2.fromScale(0.5, 0), Size = UDim2.new(0, 300, 1, 0), AnchorPoint = Vector2.new(0.5, 0), Text = "Loading...", Font = Enum.Font.Gotham, TextSize = TXT_SM, TextColor3 = C.sub, ZIndex = 12, }) task.spawn(function() pcall(function() local info = MarketplaceService:GetProductInfo(game.PlaceId) if info and info.Name then hdrCenter.Text = info.Name end end) end) local function mkHdrBtn(symbol, col, xOff) local btn = newButton(header, { Size = UDim2.fromOffset(28, 28), Position = UDim2.new(1, xOff, 0.5, -14), BackgroundColor3 = col, Text = symbol, Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = C.white, ZIndex = 13, }) corner(btn, 7) btn.MouseEnter:Connect(function() tween(btn, 0.1, { BackgroundTransparency = 0.35 }) end) btn.MouseLeave:Connect(function() tween(btn, 0.1, { BackgroundTransparency = 0 }) end) return btn end local closeBtn = mkHdrBtn("X", C.red, -12) local minBtn = mkHdrBtn("-", Color3.fromRGB(60, 60, 70), -46) local hDrag, hDS, hSP = false, nil, nil header.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then hDrag = true hDS = i.Position hSP = winOuter.Position i.Changed:Connect(function() if i.UserInputState == Enum.UserInputState.End then hDrag = false end end) end end) UserInputService.InputChanged:Connect(function(i) if not hDrag then return end if i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch then local d = i.Position - hDS winOuter.Position = UDim2.new(hSP.X.Scale, hSP.X.Offset + d.X, hSP.Y.Scale, hSP.Y.Offset + d.Y) end end) local function showWindow() iconOuter.Visible = false winOuter.Visible = true end local function hideWindow() tween(winOuter, 0.15, { Size = UDim2.fromOffset(WIN_W, 0) }) task.wait(0.17) winOuter.Visible = false winOuter.Size = UDim2.fromOffset(WIN_W, WIN_H) local vps = camera.ViewportSize iconOuter.Position = UDim2.fromOffset(math.floor(vps.X / 2) - ICON_BTN_SIZE / 2, 28) iconOuter.Size = UDim2.fromOffset(30, 30) iconOuter.Visible = true tween(iconOuter, 0.35, { Size = UDim2.fromOffset(ICON_BTN_SIZE, ICON_BTN_SIZE) }, Enum.EasingStyle.Back) end closeBtn.MouseButton1Click:Connect(function() tween(winOuter, 0.2, { Size = UDim2.fromOffset(WIN_W, 0) }) task.delay(0.22, function() cleanAll() hubGui:Destroy() end) end) minBtn.MouseButton1Click:Connect(function() task.spawn(hideWindow) end) iconHitbox.MouseButton1Click:Connect(function() if iMoved then iMoved = false return end tween(iconOuter, 0.07, { Size = UDim2.fromOffset(ICON_BTN_SIZE + 8, ICON_BTN_SIZE + 8) }) task.wait(0.08) tween(iconOuter, 0.2, { Size = UDim2.fromOffset(ICON_BTN_SIZE, ICON_BTN_SIZE) }, Enum.EasingStyle.Back) task.wait(0.1) showWindow() end) track(UserInputService.InputBegan:Connect(function(i, gp) if gp then return end if i.KeyCode == Enum.KeyCode.RightShift then if winOuter.Visible then task.spawn(hideWindow) else showWindow() end end end)) local body = newFrame(winOuter, { Size = UDim2.new(1, 0, 1, -HDR_H), Position = UDim2.fromOffset(0, HDR_H), BackgroundColor3 = C.bg, ZIndex = 11, }) local sidebar = newFrame(body, { Size = UDim2.new(0, SIDE_W, 1, 0), BackgroundColor3 = C.surface, ZIndex = 12, }) newFrame(sidebar, { Size = UDim2.new(0, 1, 1, 0), Position = UDim2.new(1, -1, 0, 0), BackgroundColor3 = C.accent, ZIndex = 13, }) local sideScroll = Instance.new("ScrollingFrame") sideScroll.Size = UDim2.new(1, 0, 1, -12) sideScroll.Position = UDim2.fromOffset(0, 6) sideScroll.BackgroundTransparency = 1 sideScroll.BorderSizePixel = 0 sideScroll.ScrollBarThickness = 0 sideScroll.CanvasSize = UDim2.new(0, 0, 0, 0) sideScroll.AutomaticCanvasSize = Enum.AutomaticSize.Y sideScroll.ZIndex = 13 sideScroll.Parent = sidebar local sLayout = Instance.new("UIListLayout") sLayout.Padding = UDim.new(0, 2) sLayout.SortOrder = Enum.SortOrder.LayoutOrder sLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center sLayout.Parent = sideScroll local sPad = Instance.new("UIPadding") sPad.PaddingTop = UDim.new(0, 8) sPad.PaddingLeft = UDim.new(0, 10) sPad.PaddingRight = UDim.new(0, 10) sPad.Parent = sideScroll local content = newFrame(body, { Size = UDim2.new(1, -SIDE_W, 1, 0), Position = UDim2.fromOffset(SIDE_W, 0), BackgroundColor3 = C.bg, ClipsDescendants = true, ZIndex = 12, }) local TABS = { { name = "Home", icon = "H" }, { name = "Player", icon = "P" }, { name = "Visuals", icon = "V" }, { name = "World", icon = "W" }, { name = "Misc", icon = "M" }, { name = "Music", icon = "U" }, { name = "Shaders", icon = "S" }, { name = "Settings", icon = "T" }, } if isInMM2 then table.insert(TABS, 6, { name = "MM2", icon = "K" }) end local activeTab = nil local tabPages = {} local tabBtns = {} for i, def in ipairs(TABS) do local btn = newButton(sideScroll, { Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = C.surface, Text = "", ZIndex = 14, LayoutOrder = i, }) corner(btn, 8) local acBar = newFrame(btn, { Size = UDim2.fromOffset(3, 24), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 0, 0.5, 0), BackgroundColor3 = C.accent, BackgroundTransparency = 1, ZIndex = 15, }) corner(acBar, 2) newLabel(btn, { Position = UDim2.fromOffset(14, 0), Size = UDim2.fromOffset(24, 42), Text = def.icon, Font = Enum.Font.GothamBold, TextSize = 16, TextColor3 = C.sub, ZIndex = 15, }) local lbl = newLabel(btn, { Position = UDim2.fromOffset(44, 0), Size = UDim2.new(1, -52, 1, 0), Text = def.name, Font = Enum.Font.GothamSemibold, TextSize = TXT, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local page = Instance.new("ScrollingFrame") page.Size = UDim2.fromScale(1, 1) page.BackgroundTransparency = 1 page.BorderSizePixel = 0 page.ScrollBarThickness = 3 page.ScrollBarImageColor3 = C.accent page.CanvasSize = UDim2.new(0, 0, 0, 0) page.Visible = false page.ZIndex = 13 page.Parent = content local pLayout = Instance.new("UIListLayout") pLayout.Padding = UDim.new(0, 6) pLayout.SortOrder = Enum.SortOrder.LayoutOrder pLayout.Parent = page local pPad = Instance.new("UIPadding") pPad.PaddingTop = UDim.new(0, 14) pPad.PaddingLeft = UDim.new(0, 14) pPad.PaddingRight = UDim.new(0, 14) pPad.PaddingBottom = UDim.new(0, 14) pPad.Parent = page pLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() page.CanvasSize = UDim2.fromOffset(0, pLayout.AbsoluteContentSize.Y + 28) end) tabPages[def.name] = page tabBtns[def.name] = { btn = btn, bar = acBar, lbl = lbl, } btn.MouseButton1Click:Connect(function() if activeTab == def.name then return end if activeTab then tabPages[activeTab].Visible = false local o = tabBtns[activeTab] tween(o.btn, 0.12, { BackgroundColor3 = C.surface }) tween(o.lbl, 0.12, { TextColor3 = C.sub }) tween(o.bar, 0.12, { BackgroundTransparency = 1 }) end activeTab = def.name tabPages[def.name].Visible = true tween(btn, 0.12, { BackgroundColor3 = C.card }) tween(lbl, 0.12, { TextColor3 = C.accentGlow }) tween(acBar, 0.12, { BackgroundTransparency = 0 }) end) btn.MouseEnter:Connect(function() if activeTab ~= def.name then tween(btn, 0.08, { BackgroundColor3 = C.cardHov }) end end) btn.MouseLeave:Connect(function() if activeTab ~= def.name then tween(btn, 0.08, { BackgroundColor3 = C.surface }) end end) end do local f = TABS[1].name activeTab = f tabPages[f].Visible = true tabBtns[f].btn.BackgroundColor3 = C.card tabBtns[f].lbl.TextColor3 = C.accentGlow tabBtns[f].bar.BackgroundTransparency = 0 end local function addSection(page, text, order) local row = newFrame(page, { Size = UDim2.new(1, 0, 0, 28), BackgroundTransparency = 1, LayoutOrder = order or 0, ZIndex = 14, }) local bar = newFrame(row, { Size = UDim2.fromOffset(3, 18), Position = UDim2.fromOffset(0, 5), BackgroundColor3 = C.accent, ZIndex = 15, }) corner(bar, 2) newLabel(row, { Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -10, 1, 0), Text = string.upper(text), Font = Enum.Font.GothamBold, TextSize = TXT_XS, TextColor3 = C.accent, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) return row end local function makeCard(page, h, order) local card = newFrame(page, { Size = UDim2.new(1, 0, 0, h or ROW_H), BackgroundColor3 = C.card, LayoutOrder = order or 0, ZIndex = 14, }) corner(card, 8) return card end local function addToggle(page, labelText, order, callback) local card = makeCard(page, ROW_H, order) newLabel(card, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(0.65, 0, 1, 0), Text = labelText, Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local pill = newFrame(card, { Size = UDim2.fromOffset(42, 22), Position = UDim2.new(1, -54, 0.5, -11), BackgroundColor3 = C.border, ZIndex = 15, }) corner(pill, 11) local knob = newFrame(pill, { Size = UDim2.fromOffset(16, 16), Position = UDim2.fromOffset(3, 3), BackgroundColor3 = C.dim, ZIndex = 16, }) corner(knob, 8) local state = false local hit = newButton(pill, { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", ZIndex = 17, }) hit.MouseButton1Click:Connect(function() state = not state if state then tween(knob, 0.18, { Position = UDim2.fromOffset(23, 3), BackgroundColor3 = C.white }) tween(pill, 0.18, { BackgroundColor3 = C.accent }) else tween(knob, 0.18, { Position = UDim2.fromOffset(3, 3), BackgroundColor3 = C.dim }) tween(pill, 0.18, { BackgroundColor3 = C.border }) end if callback then callback(state) end end) return card end local function addSlider(page, labelText, order, min, max, default, suffix, callback) local card = makeCard(page, SLD_H, order) newLabel(card, { Position = UDim2.fromOffset(14, 8), Size = UDim2.new(0.6, 0, 0, 18), Text = labelText, Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local valLbl = newLabel(card, { Position = UDim2.new(0.6, 0, 0, 8), Size = UDim2.new(0.38, 0, 0, 18), Text = tostring(default) .. (suffix or ""), Font = Enum.Font.GothamBold, TextSize = TXT_SM, TextColor3 = C.accentGlow, TextXAlignment = Enum.TextXAlignment.Right, ZIndex = 15, }) local trk = newFrame(card, { Size = UDim2.new(1, -28, 0, 4), Position = UDim2.new(0, 14, 1, -16), BackgroundColor3 = C.border, ZIndex = 15, }) corner(trk, 3) local fill = newFrame(trk, { Size = UDim2.fromScale((default - min) / (max - min), 1), BackgroundColor3 = C.accent, ZIndex = 16, }) corner(fill, 3) local knob = newFrame(trk, { Size = UDim2.fromOffset(13, 13), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale((default - min) / (max - min), 0.5), BackgroundColor3 = C.white, ZIndex = 17, }) corner(knob, 7) local dragging = false local function update(pos) local rel = math.clamp((pos.X - trk.AbsolutePosition.X) / trk.AbsoluteSize.X, 0, 1) local val = math.round(min + rel * (max - min)) fill.Size = UDim2.fromScale(rel, 1) knob.Position = UDim2.fromScale(rel, 0.5) valLbl.Text = tostring(val) .. (suffix or "") if callback then callback(val) end end local sBtn = newButton(trk, { Size = UDim2.new(1, 0, 6, 0), Position = UDim2.new(0, 0, -2.5, 0), BackgroundTransparency = 1, Text = "", ZIndex = 18, }) sBtn.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true update(i.Position) end end) UserInputService.InputChanged:Connect(function(i) if not dragging then return end if i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch then update(i.Position) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = false end end) return card end local function addButton(page, labelText, order, callback) local card = makeCard(page, ROW_H, order) newLabel(card, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -50, 1, 0), Text = labelText, Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) newLabel(card, { Position = UDim2.new(1, -32, 0, 0), Size = UDim2.fromOffset(24, ROW_H), Text = ">", Font = Enum.Font.GothamBold, TextSize = 20, TextColor3 = C.accent, ZIndex = 15, }) local hit = newButton(card, { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", ZIndex = 16, }) hit.MouseButton1Click:Connect(function() tween(card, 0.06, { BackgroundColor3 = C.accentDark }) task.delay(0.12, function() tween(card, 0.18, { BackgroundColor3 = C.card }) end) if callback then callback() end end) hit.MouseEnter:Connect(function() tween(card, 0.08, { BackgroundColor3 = C.cardHov }) end) hit.MouseLeave:Connect(function() tween(card, 0.08, { BackgroundColor3 = C.card }) end) return card end local function addInfo(page, text, order, col) local card = makeCard(page, 0, order) card.AutomaticSize = Enum.AutomaticSize.Y local pad = Instance.new("UIPadding") pad.Parent = card pad.PaddingTop = UDim.new(0, 10) pad.PaddingBottom = UDim.new(0, 10) pad.PaddingLeft = UDim.new(0, 14) pad.PaddingRight = UDim.new(0, 14) newLabel(card, { Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, Text = text, Font = Enum.Font.Gotham, TextSize = TXT_SM, TextColor3 = col or C.sub, TextXAlignment = Enum.TextXAlignment.Left, TextWrapped = true, ZIndex = 15, }) return card end local function addStatCard(parent, labelText, initialVal, accentCol) local card = newFrame(parent, { Size = UDim2.new(0.48, 0, 1, 0), BackgroundColor3 = C.card, ZIndex = 15, }) corner(card, 10) local topBar = newFrame(card, { Size = UDim2.new(1, 0, 0, 3), BackgroundColor3 = accentCol or C.accent, ZIndex = 16, }) corner(topBar, 2) newLabel(card, { Position = UDim2.fromOffset(12, 10), Size = UDim2.new(1, -12, 0, 14), Text = string.upper(labelText), Font = Enum.Font.GothamBold, TextSize = TXT_XS, TextColor3 = accentCol or C.accent, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 16, }) local valLbl = newLabel(card, { Position = UDim2.fromOffset(12, 26), Size = UDim2.new(1, -12, 0, 28), Text = tostring(initialVal), Font = Enum.Font.GothamBold, TextSize = 22, TextColor3 = C.white, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 16, }) return card, valLbl end local homePage = tabPages["Home"] addSection(homePage, "KAY'S HUB", 1) local wc = makeCard(homePage, 0, 2) wc.AutomaticSize = Enum.AutomaticSize.Y local wcPad = Instance.new("UIPadding") wcPad.Parent = wc wcPad.PaddingTop = UDim.new(0, 12) wcPad.PaddingBottom = UDim.new(0, 12) wcPad.PaddingLeft = UDim.new(0, 14) wcPad.PaddingRight = UDim.new(0, 14) newLabel(wc, { Size = UDim2.new(1, 0, 0, 18), Text = "Welcome, " .. player.Name .. "!", Font = Enum.Font.GothamBold, TextSize = 15, TextColor3 = C.white, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) newLabel(wc, { Position = UDim2.fromOffset(0, 22), Size = UDim2.new(1, 0, 0, 14), Text = "Kay's Hub loaded | RightShift to toggle", Font = Enum.Font.Gotham, TextSize = TXT_XS, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) addSection(homePage, "Live Stats", 10) local statsHolder = newFrame(homePage, { Size = UDim2.new(1, 0, 0, 72), BackgroundTransparency = 1, LayoutOrder = 11, ZIndex = 14, }) local sl = Instance.new("UIListLayout") sl.FillDirection = Enum.FillDirection.Horizontal sl.HorizontalAlignment = Enum.HorizontalAlignment.Left sl.VerticalAlignment = Enum.VerticalAlignment.Center sl.Padding = UDim.new(0, 10) sl.Parent = statsHolder local _, fpsVal = addStatCard(statsHolder, "FPS", "...", C.accent) local _, pingVal = addStatCard(statsHolder, "PING (ms)", "...", Color3.fromRGB(80, 200, 180)) do local frames, last = 0, os.clock() track(RunService.RenderStepped:Connect(function() frames = frames + 1 if os.clock() - last >= 1 then fpsVal.Text = tostring(frames) frames = 0 last = os.clock() end local ping = 0 pcall(function() ping = math.floor(Stats.Network.ServerStatsItem["Data Ping"]:GetValue()) end) pingVal.Text = tostring(ping) end)) end addSection(homePage, "Quick Actions", 20) addButton(homePage, "Copy Username", 21, function() if setclipboard then setclipboard(player.Name) end showToast("Copied", "Username copied.") end) addButton(homePage, "Rejoin Server", 22, function() showToast("Rejoining", "Reconnecting...") task.delay(1.2, function() TeleportService:Teleport(game.PlaceId, player) end) end) addButton(homePage, "Reset Character", 23, function() local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if h then h.Health = 0 end showToast("Reset", "Character reset.") end) local pPage = tabPages["Player"] addSection(pPage, "Movement", 1) addSlider(pPage, "Walk Speed", 2, 0, 300, 16, " spd", function(val) State.walkSpeed = val local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if h then h.WalkSpeed = val end end) addSlider(pPage, "Jump Power", 3, 0, 500, 50, " jp", function(val) State.jumpPower = val local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if h then h.UseJumpPower = true h.JumpPower = val end end) addToggle(pPage, "Infinite Jump", 4, function(state) State.infJump = state end) track(UserInputService.JumpRequest:Connect(function() if State.infJump and player.Character then local h = player.Character:FindFirstChildOfClass("Humanoid") if h then h:ChangeState(Enum.HumanoidStateType.Jumping) end end end)) addSection(pPage, "Fly", 10) local flyBV, flyBG, flyConn = nil, nil, nil local function stopFly() State.flying = false if flyConn then flyConn:Disconnect() flyConn = nil end if flyBV then flyBV:Destroy() flyBV = nil end if flyBG then flyBG:Destroy() flyBG = nil end local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if h then h:ChangeState(Enum.HumanoidStateType.GettingUp) end end local function startFly() local char = player.Character or player.CharacterAdded:Wait() local hum = char:WaitForChild("Humanoid") local root = char:WaitForChild("HumanoidRootPart") hum:ChangeState(Enum.HumanoidStateType.Physics) flyBV = Instance.new("BodyVelocity") flyBV.MaxForce = Vector3.new(1e9, 1e9, 1e9) flyBV.Parent = root flyBG = Instance.new("BodyGyro") flyBG.MaxTorque = Vector3.new(1e9, 1e9, 1e9) flyBG.P = 1e6 flyBG.Parent = root flyConn = RunService.RenderStepped:Connect(function() if not State.flying then return end flyBG.CFrame = CFrame.new(root.Position, root.Position + camera.CFrame.LookVector) local md = hum.MoveDirection local cf = camera.CFrame local fwd = Vector3.new(cf.LookVector.X, 0, cf.LookVector.Z).Unit local rgt = Vector3.new(cf.RightVector.X, 0, cf.RightVector.Z).Unit local hv = (fwd * md:Dot(fwd) + rgt * md:Dot(rgt)) * State.flySpeed local vv = 0 if UserInputService:IsKeyDown(Enum.KeyCode.Space) then vv = State.flySpeed elseif UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then vv = -State.flySpeed end if math.abs(md:Dot(fwd)) > 0.05 then vv = cf.LookVector.Y * md:Dot(fwd) * State.flySpeed end flyBV.Velocity = Vector3.new(hv.X, vv, hv.Z) end) end addToggle(pPage, "Fly", 11, function(state) State.flying = state if state then startFly() else stopFly() end end) addSlider(pPage, "Fly Speed", 12, 10, 250, 70, " spd", function(val) State.flySpeed = val end) addSection(pPage, "Character", 20) addToggle(pPage, "Noclip", 21, function(state) State.noclip = state end) track(RunService.Stepped:Connect(function() if State.noclip and player.Character then for _, p in player.Character:GetDescendants() do if p:IsA("BasePart") then p.CanCollide = false end end end end)) local spinAV, spinAtt = nil, nil addToggle(pPage, "Spin / Fling", 22, function(state) State.spinOn = state if state then local char = player.Character or player.CharacterAdded:Wait() local hrp = char:WaitForChild("HumanoidRootPart") spinAtt = Instance.new("Attachment") spinAtt.Parent = hrp spinAV = Instance.new("AngularVelocity") spinAV.Attachment0 = spinAtt spinAV.AngularVelocity = Vector3.new(0, State.spinSpeed, 0) spinAV.MaxTorque = math.huge spinAV.RelativeTo = Enum.ActuatorRelativeTo.World spinAV.Parent = hrp else if spinAV then spinAV:Destroy() spinAV = nil end if spinAtt then spinAtt:Destroy() spinAtt = nil end end end) addSlider(pPage, "Spin Speed", 23, 100, 10000, 2000, " rpm", function(val) State.spinSpeed = val if spinAV then spinAV.AngularVelocity = Vector3.new(0, val, 0) end end) addSection(pPage, "Combat", 30) local dmgConnections = {} local hookedHumanoids = {} local function cleanDmg() for _, c in ipairs(dmgConnections) do pcall(function() c:Disconnect() end) end dmgConnections = {} hookedHumanoids = {} end local function applyDmg(hum) if not hum or not hum.Parent then return end local model = hum.Parent if model == player.Character then return end local tp = Players:GetPlayerFromCharacter(model) if tp and tp.Team == player.Team and player.Team ~= nil then return end pcall(function() if State.infDmg then hum.Health = 0 elseif State.dmgEnabled then hum.Health = math.max(0, hum.Health - State.customDmg) end end) end local function hookHumanoid(hum) if hookedHumanoids[hum] then return end hookedHumanoids[hum] = true local prev = hum.Health local c = hum.HealthChanged:Connect(function(newHP) if newHP < prev and newHP > 0 then if State.dmgEnabled or State.infDmg then applyDmg(hum) end end prev = newHP end) dmgConnections[#dmgConnections + 1] = c end local function hookAllHumanoids() for _, d in workspace:GetDescendants() do if d:IsA("Humanoid") then hookHumanoid(d) end end end local function hookTool(tool) if not tool then return end local handle = tool:FindFirstChild("Handle") if not handle then return end local c = handle.Touched:Connect(function(hit) if not (State.dmgEnabled or State.infDmg) then return end local model = hit:FindFirstAncestorOfClass("Model") if not model then return end if model == player.Character then return end local hum = model:FindFirstChildOfClass("Humanoid") if hum and hum.Health > 0 then applyDmg(hum) end end) dmgConnections[#dmgConnections + 1] = c end local function setupCharDmg(char) local c = char.ChildAdded:Connect(function(child) if child:IsA("Tool") then hookTool(child) end end) dmgConnections[#dmgConnections + 1] = c for _, ch in ipairs(char:GetChildren()) do if ch:IsA("Tool") then hookTool(ch) end end end track(workspace.DescendantAdded:Connect(function(d) if d:IsA("Humanoid") then task.wait(0.05) if State.dmgEnabled or State.infDmg then hookHumanoid(d) end end end)) track(player.CharacterAdded:Connect(function(char) task.wait(0.2) hookedHumanoids = {} if State.dmgEnabled or State.infDmg then hookAllHumanoids() setupCharDmg(char) end end)) addSlider(pPage, "Damage Amount", 31, 1, 500, 50, " hp", function(val) State.customDmg = val end) addToggle(pPage, "Custom Damage", 32, function(state) State.dmgEnabled = state if state then State.infDmg = false hookAllHumanoids() if player.Character then setupCharDmg(player.Character) end else if not State.infDmg then cleanDmg() end end end) addToggle(pPage, "Infinite Damage (1-Hit)", 33, function(state) State.infDmg = state if state then State.dmgEnabled = false hookAllHumanoids() if player.Character then setupCharDmg(player.Character) end else if not State.dmgEnabled then cleanDmg() end end end) addInfo(pPage, "Works when the game allows player or NPC damage. Triggers on any hit that lands.", 34, Color3.fromRGB(90, 120, 150)) local vPage = tabPages["Visuals"] addSection(vPage, "ESP", 1) local espObjs = {} local function doESP(plr) if plr == player or espObjs[plr] then return end local function apply(char) if not State.espOn then return end local hl = Instance.new("Highlight") hl.FillColor = C.accent hl.OutlineColor = C.accentGlow hl.FillTransparency = 0.5 hl.Adornee = char hl.Parent = char local head = char:FindFirstChild("Head") local bb if head then bb = Instance.new("BillboardGui") bb.Size = UDim2.fromOffset(160, 32) bb.StudsOffset = Vector3.new(0, 2.5, 0) bb.AlwaysOnTop = true bb.Parent = head newLabel(bb, { Size = UDim2.fromScale(1, 1), Text = plr.Name, TextColor3 = C.accentGlow, TextStrokeTransparency = 0, TextScaled = true, Font = Enum.Font.GothamBold, }) end espObjs[plr] = { hl, bb } end if plr.Character then apply(plr.Character) end plr.CharacterAdded:Connect(apply) end addToggle(vPage, "Player ESP", 2, function(state) State.espOn = state if state then for _, plr in Players:GetPlayers() do doESP(plr) end else for _, d in pairs(espObjs) do for _, i in ipairs(d) do if i then pcall(function() i:Destroy() end) end end end espObjs = {} end end) track(Players.PlayerAdded:Connect(function(plr) if State.espOn then doESP(plr) end end)) addSection(vPage, "Lighting", 10) local origL = { Brightness = Lighting.Brightness, Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, FogEnd = Lighting.FogEnd, ClockTime = Lighting.ClockTime, } addToggle(vPage, "Full Bright", 11, function(state) State.fullBright = state if state then Lighting.Brightness = 2 Lighting.Ambient = Color3.new(1, 1, 1) Lighting.OutdoorAmbient = Color3.new(1, 1, 1) Lighting.FogEnd = 100000 Lighting.ClockTime = 14 else Lighting.Brightness = origL.Brightness Lighting.Ambient = origL.Ambient Lighting.OutdoorAmbient = origL.OutdoorAmbient Lighting.FogEnd = origL.FogEnd Lighting.ClockTime = origL.ClockTime end end) addToggle(vPage, "No Fog", 12, function(state) Lighting.FogEnd = state and 1e8 or origL.FogEnd end) addSection(vPage, "Camera", 20) addSlider(vPage, "Field of View", 21, 30, 120, 70, "°", function(val) camera.FieldOfView = val end) addSection(vPage, "Transparency", 30) addToggle(vPage, "Invisible (local)", 31, function(state) State.invisible = state local char = player.Character if not char then return end for _, o in char:GetDescendants() do if o:IsA("BasePart") then o.LocalTransparencyModifier = state and 1 or 0 end if o:IsA("Decal") then o.Transparency = state and 1 or 0 end end end) local wPage = tabPages["World"] addSection(wPage, "Time", 1) addSlider(wPage, "Clock Time", 2, 0, 24, 14, " hr", function(val) Lighting.ClockTime = val end) addSection(wPage, "Physics", 10) addSlider(wPage, "Gravity", 11, 0, 500, 196, "", function(val) State.gravity = val workspace.Gravity = val end) local mPage = tabPages["Misc"] addSection(mPage, "Utilities", 1) addButton(mPage, "Rejoin Server", 2, function() showToast("Rejoining", "Reconnecting...") task.delay(1.2, function() TeleportService:Teleport(game.PlaceId, player) end) end) addButton(mPage, "Copy Username", 3, function() if setclipboard then setclipboard(player.Name) end showToast("Copied", "Username copied.") end) addButton(mPage, "Reset Character", 4, function() local h = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if h then h.Health = 0 end end) addSection(mPage, "Click Teleport", 10) addToggle(mPage, "Click Teleport", 11, function(state) State.clickTp = state end) track(UserInputService.InputBegan:Connect(function(i, gp) if gp or not State.clickTp then return end if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then local char = player.Character local root = char and char:FindFirstChild("HumanoidRootPart") if not root then return end local ray = camera:ScreenPointToRay(i.Position.X, i.Position.Y) local params = RaycastParams.new() params.FilterDescendantsInstances = { char } params.FilterType = Enum.RaycastFilterType.Exclude local result = workspace:Raycast(ray.Origin, ray.Direction * 1000, params) if result then root.CFrame = CFrame.new(result.Position + Vector3.new(0, 3, 0)) end end end)) addSection(mPage, "Spectate", 20) local specWin = nil local function buildSpectate() if specWin then return end local sg = Instance.new("ScreenGui") sg.Name = "KaysSpec" sg.ResetOnSpawn = false sg.IgnoreGuiInset = true sg.Parent = playerGui specWin = newFrame(sg, { Size = UDim2.fromOffset(240, 320), Position = UDim2.fromOffset(14, 80), BackgroundColor3 = C.card, Visible = false, }) corner(specWin, 10) stroke(specWin, C.accent, 1.5, 0) local sh = newFrame(specWin, { Size = UDim2.new(1, 0, 0, 36), BackgroundColor3 = C.surface, }) corner(sh, 10) newFrame(sh, { Size = UDim2.new(1, 0, 0, 10), Position = UDim2.new(0, 0, 1, -10), BackgroundColor3 = C.surface, }) newLabel(sh, { Size = UDim2.fromScale(1, 1), Text = "Spectate", Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = C.accentGlow, }) local sd, ss, sp = false, nil, nil sh.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then sd = true ss = inp.Position sp = specWin.Position end end) UserInputService.InputChanged:Connect(function(inp) if not sd then return end if inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch then local d = inp.Position - ss specWin.Position = UDim2.fromOffset(sp.X.Offset + d.X, sp.Y.Offset + d.Y) end end) UserInputService.InputEnded:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then sd = false end end) local searchBox = Instance.new("TextBox") searchBox.Parent = specWin searchBox.Position = UDim2.fromOffset(8, 44) searchBox.Size = UDim2.new(1, -16, 0, 28) searchBox.BackgroundColor3 = C.surface searchBox.Text = "" searchBox.PlaceholderText = "Search player..." searchBox.Font = Enum.Font.Gotham searchBox.TextSize = 12 searchBox.TextColor3 = C.text searchBox.PlaceholderColor3 = C.dim searchBox.ClearTextOnFocus = false searchBox.BorderSizePixel = 0 corner(searchBox, 6) local specScroll = Instance.new("ScrollingFrame") specScroll.Parent = specWin specScroll.Position = UDim2.fromOffset(8, 80) specScroll.Size = UDim2.new(1, -16, 1, -130) specScroll.BackgroundTransparency = 1 specScroll.ScrollBarThickness = 3 specScroll.CanvasSize = UDim2.new(0, 0, 0, 0) specScroll.AutomaticCanvasSize = Enum.AutomaticSize.Y local sll = Instance.new("UIListLayout") sll.Parent = specScroll sll.Padding = UDim.new(0, 4) local stopBtn = newButton(specWin, { Position = UDim2.new(0, 8, 1, -46), Size = UDim2.new(1, -16, 0, 38), BackgroundColor3 = C.accent, Text = "Stop Spectating", Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = C.white, }) corner(stopBtn, 8) stopBtn.MouseButton1Click:Connect(function() if player.Character and player.Character:FindFirstChildOfClass("Humanoid") then camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = player.Character.Humanoid end end) local function refreshSpec() for _, v in specScroll:GetChildren() do if v:IsA("TextButton") or v:IsA("Frame") then v:Destroy() end end local q = searchBox.Text:lower() for _, plr in Players:GetPlayers() do if plr ~= player and plr.Name:lower():find(q, 1, true) then local pb = newButton(specScroll, { Size = UDim2.new(1, 0, 0, 44), BackgroundColor3 = C.surface, Text = "", }) corner(pb, 8) local pi = Instance.new("ImageLabel") pi.Parent = pb pi.Size = UDim2.fromOffset(30, 30) pi.Position = UDim2.fromOffset(7, 7) pi.BackgroundTransparency = 1 corner(pi, 15) task.spawn(function() pcall(function() pi.Image = Players:GetUserThumbnailAsync(plr.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) end) end) newLabel(pb, { Position = UDim2.fromOffset(46, 0), Size = UDim2.new(1, -54, 1, 0), Text = plr.Name, Font = Enum.Font.Gotham, TextSize = 13, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, }) pb.MouseButton1Click:Connect(function() if plr.Character and plr.Character:FindFirstChildOfClass("Humanoid") then camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = plr.Character.Humanoid end end) end end end searchBox:GetPropertyChangedSignal("Text"):Connect(refreshSpec) Players.PlayerAdded:Connect(function() if specWin.Visible then refreshSpec() end end) Players.PlayerRemoving:Connect(function() task.wait(0.1) if specWin.Visible then refreshSpec() end end) specWin:GetPropertyChangedSignal("Visible"):Connect(function() if specWin.Visible then refreshSpec() end end) end addButton(mPage, "Spectate (toggle)", 21, function() buildSpectate() specWin.Visible = not specWin.Visible end) addSection(mPage, "Chat", 30) local chatWin = nil local function buildChatLog() if chatWin then return end local cg = Instance.new("ScreenGui") cg.Name = "KaysChatLog" cg.ResetOnSpawn = false cg.IgnoreGuiInset = true cg.Parent = playerGui chatWin = newFrame(cg, { Size = UDim2.fromOffset(300, 280), Position = UDim2.fromOffset(14, 140), BackgroundColor3 = C.card, Visible = false, }) corner(chatWin, 10) stroke(chatWin, C.accent, 1.5, 0) local ch = newFrame(chatWin, { Size = UDim2.new(1, 0, 0, 36), BackgroundColor3 = C.surface, }) corner(ch, 10) newFrame(ch, { Size = UDim2.new(1, 0, 0, 10), Position = UDim2.new(0, 0, 1, -10), BackgroundColor3 = C.surface, }) newLabel(ch, { Size = UDim2.fromScale(1, 1), Text = "Chat Log", Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = C.accentGlow, }) local cd2, cs2, cp2 = false, nil, nil ch.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then cd2 = true cs2 = inp.Position cp2 = chatWin.Position end end) UserInputService.InputChanged:Connect(function(inp) if not cd2 then return end if inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch then local d = inp.Position - cs2 chatWin.Position = UDim2.fromOffset(cp2.X.Offset + d.X, cp2.Y.Offset + d.Y) end end) UserInputService.InputEnded:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then cd2 = false end end) local scroll = Instance.new("ScrollingFrame") scroll.Parent = chatWin scroll.Position = UDim2.fromOffset(0, 40) scroll.Size = UDim2.new(1, 0, 1, -44) scroll.BackgroundTransparency = 1 scroll.ScrollBarThickness = 3 scroll.CanvasSize = UDim2.new(0, 0, 0, 0) scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y local cll = Instance.new("UIListLayout") cll.Parent = scroll cll.Padding = UDim.new(0, 4) local cp3 = Instance.new("UIPadding") cp3.Parent = scroll cp3.PaddingLeft = UDim.new(0, 6) cp3.PaddingRight = UDim.new(0, 6) cp3.PaddingTop = UDim.new(0, 4) local function addMsg(plr, text) local row = newFrame(scroll, { Size = UDim2.new(1, -4, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = C.surface, }) corner(row, 6) local av = Instance.new("ImageLabel") av.Parent = row av.Size = UDim2.fromOffset(28, 28) av.Position = UDim2.fromOffset(6, 6) av.BackgroundTransparency = 1 corner(av, 14) task.spawn(function() pcall(function() av.Image = Players:GetUserThumbnailAsync(plr.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) end) end) newLabel(row, { Position = UDim2.fromOffset(42, 4), Size = UDim2.new(1, -50, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, Text = "[" .. plr.Name .. "]: " .. text, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = C.text, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, }) task.wait() pcall(function() scroll.CanvasPosition = Vector2.new(0, scroll.AbsoluteCanvasSize.Y) end) end if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then TextChatService.MessageReceived:Connect(function(msg) if not msg.TextSource then return end local sender = Players:GetPlayerByUserId(msg.TextSource.UserId) if sender then addMsg(sender, msg.Text) end end) else local function hook(plr) plr.Chatted:Connect(function(m) addMsg(plr, m) end) end for _, plr in Players:GetPlayers() do hook(plr) end Players.PlayerAdded:Connect(hook) end end addToggle(mPage, "Chat Log", 31, function(state) buildChatLog() chatWin.Visible = state end) addSection(mPage, "Performance", 40) addSlider(mPage, "FPS Cap", 41, 1, 180, 60, " fps", function(val) State.fpsCap = val if setfpscap then setfpscap(val) else pcall(function() settings().Rendering.MaxFrameRate = val end) end end) local musicPage = tabPages["Music"] pcall(function() if not isfolder("KaysHub") then makefolder("KaysHub") end if not isfolder(MUSIC_FOLDER) then makefolder(MUSIC_FOLDER) end end) local foundTracks = {} pcall(function() local files = listfiles(MUSIC_FOLDER) for _, path in ipairs(files) do local name = path:match("([^/\\]+)$") or path local lower = name:lower() if lower:sub(-4) == ".mp3" or lower:sub(-4) == ".ogg" or lower:sub(-4) == ".wav" then foundTracks[#foundTracks + 1] = { name = name, path = path, } end end end) local musicSound = Instance.new("Sound") musicSound.Name = "KaysHubMusic" musicSound.Volume = 0.5 musicSound.Looped = true musicSound.RollOffMaxDistance = 100000 musicSound.Parent = workspace local musicPlaying = false addSection(musicPage, "How To Add Music", 1) addInfo( musicPage, "1. Open Delta's file manager\n2. Navigate to KaysHub/music/\n3. Drop any .mp3 / .ogg / .wav file there\n4. Re-execute the script to see it here", 2, Color3.fromRGB(140, 170, 200) ) addInfo(musicPage, "Folder: KaysHub/music/", 3, C.accent) addSection(musicPage, "Tracks (" .. tostring(#foundTracks) .. " found)", 10) if #foundTracks == 0 then addInfo(musicPage, "No music files found. Add music files and re-execute.", 11, Color3.fromRGB(100, 120, 150)) else local npRow = makeCard(musicPage, 44, 11) local npLbl = newLabel(npRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -50, 1, 0), Text = "Nothing playing", Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = C.accentGlow, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local dot = newFrame(npRow, { Size = UDim2.fromOffset(8, 8), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.accent, BackgroundTransparency = 1, ZIndex = 15, }) corner(dot, 4) local function startDotPulse() task.spawn(function() while musicPlaying do tween(dot, 0.6, { BackgroundTransparency = 0.2 }, Enum.EasingStyle.Sine) task.wait(0.65) tween(dot, 0.6, { BackgroundTransparency = 0.8 }, Enum.EasingStyle.Sine) task.wait(0.65) end dot.BackgroundTransparency = 1 end) end local function loadAndPlay(index) local track = foundTracks[index] if not track then return end musicPlaying = true local ok, url = pcall(function() return getcustomasset(track.path) end) if not ok or not url then url = track.path end musicSound:Stop() musicSound.SoundId = url musicSound:Play() npLbl.Text = "Playing: " .. track.name startDotPulse() showToast("Now Playing", track.name, 2.5) end local function stopMusic() musicPlaying = false musicSound:Stop() npLbl.Text = "Stopped" end addSection(musicPage, "Controls", 20) addSlider(musicPage, "Volume", 21, 0, 100, 50, "%", function(val) musicSound.Volume = val / 100 end) addButton(musicPage, "Stop Music", 22, function() stopMusic() end) addToggle(musicPage, "Loop Track", 23, function(state) musicSound.Looped = state end) addSection(musicPage, "Track List", 30) for i, track in ipairs(foundTracks) do local displayName = track.name:match("(.+)%.[^%.]+$") or track.name local tr = makeCard(musicPage, 50, 30 + i) newLabel(tr, { Size = UDim2.fromOffset(28, 50), Text = tostring(i), Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = C.accent, ZIndex = 15, }) newLabel(tr, { Position = UDim2.fromOffset(34, 6), Size = UDim2.new(1, -80, 0, 22), Text = displayName, Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, ZIndex = 15, }) newLabel(tr, { Position = UDim2.fromOffset(34, 28), Size = UDim2.new(1, -80, 0, 16), Text = track.name, Font = Enum.Font.Gotham, TextSize = 10, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, ZIndex = 15, }) local playBtn = newButton(tr, { Size = UDim2.fromOffset(36, 36), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -8, 0.5, 0), BackgroundColor3 = C.accent, Text = ">", Font = Enum.Font.GothamBold, TextSize = 16, TextColor3 = C.white, ZIndex = 16, }) corner(playBtn, 8) local rowHit = newButton(tr, { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", ZIndex = 17, }) local idx = i local function playThis() tween(tr, 0.08, { BackgroundColor3 = C.accentDark }) task.delay(0.14, function() tween(tr, 0.2, { BackgroundColor3 = C.card }) end) loadAndPlay(idx) end rowHit.MouseButton1Click:Connect(playThis) playBtn.MouseButton1Click:Connect(playThis) end end local shPage = tabPages["Shaders"] addSection(shPage, "Presets", 1) addInfo(shPage, "One shader active at a time. Toggle off to restore lighting.", 2, Color3.fromRGB(120, 160, 200)) local shaderCleanups = {} local function deactivateShader(name) if shaderCleanups[name] then pcall(shaderCleanups[name]) shaderCleanups[name] = nil end end local function deactivateAllShaders() for n in pairs(shaderCleanups) do deactivateShader(n) end end addSection(shPage, "Realistic", 10) addToggle(shPage, "Realistic Shader", 11, function(state) if state then deactivateAllShaders() local oA = Lighting.Ambient local oOA = Lighting.OutdoorAmbient local oB = Lighting.Brightness local oC = Lighting.ClockTime local oF = Lighting.FogEnd local atmo = Lighting:FindFirstChildOfClass("Atmosphere") or Instance.new("Atmosphere") local wasA = atmo.Parent ~= nil atmo.Density = 0.40 atmo.Offset = 0.28 atmo.Color = Color3.fromRGB(210, 175, 120) atmo.Decay = Color3.fromRGB(110, 85, 55) atmo.Glare = 0.5 atmo.Haze = 2.2 if not wasA then atmo.Parent = Lighting end local bloom = Lighting:FindFirstChildOfClass("BloomEffect") or Instance.new("BloomEffect") local wasB = bloom.Parent ~= nil bloom.Intensity = 0.40 bloom.Size = 12 bloom.Threshold = 0.90 if not wasB then bloom.Parent = Lighting end local cc = Instance.new("ColorCorrectionEffect") cc.Brightness = 0.03 cc.Contrast = 0.10 cc.Saturation = 0.12 cc.TintColor = Color3.fromRGB(255, 240, 210) cc.Parent = Lighting Lighting.Brightness = 1.55 Lighting.Ambient = Color3.fromRGB(85, 75, 65) Lighting.OutdoorAmbient = Color3.fromRGB(145, 135, 115) Lighting.ClockTime = 13.5 Lighting.FogEnd = 1400 shaderCleanups["realistic"] = function() if not wasA and atmo.Parent then atmo:Destroy() elseif wasA then atmo.Density = 0 atmo.Haze = 0 end if not wasB and bloom.Parent then bloom:Destroy() elseif wasB then bloom.Intensity = 0 end if cc.Parent then cc:Destroy() end Lighting.Ambient = oA Lighting.OutdoorAmbient = oOA Lighting.Brightness = oB Lighting.ClockTime = oC Lighting.FogEnd = oF end showToast("Shader", "Realistic enabled.") else deactivateShader("realistic") showToast("Shader", "Realistic disabled.") end end) addSection(shPage, "Rainy Day", 20) addToggle(shPage, "Rainy Day Shader", 21, function(state) if state then deactivateAllShaders() local oA = Lighting.Ambient local oOA = Lighting.OutdoorAmbient local oB = Lighting.Brightness local oCk = Lighting.ClockTime local oFE = Lighting.FogEnd local oFS = Lighting.FogStart local oFC = Lighting.FogColor Lighting.ClockTime = 11 Lighting.Brightness = 0.5 Lighting.Ambient = Color3.fromRGB(88, 93, 98) Lighting.OutdoorAmbient = Color3.fromRGB(98, 103, 108) Lighting.FogEnd = 280 Lighting.FogStart = 40 Lighting.FogColor = Color3.fromRGB(155, 160, 165) local cc = Instance.new("ColorCorrectionEffect") cc.Brightness = -0.07 cc.Contrast = 0.10 cc.Saturation = -0.50 cc.TintColor = Color3.fromRGB(175, 190, 210) cc.Parent = Lighting local rainGui = Instance.new("ScreenGui") rainGui.Name = "KaysRain" rainGui.ResetOnSpawn = false rainGui.IgnoreGuiInset = true rainGui.DisplayOrder = 5 rainGui.Parent = playerGui local drops = {} local vp = camera.ViewportSize for i = 1, 80 do local f = newFrame(rainGui, { BackgroundColor3 = Color3.fromRGB(180, 200, 225), BackgroundTransparency = math.random(30, 55) / 100, ZIndex = 2, }) local w = math.random(1, 2) local h = math.random(14, 26) local x = math.random(0, math.floor(vp.X)) local y = math.random(-100, math.floor(vp.Y)) drops[i] = { frame = f, x = x, y = y, speed = math.random(400, 800), drift = math.random(-20, 20), } f.Size = UDim2.fromOffset(w, h) f.Position = UDim2.fromOffset(x, y) end local rc = RunService.RenderStepped:Connect(function(dt) local vpN = camera.ViewportSize for _, d in ipairs(drops) do d.y = d.y + d.speed * dt d.x = d.x + d.drift * dt if d.y > vpN.Y + 30 then d.y = math.random(-50, -10) d.x = math.random(0, math.floor(vpN.X)) end if d.x > vpN.X + 20 then d.x = -10 end if d.x < -20 then d.x = vpN.X + 10 end d.frame.Position = UDim2.fromOffset(math.floor(d.x), math.floor(d.y)) end end) shaderCleanups["rainy"] = function() rc:Disconnect() if rainGui.Parent then rainGui:Destroy() end if cc.Parent then cc:Destroy() end Lighting.Ambient = oA Lighting.OutdoorAmbient = oOA Lighting.Brightness = oB Lighting.ClockTime = oCk Lighting.FogEnd = oFE Lighting.FogStart = oFS Lighting.FogColor = oFC end showToast("Shader", "Rainy Day enabled.") else deactivateShader("rainy") showToast("Shader", "Rainy Day disabled.") end end) if isInMM2 then local mm2Page = tabPages["MM2"] local MCOL = { Murderer = Color3.fromRGB(255, 40, 40), Sheriff = Color3.fromRGB(40, 120, 255), Innocent = Color3.fromRGB(40, 220, 80), DroppedGun = C.yellow, } local function getRole(plr) if plr == player then return "Self" end local c = plr.Character local bp = plr.Backpack if (c and c:FindFirstChild("Knife")) or (bp and bp:FindFirstChild("Knife")) then return "Murderer" end if (c and c:FindFirstChild("Gun")) or (bp and bp:FindFirstChild("Gun")) then return "Sheriff" end return "Innocent" end local function getMurderer() for _, p in Players:GetPlayers() do if p ~= player and getRole(p) == "Murderer" and p.Character then return p.Character, p end end return nil, nil end local mm2EspOn = false local espMap = {} local function removeESP(p) local t = espMap[p] if not t then return end for _, o in ipairs(t) do pcall(function() if o and o.Parent then o:Destroy() end end) end espMap[p] = nil end local function buildESP(p, col, label) if p == player then return end removeESP(p) local char = p.Character if not char then return end local hl = Instance.new("Highlight") hl.FillColor = col hl.OutlineColor = col hl.FillTransparency = 0.45 hl.Adornee = char hl.Parent = char local head = char:FindFirstChild("Head") local bb if head then bb = Instance.new("BillboardGui") bb.Size = UDim2.fromOffset(160, 36) bb.StudsOffset = Vector3.new(0, 3, 0) bb.AlwaysOnTop = true bb.Parent = head newLabel(bb, { Size = UDim2.new(1, 0, 0.55, 0), Text = p.Name, Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = C.white, TextStrokeTransparency = 0, }) local roleLblESP = newLabel(bb, { Size = UDim2.new(1, 0, 0.45, 0), Position = UDim2.fromScale(0, 0.55), Text = "[ " .. label .. " ]", Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = col, TextStrokeTransparency = 0, }) espMap[p] = { hl, bb, roleLblESP } else espMap[p] = { hl, bb } end end local espRC = nil local function startESP() if espRC then return end local t = 0 espRC = RunService.Heartbeat:Connect(function(dt) t = t + dt if t < 0.4 then return end t = 0 if not mm2EspOn then return end for _, p in Players:GetPlayers() do if p == player then continue end local char = p.Character if not char then continue end local role = getRole(p) local col = MCOL[role] or MCOL.Innocent local objs = espMap[p] if objs then local hl = objs[1] if not hl or not hl.Parent or hl.Adornee ~= char then buildESP(p, col, role) else hl.FillColor = col hl.OutlineColor = col local roleLblESP = objs[3] if roleLblESP and roleLblESP.Parent then roleLblESP.Text = "[ " .. role .. " ]" roleLblESP.TextColor3 = col end end else buildESP(p, col, role) end end end) end local function stopESP() if espRC then espRC:Disconnect() espRC = nil end for _, p in Players:GetPlayers() do removeESP(p) end end local gunHL, gunBB = nil, nil local function findGunDrop() return workspace:FindFirstChild("GunDrop") or workspace:FindFirstChild("GunDrop", true) end local function clearGunESP() if gunHL and gunHL.Parent then gunHL:Destroy() end if gunBB and gunBB.Parent then gunBB:Destroy() end gunHL, gunBB = nil, nil end local function showGunESP() clearGunESP() local gd = findGunDrop() if not gd then return end gunHL = Instance.new("Highlight") gunHL.FillColor = MCOL.DroppedGun gunHL.OutlineColor = MCOL.DroppedGun gunHL.FillTransparency = 0.3 gunHL.Adornee = gd gunHL.Parent = gd gunBB = Instance.new("BillboardGui") gunBB.Size = UDim2.fromOffset(160, 32) gunBB.StudsOffset = Vector3.new(0, 5, 0) gunBB.AlwaysOnTop = true gunBB.MaxDistance = math.huge gunBB.Parent = gd newLabel(gunBB, { Size = UDim2.fromScale(1, 1), Text = "[ GUN DROPPED ]", Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = MCOL.DroppedGun, TextStrokeTransparency = 0, }) end local lastGun = false local pollT = 0 track(RunService.Heartbeat:Connect(function(dt) pollT = pollT + dt if pollT < 0.3 then return end pollT = 0 local exists = findGunDrop() ~= nil if exists and not lastGun then lastGun = true showToast("Gun Dropped!", "Pick it up to become Sheriff.") showGunESP() elseif not exists and lastGun then lastGun = false clearGunESP() end end)) local autoGrabOn = false local grabActive = false local function tryAutoGrab() if not autoGrabOn or grabActive then return end local mc = player.Character local hrp = mc and mc:FindFirstChild("HumanoidRootPart") if not hrp then return end if mc:FindFirstChild("Gun") or player.Backpack:FindFirstChild("Gun") then return end local gd = findGunDrop() if not gd then return end grabActive = true local gunCF = gd.CFrame local oldCF = hrp.CFrame hrp.CFrame = gunCF task.delay(0.2, function() local nh = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if nh then nh.CFrame = oldCF end task.delay(1, function() grabActive = false end) end) end local grabT = 0 track(RunService.Heartbeat:Connect(function(dt) grabT = grabT + dt if grabT < 0.3 then return end grabT = 0 tryAutoGrab() end)) local autoShootOn = false local shootConn = nil local shootCD = false local function fireAtMurderer() if shootCD then return end local mc = player.Character if not mc then return end local gun = mc:FindFirstChild("Gun") if not gun then return end local shootRE = gun:FindFirstChild("Shoot") if not shootRE then return end local mChar = getMurderer() mChar = mChar local murdererChar = select(1, getMurderer()) if not murdererChar then return end local mHRP = murdererChar:FindFirstChild("HumanoidRootPart") local myHRP = mc:FindFirstChild("HumanoidRootPart") if not mHRP or not myHRP then return end local tPos = mHRP.Position + Vector3.new(0, 0.5, 0) local bPos = myHRP.Position + Vector3.new(0, 0.5, 0) local aimCF = CFrame.lookAt(bPos, tPos) shootCD = true pcall(function() shootRE:FireServer(aimCF, CFrame.new(tPos)) end) task.delay(0.25, function() shootCD = false end) end local function startAutoShoot() if shootConn then return end shootConn = UserInputService.InputBegan:Connect(function(inp, gp) if gp or not autoShootOn then return end if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then fireAtMurderer() end end) end local function stopAutoShoot() if shootConn then shootConn:Disconnect() shootConn = nil end end addSection(mm2Page, "Murder Mystery 2", 1) addInfo(mm2Page, "Auto-detected — MM2 exclusive tools.", 2, C.green) addSection(mm2Page, "Role ESP", 10) local legRow = makeCard(mm2Page, 44, 11) local lp = Instance.new("UIPadding") lp.Parent = legRow lp.PaddingLeft = UDim.new(0, 12) lp.PaddingTop = UDim.new(0, 8) local function legDot(col, x) local d = newFrame(legRow, { Size = UDim2.fromOffset(10, 10), Position = UDim2.fromOffset(x, 0), BackgroundColor3 = col, ZIndex = 15, }) corner(d, 5) end local function legTxt(txt, col, x) newLabel(legRow, { Position = UDim2.fromOffset(x + 14, -2), Size = UDim2.fromOffset(76, 16), Text = txt, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = col, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) end legDot(MCOL.Murderer, 0) legTxt("Murderer", MCOL.Murderer, 0) legDot(MCOL.Sheriff, 90) legTxt("Sheriff", MCOL.Sheriff, 90) legDot(MCOL.Innocent, 175) legTxt("Innocent", MCOL.Innocent, 175) legDot(MCOL.DroppedGun, 260) legTxt("Gun Drop", MCOL.DroppedGun, 260) addToggle(mm2Page, "Role ESP", 12, function(state) mm2EspOn = state if state then for _, p in Players:GetPlayers() do if p ~= player and p.Character then buildESP(p, MCOL[getRole(p)] or MCOL.Innocent, getRole(p)) end p.CharacterAdded:Connect(function() task.wait(0.2) if mm2EspOn then buildESP(p, MCOL[getRole(p)] or MCOL.Innocent, getRole(p)) end end) end Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function() task.wait(0.2) if mm2EspOn then buildESP(p, MCOL[getRole(p)] or MCOL.Innocent, getRole(p)) end end) end) startESP() showToast("Role ESP", "Enabled.") else stopESP() showToast("Role ESP", "Disabled.") end end) addSection(mm2Page, "Sheriff Auto-Shoot", 20) addInfo(mm2Page, "Tap/click to shoot — auto-aims at Murderer. Requires you to be Sheriff.", 21, Color3.fromRGB(100, 160, 210)) addToggle(mm2Page, "Auto-Shoot on Tap/Click", 22, function(state) autoShootOn = state if state then startAutoShoot() else stopAutoShoot() end end) addButton(mm2Page, "Manual Fire (one shot)", 23, function() fireAtMurderer() end) addSection(mm2Page, "Auto-Grab Gun", 30) addInfo(mm2Page, "When the gun drops, teleports to it and back instantly.", 31, Color3.fromRGB(100, 160, 210)) addToggle(mm2Page, "Auto-Grab Dropped Gun", 32, function(state) autoGrabOn = state end) addSection(mm2Page, "Live Status", 40) local rolRow = makeCard(mm2Page, 40, 41) local rolLbl = newLabel(rolRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Your role: checking...", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local murRow = makeCard(mm2Page, 40, 42) local murLbl = newLabel(murRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Murderer: scanning...", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = MCOL.Murderer, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local gunRow = makeCard(mm2Page, 40, 43) local gunLbl = newLabel(gunRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Gun: not dropped", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local stT = 0 track(RunService.Heartbeat:Connect(function(dt) stT = stT + dt if stT < 0.5 then return end stT = 0 local mc = player.Character if mc then local hK = mc:FindFirstChild("Knife") or player.Backpack:FindFirstChild("Knife") local hG = mc:FindFirstChild("Gun") or player.Backpack:FindFirstChild("Gun") if hK then rolLbl.Text = "Your role: Murderer" rolLbl.TextColor3 = MCOL.Murderer elseif hG then rolLbl.Text = "Your role: Sheriff" rolLbl.TextColor3 = MCOL.Sheriff else rolLbl.Text = "Your role: Innocent" rolLbl.TextColor3 = MCOL.Innocent end end local _, mp = getMurderer() murLbl.Text = mp and ("Murderer: " .. mp.Name) or "Murderer: not detected" local gd = findGunDrop() if gd then gunLbl.Text = "Gun: DROPPED" gunLbl.TextColor3 = MCOL.DroppedGun else gunLbl.Text = "Gun: not dropped" gunLbl.TextColor3 = C.sub end end)) addSection(mm2Page, "Teleports", 50) local function tpTo(cf) local myChar = player.Character local hrp = myChar and myChar:FindFirstChild("HumanoidRootPart") if not hrp then return end hrp.CFrame = cf end addButton(mm2Page, "Teleport to Lobby", 51, function() for _, p in Players:GetPlayers() do if p ~= player and p.Character then if getRole(p) == "Innocent" then local h = p.Character:FindFirstChild("HumanoidRootPart") if h then tpTo(h.CFrame * CFrame.new(3, 0, 0)) return end end end end for _, p in Players:GetPlayers() do if p ~= player and p.Character then local h = p.Character:FindFirstChild("HumanoidRootPart") if h then tpTo(h.CFrame * CFrame.new(3, 0, 0)) return end end end for _, v in workspace:GetDescendants() do if v:IsA("SpawnLocation") then tpTo(v.CFrame + Vector3.new(0, 5, 0)) return end end end) addButton(mm2Page, "Teleport to Map", 52, function() local charSet = {} for _, p in Players:GetPlayers() do if p.Character then charSet[p.Character] = true end end local bestObj, bestCount = nil, 30 for _, child in workspace:GetChildren() do if not charSet[child] and not child:IsA("Camera") then local cnt = 0 for _, d in child:GetDescendants() do if d:IsA("BasePart") then cnt += 1 end end if cnt > bestCount then bestCount = cnt bestObj = child end end end if bestObj then local best, bd = nil, math.huge for _, v in bestObj:GetDescendants() do if v:IsA("BasePart") and v.Anchored and v.Size.X > 2 and v.Size.Z > 2 then local d = math.abs(v.Position.Y) if d < bd then bd = d best = v end end end if best then tpTo(best.CFrame + Vector3.new(0, 6, 0)) return end local ok, piv = pcall(function() return bestObj:GetPivot() end) if ok then tpTo(piv + Vector3.new(0, 10, 0)) return end end local murdererChar = select(1, getMurderer()) if murdererChar then local h = murdererChar:FindFirstChild("HumanoidRootPart") if h then tpTo(h.CFrame * CFrame.new(5, 0, 0)) end end end) addButton(mm2Page, "Teleport to Sheriff", 53, function() for _, p in Players:GetPlayers() do if p ~= player and getRole(p) == "Sheriff" and p.Character then local h = p.Character:FindFirstChild("HumanoidRootPart") if h then tpTo(h.CFrame * CFrame.new(3, 0, 0)) return end end end end) addButton(mm2Page, "Teleport to Murderer", 54, function() local murdererChar = select(1, getMurderer()) if murdererChar then local h = murdererChar:FindFirstChild("HumanoidRootPart") if h then tpTo(h.CFrame * CFrame.new(3, 0, 0)) end end end) addSection(mm2Page, "Kill All", 65) addInfo(mm2Page, "Teleports your knife to each survivor instantly. Only works while you are the Murderer.", 66, Color3.fromRGB(220, 100, 100)) addButton(mm2Page, "Kill All (Murderer only)", 67, function() -- Check if local player is the murderer local myChar = player.Character if not myChar then showToast("Kill All", "No character found.") return end local hasKnife = myChar:FindFirstChild("Knife") or player.Backpack:FindFirstChild("Knife") if not hasKnife then showToast("Not the Murderer", "You are not the murderer.") return end local myHRP = myChar:FindFirstChild("HumanoidRootPart") if not myHRP then return end local killed = 0 for _, target in Players:GetPlayers() do if target == player then continue end local tChar = target.Character if not tChar then continue end local tHRP = tChar:FindFirstChild("HumanoidRootPart") local tHum = tChar:FindFirstChildOfClass("Humanoid") if not tHRP or not tHum or tHum.Health <= 0 then continue end -- Method 1: teleport to each player and back (knife touch kill) local origCF = myHRP.CFrame myHRP.CFrame = tHRP.CFrame task.wait(0.05) -- Method 2: fire the Throw remote if we can find it pcall(function() local knife = myChar:FindFirstChild("Knife") or player.Backpack:FindFirstChild("Knife") if knife then local throwRE = knife:FindFirstChild("Throw") or knife:FindFirstChild("ThrowKnife") or knife:FindFirstChild("Kill") if throwRE and throwRE:IsA("RemoteEvent") then local aimCF = CFrame.lookAt(myHRP.Position, tHRP.Position) throwRE:FireServer(aimCF, tHRP.Position) end end end) -- Method 3: direct humanoid damage as fallback pcall(function() tHum.Health = 0 end) myHRP.CFrame = origCF killed = killed + 1 task.wait(0.08) end if killed > 0 then showToast("Kill All", "Targeted " .. killed .. " player(s).") else showToast("Kill All", "No valid targets found.") end end) addSection(mm2Page, "Knife Trail", 60) addInfo(mm2Page, "Red neon trail marks every thrown knife. Auto-clears after impact.", 61, Color3.fromRGB(100, 160, 210)) local knifeTrailOn = false local trackedParts = {} local trailSegs = {} local function clearTrail() for _, s in ipairs(trailSegs) do pcall(function() if s and s.Parent then s:Destroy() end end) end trailSegs = {} end local function addSeg(a, b) local dist = (b - a).Magnitude if dist < 0.1 then return end local seg = Instance.new("Part") seg.Anchored = true seg.CanCollide = false seg.CastShadow = false seg.Size = Vector3.new(0.15, 0.15, dist) seg.CFrame = CFrame.lookAt((a + b) / 2, b) seg.Material = Enum.Material.Neon seg.Color = Color3.fromRGB(255, 30, 30) seg.Transparency = 0.5 seg.Parent = workspace trailSegs[#trailSegs + 1] = seg Debris:AddItem(seg, 4) end local function trackPart(part) if trackedParts[part] then return end trackedParts[part] = true local last = part.Position local stuck = 0 local conn conn = RunService.Heartbeat:Connect(function() if not part or not part.Parent then conn:Disconnect() trackedParts[part] = nil task.delay(1.5, clearTrail) return end local cur = part.Position local dist = (cur - last).Magnitude if dist > 0.1 then addSeg(last, cur) last = cur stuck = 0 else stuck += 1 if stuck > 15 then conn:Disconnect() trackedParts[part] = nil task.delay(1.5, clearTrail) end end end) end local function checkAndTrack(obj) if not knifeTrailOn then return end if not obj:IsA("BasePart") then return end if obj.Anchored then return end task.wait() task.wait() if not obj or not obj.Parent then return end local vel = obj.AssemblyLinearVelocity if vel.Magnitude < 30 then return end local myChar = player.Character if myChar and obj:IsDescendantOf(myChar) then return end trackPart(obj) end local function hookChar(char) char.DescendantAdded:Connect(function(obj) checkAndTrack(obj) end) end for _, p in Players:GetPlayers() do if p ~= player and getRole(p) == "Murderer" and p.Character then hookChar(p.Character) end p.CharacterAdded:Connect(function(char) task.wait(1) if getRole(p) == "Murderer" then hookChar(char) end end) end track(Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(char) task.wait(1) if getRole(p) == "Murderer" then hookChar(char) end end) end)) track(workspace.DescendantAdded:Connect(function(obj) checkAndTrack(obj) end)) addToggle(mm2Page, "Knife Trail Tracker", 62, function(state) knifeTrailOn = state if not state then clearTrail() end end) end -- ═══════════════════════════════════════════════════════ -- FLEE THE FACILITY TAB (place ID 893973440) -- ═══════════════════════════════════════════════════════ local FTF_PLACE_ID = 893973440 local isInFTF = (game.PlaceId == FTF_PLACE_ID) if isInFTF then -- Insert the FTF tab into the sidebar dynamically local def = { name = "FTF", icon = "F" } local btn = newButton(sideScroll, { Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = C.surface, Text = "", ZIndex = 14, LayoutOrder = 7, }) corner(btn, 8) local acBar = newFrame(btn, { Size = UDim2.fromOffset(3, 24), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 0, 0.5, 0), BackgroundColor3 = C.accent, BackgroundTransparency = 1, ZIndex = 15, }) corner(acBar, 2) newLabel(btn, { Position = UDim2.fromOffset(14, 0), Size = UDim2.fromOffset(24, 42), Text = def.icon, Font = Enum.Font.GothamBold, TextSize = 16, TextColor3 = C.sub, ZIndex = 15, }) local lbl = newLabel(btn, { Position = UDim2.fromOffset(44, 0), Size = UDim2.new(1, -52, 1, 0), Text = def.name, Font = Enum.Font.GothamSemibold, TextSize = TXT, TextColor3 = C.sub, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local page = Instance.new("ScrollingFrame") page.Size = UDim2.fromScale(1, 1) page.BackgroundTransparency = 1 page.BorderSizePixel = 0 page.ScrollBarThickness = 3 page.ScrollBarImageColor3 = C.accent page.CanvasSize = UDim2.new(0, 0, 0, 0) page.Visible = false page.ZIndex = 13 page.Parent = content local pLayout = Instance.new("UIListLayout") pLayout.Padding = UDim.new(0, 6) pLayout.SortOrder = Enum.SortOrder.LayoutOrder pLayout.Parent = page local pPad = Instance.new("UIPadding") pPad.PaddingTop = UDim.new(0, 14) pPad.PaddingLeft = UDim.new(0, 14) pPad.PaddingRight = UDim.new(0, 14) pPad.PaddingBottom = UDim.new(0, 14) pPad.Parent = page pLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() page.CanvasSize = UDim2.fromOffset(0, pLayout.AbsoluteContentSize.Y + 28) end) tabPages["FTF"] = page tabBtns["FTF"] = { btn = btn, bar = acBar, lbl = lbl } btn.MouseButton1Click:Connect(function() if activeTab == "FTF" then return end if activeTab then tabPages[activeTab].Visible = false local o = tabBtns[activeTab] tween(o.btn, 0.12, { BackgroundColor3 = C.surface }) tween(o.lbl, 0.12, { TextColor3 = C.sub }) tween(o.bar, 0.12, { BackgroundTransparency = 1 }) end activeTab = "FTF" page.Visible = true tween(btn, 0.12, { BackgroundColor3 = C.card }) tween(lbl, 0.12, { TextColor3 = C.accentGlow }) tween(acBar, 0.12, { BackgroundTransparency = 0 }) end) btn.MouseEnter:Connect(function() if activeTab ~= "FTF" then tween(btn, 0.08, { BackgroundColor3 = C.cardHov }) end end) btn.MouseLeave:Connect(function() if activeTab ~= "FTF" then tween(btn, 0.08, { BackgroundColor3 = C.surface }) end end) -- ── Color scheme for FTF ────────────────────────── local FTF_COL = { Beast = Color3.fromRGB(255, 50, 50), -- red Survivor = Color3.fromRGB(80, 220, 120), -- green Computer = Color3.fromRGB(80, 180, 255), -- blue Pod = Color3.fromRGB(255, 180, 50), -- orange } -- ── State ───────────────────────────────────────────────── local beastEspOn = false local survivorEspOn = false local computerEspOn = false local podEspOn = false local ftfHighlights = {} local scannedMap = nil local scannedComps = {} local scannedPods = {} local lastChars = {} local ReplicatedStorage = game:GetService("ReplicatedStorage") local function isBeast(plr) local char = plr.Character if not char then return false end for _, v in char:GetChildren() do if v.Name == "BeastPowers" or v.Name == "BeastScript" then return true end end return false end local function getCurrentMap() local cm = ReplicatedStorage:FindFirstChild("CurrentMap") if not cm or cm.Value == "" then return nil end return workspace:FindFirstChild(tostring(cm.Value)) end local function addFTFHL(inst, col, label) if not inst or not inst.Parent then return end if ftfHighlights[inst] then for _, o in ipairs(ftfHighlights[inst]) do pcall(function() if o and o.Parent then o:Destroy() end end) end ftfHighlights[inst] = nil end local hl = Instance.new("Highlight") hl.FillColor = col hl.OutlineColor = col hl.FillTransparency = 0.55 hl.OutlineTransparency = 0 hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop hl.Adornee = inst hl.Parent = inst local bb local anchor if inst:IsA("Model") then anchor = inst:FindFirstChild("Head") or inst.PrimaryPart if not anchor then for _, d in inst:GetDescendants() do if d:IsA("BasePart") then anchor = d; break end end end elseif inst:IsA("BasePart") then anchor = inst else for _, d in inst:GetDescendants() do if d:IsA("BasePart") then anchor = d; break end end end if anchor and label then bb = Instance.new("BillboardGui") bb.Size = UDim2.fromOffset(160, 36) bb.StudsOffset = Vector3.new(0, 3, 0) bb.AlwaysOnTop = true bb.MaxDistance = math.huge bb.Parent = anchor newLabel(bb, { Size = UDim2.fromScale(1, 1), Text = label, Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = col, TextStrokeTransparency = 0, }) end ftfHighlights[inst] = { hl, bb } end local function removeFTFHL(inst) local h = ftfHighlights[inst] if not h then return end for _, o in ipairs(h) do pcall(function() if o and o.Parent then o:Destroy() end end) end ftfHighlights[inst] = nil end local function clearAllFTF() for inst in pairs(ftfHighlights) do removeFTFHL(inst) end scannedComps = {} scannedPods = {} scannedMap = nil end local function scanMapObjects() local map = getCurrentMap() if not map or map == scannedMap then return end scannedMap = map for inst in pairs(ftfHighlights) do local isChar = false for _, plr in Players:GetPlayers() do if plr.Character == inst then isChar = true; break end end if not isChar then removeFTFHL(inst) end end scannedComps = {} scannedPods = {} for _, obj in map:GetDescendants() do local n = obj.Name local nl = n:lower() if computerEspOn and n == "ComputerTable" and not scannedComps[obj] then scannedComps[obj] = true addFTFHL(obj, FTF_COL.Computer, "COMPUTER") end if podEspOn and (nl == "freezepod" or nl == "pod" or nl:find("freezepod") or nl:find("cryopod")) and not scannedPods[obj] then scannedPods[obj] = true addFTFHL(obj, FTF_COL.Pod, "FREEZE POD") end end end local ftfPlayerT = 0 track(RunService.Heartbeat:Connect(function(dt) ftfPlayerT = ftfPlayerT + dt if ftfPlayerT < 0.3 then return end ftfPlayerT = 0 for _, plr in Players:GetPlayers() do if plr == player then continue end local char = plr.Character if lastChars[plr] and lastChars[plr] ~= char then removeFTFHL(lastChars[plr]) lastChars[plr] = nil end if not char then continue end lastChars[plr] = char local beast = isBeast(plr) if beast and beastEspOn then addFTFHL(char, FTF_COL.Beast, "[ BEAST ] " .. plr.Name) elseif (not beast) and survivorEspOn then if not ftfHighlights[char] then addFTFHL(char, FTF_COL.Survivor, plr.Name) end else if ftfHighlights[char] then removeFTFHL(char) end end end for inst in pairs(ftfHighlights) do if not inst or not inst.Parent then removeFTFHL(inst) end end end)) -- Periodic rescan every 5 seconds to catch computers/pods on toggle local ftfRescanT = 0 track(RunService.Heartbeat:Connect(function(dt) ftfRescanT = ftfRescanT + dt if ftfRescanT < 5 then return end ftfRescanT = 0 if not (computerEspOn or podEspOn) then return end local map = getCurrentMap() if not map then return end -- Force rescan by clearing the scanned cache but keeping scannedMap -- so we only re-add missing objects, not rebuild everything for _, obj in map:GetDescendants() do local n = obj.Name local nl = n:lower() if computerEspOn and n == "ComputerTable" and not scannedComps[obj] then scannedComps[obj] = true addFTFHL(obj, FTF_COL.Computer, "COMPUTER") end if podEspOn and (nl == "freezepod" or nl == "pod" or nl:find("freezepod") or nl:find("cryopod")) and not scannedPods[obj] then scannedPods[obj] = true addFTFHL(obj, FTF_COL.Pod, "FREEZE POD") end end end)) task.spawn(function() local cm = ReplicatedStorage:WaitForChild("CurrentMap", 10) if not cm then return end cm:GetPropertyChangedSignal("Value"):Connect(function() task.wait(1) clearAllFTF() lastChars = {} scanMapObjects() end) if cm.Value ~= "" then task.wait(0.5) scanMapObjects() end end) track(player.CharacterAdded:Connect(function() task.wait(0.5) for _, plr in Players:GetPlayers() do if plr.Character and ftfHighlights[plr.Character] then removeFTFHL(plr.Character) end end lastChars = {} end)) track(Players.PlayerRemoving:Connect(function(plr) if lastChars[plr] then removeFTFHL(lastChars[plr]) lastChars[plr] = nil end end)) -- ── UI ──────────────────────────────────────────── addSection(page, "Flee the Facility", 1) addInfo(page, "Auto-detected — FTF exclusive tools.", 2, C.green) addSection(page, "ESP Toggles", 10) -- Legend card local legRow = makeCard(page, 56, 11) local lp = Instance.new("UIPadding") lp.Parent = legRow lp.PaddingLeft = UDim.new(0, 12) lp.PaddingTop = UDim.new(0, 10) local function legDot(col, x, y) local d = newFrame(legRow, { Size = UDim2.fromOffset(10, 10), Position = UDim2.fromOffset(x, y), BackgroundColor3 = col, ZIndex = 15, }) corner(d, 5) end local function legTxt(txt, col, x, y) newLabel(legRow, { Position = UDim2.fromOffset(x + 14, y - 2), Size = UDim2.fromOffset(80, 16), Text = txt, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = col, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) end legDot(FTF_COL.Beast, 0, 0) legTxt("Beast", FTF_COL.Beast, 0, 0) legDot(FTF_COL.Survivor, 90, 0) legTxt("Survivor", FTF_COL.Survivor, 90, 0) legDot(FTF_COL.Computer, 0, 22) legTxt("Computer", FTF_COL.Computer, 0, 22) legDot(FTF_COL.Pod, 90, 22) legTxt("Freeze Pod", FTF_COL.Pod, 90, 22) addToggle(page, "Beast ESP", 12, function(state) beastEspOn = state if not state then for _, plr in Players:GetPlayers() do if plr.Character then removeFTFHL(plr.Character) end end end showToast("Beast ESP", state and "Enabled" or "Disabled") end) addToggle(page, "Survivor ESP", 13, function(state) survivorEspOn = state if not state then for _, plr in Players:GetPlayers() do if plr.Character then removeFTFHL(plr.Character) end end end showToast("Survivor ESP", state and "Enabled" or "Disabled") end) addToggle(page, "Computer ESP", 14, function(state) computerEspOn = state if state then scannedMap = nil scannedComps = {} scanMapObjects() else local map = getCurrentMap() if map then for _, obj in map:GetDescendants() do if obj.Name == "ComputerTable" then removeFTFHL(obj) end end end scannedComps = {} end showToast("Computer ESP", state and "Enabled" or "Disabled") end) addToggle(page, "Freeze Pod ESP", 15, function(state) podEspOn = state if state then scannedMap = nil scannedPods = {} scanMapObjects() else local map = getCurrentMap() if map then for _, obj in map:GetDescendants() do local n = obj.Name if n == "FreezePod" or n == "Pod" or n:lower():find("freezepod") or n:lower():find("cryopod") then removeFTFHL(obj) end end end scannedPods = {} end showToast("Freeze Pod ESP", state and "Enabled" or "Disabled") end) addSection(page, "Live Status", 20) local mapRow = makeCard(page, 40, 21) local mapLbl = newLabel(mapRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Map: scanning...", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local beastRow = makeCard(page, 40, 22) local beastLbl = newLabel(beastRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Beast: not detected", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = FTF_COL.Beast, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local roleRow = makeCard(page, 40, 23) local roleLbl = newLabel(roleRow, { Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -28, 1, 0), Text = "Your role: checking...", Font = Enum.Font.Gotham, TextSize = TXT, TextColor3 = C.text, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 15, }) local statT = 0 track(RunService.Heartbeat:Connect(function(dt) statT = statT + dt if statT < 0.7 then return end statT = 0 -- Map name local cm = ReplicatedStorage:FindFirstChild("CurrentMap") if cm and cm.Value and cm.Value ~= "" then mapLbl.Text = "Map: " .. tostring(cm.Value) else mapLbl.Text = "Map: lobby / intermission" end -- Beast detection local beastFound = nil for _, plr in Players:GetPlayers() do if isBeast(plr) then beastFound = plr; break end end beastLbl.Text = beastFound and ("Beast: " .. beastFound.Name) or "Beast: not detected" -- Your role if isBeast(player) then roleLbl.Text = "Your role: BEAST" roleLbl.TextColor3 = FTF_COL.Beast else roleLbl.Text = "Your role: Survivor" roleLbl.TextColor3 = FTF_COL.Survivor end end)) addInfo(page, "ESP refreshes twice per second and re-scans on each new round.", 30, Color3.fromRGB(100, 160, 210)) end local setPage = tabPages["Settings"] addSection(setPage, "Keybinds", 1) addInfo(setPage, "RightShift - Toggle hub open / closed", 2, C.sub) addSection(setPage, "About", 10) addInfo(setPage, "KAY'S HUB v1.2\nBuilt for Delta-style executors.\nIncludes MM2 mode, music, spectate, and chat log. This is early development, update soon!", 11, C.sub) winOuter.Size = UDim2.fromOffset(WIN_W, 0) tween(winOuter, 0.45, { Size = UDim2.fromOffset(WIN_W, WIN_H) }, Enum.EasingStyle.Back) task.delay(0.5, function() showToast("Welcome", "Kay's Hub loaded.") if isInMM2 then task.delay(0.4, function() showToast("MM2 Detected", "Murder Mystery 2 tools enabled.") end) end end)