local WindUI = loadstring(game:HttpGet("https://github.com/Footagesus/WindUI/releases/latest/download/main.lua"))() function gradient(text, startColor, endColor) local result = "" local length = #text for i = 1, length do local t = (i - 1) / math.max(length - 1, 1) local r = math.floor((startColor.R + (endColor.R - startColor.R) * t) * 255) local g = math.floor((startColor.G + (endColor.G - startColor.G) * t) * 255) local b = math.floor((startColor.B + (endColor.B - startColor.B) * t) * 255) local char = text:sub(i, i) result = result .. "" .. char .. "" end return result end local TEAM_COLORS = { ["Inmates"] = Color3.fromRGB(255, 165, 0), ["Guards"] = Color3.fromRGB(0, 0, 255), ["Escapists"] = Color3.fromRGB(255, 0, 0) } local playerConnections = {} local function managePlayerHighlight(player, teamName, state) if player and player.Character and player ~= game.Players.LocalPlayer then local highlightName = "TeamHighlight_" .. teamName local existingHighlight = player.Character:FindFirstChild(highlightName) if state and not existingHighlight then local h = Instance.new("Highlight") h.Name = highlightName h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop h.FillColor = TEAM_COLORS[teamName] or Color3.new(1, 1, 1) h.FillTransparency = 0.4 h.OutlineTransparency = 0.4 h.Parent = player.Character elseif not state and existingHighlight then existingHighlight:Destroy() end end end local function handleTeamESP(teamName, state) if playerConnections[teamName] then for _, conn in ipairs(playerConnections[teamName]) do conn:Disconnect() end end playerConnections[teamName] = {} for _, player in pairs(game.Players:GetPlayers()) do managePlayerHighlight(player, teamName, false) end if state then for _, player in pairs(game.Players:GetPlayers()) do if player.Team and player.Team.Name == teamName then managePlayerHighlight(player, teamName, true) table.insert(playerConnections[teamName], player.CharacterAdded:Connect(function() managePlayerHighlight(player, teamName, true) end)) table.insert(playerConnections[teamName], player:GetPropertyChangedSignal("Team"):Connect(function() if player.Team and player.Team.Name == teamName then managePlayerHighlight(player, teamName, true) else managePlayerHighlight(player, teamName, false) end end)) end end table.insert(playerConnections[teamName], game.Players.PlayerAdded:Connect(function(player) table.insert(playerConnections[teamName], player.CharacterAdded:Connect(function() if player.Team and player.Team.Name == teamName then managePlayerHighlight(player, teamName, true) end end)) table.insert(playerConnections[teamName], player:GetPropertyChangedSignal("Team"):Connect(function() if player.Team and player.Team.Name == teamName then managePlayerHighlight(player, teamName, true) else managePlayerHighlight(player, teamName, false) end end)) end)) table.insert(playerConnections[teamName], game.Players.PlayerRemoving:Connect(function(player) managePlayerHighlight(player, teamName, false) end)) end end local Window = WindUI:CreateWindow({ Title = "Asylum Life", Icon = "rbxassetid://129260712070622", IconThemed = true, Author = "v1.0", Folder = "AsylumLife", Size = UDim2.fromOffset(580, 460), Transparent = true, Theme = "Dark", User = { Enabled = true, Callback = function() print("clicked") end, Anonymous = true }, SideBarWidth = 200, ScrollBarEnabled = true, }) local ESPTab = Window:Tab({ Title = "ESP", Icon = "zap", ShowTabTitle = true }) local TeleportsTab = Window:Tab({ Title = "Teleports", Icon = "footprints", ShowTabTitle = true }) for _, team in ipairs({"Inmates", "Guards", "Escapists"}) do ESPTab:Toggle({ Title = team .. " ESP", Value = false, Callback = function(state) print(team .. " ESP enabled: " .. tostring(state)) handleTeamESP(team, state) end }) end TeleportsTab:Button({ Title = "Guard's Room", Desc = "Teleports you to the guards' spawn point.", Callback = function() local pos = Vector3.new(20.563, 3.942, -108.951) local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if hrp then hrp.CFrame = CFrame.new(pos) end end }) TeleportsTab:Button({ Title = "Escapists' Base", Desc = "Teleports you to the escapists' spawn point.", Callback = function() local pos = Vector3.new(-298.426, 14.42, -1139.374) local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if hrp then hrp.CFrame = CFrame.new(pos) end end }) TeleportsTab:Button({ Title = "Medic Room", Desc = "Teleports you to the Medic Room (No Gamepass Required).", Callback = function() local pos = Vector3.new(-60.065, 3.942, -11.764) local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if hrp then hrp.CFrame = CFrame.new(pos) end end }) Window:SelectTab(ESPTab) Window:OnClose(function() print("UI Successfully closed.") for teamName in pairs(TEAM_COLORS) do handleTeamESP(teamName, false) end end)