local Fluent = loadstring(game:HttpGet("https://[Log in to view URL]"))()
local HttpService = game:GetService("HttpService")
local UserInputService = game:GetService("UserInputService")

-- MUST DEFINE THESE AT THE TOP TO PREVENT ERRORS
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")

local Window = Fluent:CreateWindow({
    Title = "NWR's Hub | Emergency Hamburg",
    SubTitle = "by whoisnwr",
    TabWidth = 160,
    Size = UDim2.fromOffset(580, 460),
    Acrylic = true,
    Theme = "Dark",
    MinimizeKey = Enum.KeyCode.RightControl
})

local Tabs = {
    Fairness = Window:AddTab({ Title = "Main", Icon = "shield" }),
    Settings = Window:AddTab({ Title = "Settings", Icon = "settings" }),
    Teleports = Window:AddTab({ Title = "Teleports", Icon = "map-pin" })
}

local TeamSettings = {
    ["TruckCompany"] = Color3.fromRGB(0, 100, 0),
    ["Prisoner"] = Color3.fromRGB(0, 0, 0),
    ["Police"] = Color3.fromRGB(0, 191, 255),
    ["FireDepartment"] = Color3.fromRGB(255, 0, 0),
    ["Citizen"] = Color3.fromRGB(163, 162, 165),
    ["BusCompany"] = Color3.fromRGB(102, 51, 153),
    ["ADAC"] = Color3.fromRGB(255, 140, 0)
}

local function updateESP()
    for _, player in pairs(Players:GetPlayers()) do
        -- 1. Skip yourself (the Head Dev) so you aren't highlighted
        if player == Players.LocalPlayer then 
            local myChar = player.Character
            if myChar and myChar:FindFirstChild("FairnessHighlight") then
                myChar.FairnessHighlight:Destroy()
            end
            continue 
        end

        local char = player.Character
        if char then
            local hl = char:FindFirstChild("FairnessHighlight")
            
            if ESP_Enabled then
                if not hl then
                    -- 2. Create it once, don't keep re-creating it (prevents flashing)
                    hl = Instance.new("Highlight")
                    hl.Name = "FairnessHighlight"
                    hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
                    hl.FillTransparency = 0.5
                    hl.OutlineTransparency = 0
                    hl.Parent = char
                end
                
                -- 3. Keep properties constant
                hl.Enabled = true
                local teamName = player.Team and player.Team.Name or "Citizen"
                local targetColor = TeamSettings[teamName] or Color3.new(1, 1, 1)
                
                -- Only update color if it actually changed to save performance
                if hl.FillColor ~= targetColor then
                    hl.FillColor = targetColor
                    hl.OutlineColor = targetColor
                end
            else
                if hl then hl.Enabled = false end
            end
        end
    end
end

-- Improved loop: faster response but checks for existence to stop flashing
task.spawn(function()
    while true do
        updateESP()
        task.wait(1) -- 1 second is plenty for team checks without causing lag
    end
end)

-- --- TAB: MAIN ---
local FairnessSection = Tabs.Fairness:AddSection("Visuals")

FairnessSection:AddToggle("ESPToggle", {
    Title = "Global Player Highlights",
    Description = "Shows everyone's location based on team color",
    Default = false,
    Callback = function(Value)
        ESP_Enabled = Value
        updateESP()
    end
})
local FlySection = Tabs.Fairness:AddSection("Stealth Flight")

local Flying = false
local Speed = 60 -- Keeping it at a safe 'Running' speed
local GhostFloor = nil

FlySection:AddToggle("FlyToggle", {
    Title = "Stealth Fly",
    Default = false,
    Callback = function(Value)
        Flying = Value
        local char = game.Players.LocalPlayer.Character
        local root = char and char:FindFirstChild("HumanoidRootPart")
        local hum = char and char:FindFirstChild("Humanoid")

        if Flying then
            -- Create the Ghost Floor the server requires
            GhostFloor = Instance.new("Part")
            GhostFloor.Size = Vector3.new(6, 1, 6)
            GhostFloor.Transparency = 1
            GhostFloor.Anchored = true
            GhostFloor.Parent = workspace
            
            -- Flight Loop
            task.spawn(function()
                while Flying and root and hum do
                    local MoveDir = hum.MoveDirection
                    local Camera = workspace.CurrentCamera.CFrame
                    
                    -- Calculate movement based on where you look
                    local Velocity = Vector3.new(0, 0, 0)
                    if MoveDir.Magnitude > 0 then
                        Velocity = MoveDir * Speed
                    end
                    
                    -- Vertical Movement (Space to go up, Ctrl to go down)
                    if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
                        Velocity = Velocity + Vector3.new(0, Speed, 0)
                    elseif game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
                        Velocity = Velocity + Vector3.new(0, -Speed, 0)
                    end

                    -- Update Position & Ghost Floor
                    root.CFrame = root.CFrame + (Velocity * 0.016)
                    root.Velocity = Vector3.new(0, 0, 0)
                    GhostFloor.CFrame = root.CFrame * CFrame.new(0, -3.5, 0)
                    
                    task.wait()
                end
                
                if GhostFloor then GhostFloor:Destroy() end
            end)
        else
            if GhostFloor then GhostFloor:Destroy() end
        end
    end
})

FairnessSection:AddButton({
    Title = "Force Refresh Highlights",
    Description = "Fixes colors if players switched teams recently",
    Callback = function()
        updateESP()
        Fluent:Notify({ Title = "Fairness System", Content = "Visuals Refreshed", Duration = 3 })
    end
})

-- --- TAB: SETTINGS ---
local ServerSection = Tabs.Settings:AddSection("Server Management")

ServerSection:AddButton({
    Title = "Rejoin Game",
    Description = "Fast-teleport back into the same server",
    Callback = function()
        Window:Dialog({
            Title = "Confirm Rejoin",
            Content = "Are you sure you want to rejoin this server?",
            Buttons = {
                {
                    Title = "Yes, Rejoin",
                    Callback = function()
                        local lp = Players.LocalPlayer
                        if #Players:GetPlayers() <= 1 then
                            TeleportService:Teleport(game.PlaceId, lp)
                        else
                            TeleportService:TeleportToPlaceInstance(game.PlaceId, game.JobId, lp)
                        end
                    end
                },
                {
                    Title = "Cancel",
                    Callback = function() end
                }
            }
        })
    end
})
ServerSection:AddButton({
    Title = "Server Hop",
    Description = "Teleport to a different active server",
    Callback = function()
        local function hop()
            local url = "https://[Log in to view URL]" .. game.PlaceId .. "/servers/Public?sortOrder=Desc&limit=100"
            local success, result = pcall(function()
                return HttpService:JSONDecode(game:HttpGet(url))
            end)

            if success and result and result.data then
                for _, server in pairs(result.data) do
                    if server.playing < server.maxPlayers and server.id ~= game.JobId then
                        TeleportService:TeleportToPlaceInstance(game.PlaceId, server.id, Players.LocalPlayer)
                        break
                    end
                end
            else
                Fluent:Notify({ Title = "Error", Content = "Failed to find a server.", Duration = 3 })
            end
        end
        hop()
    end
})
ServerSection:AddKeybind("MenuToggleKey", {
    Title = "Minimize Key",
    Description = "Change the key used to open/close the menu",
    Mode = "Toggle",
    Default = "RightControl",
    ChangedCallback = function(New)
        Window.MinimizeKey = New
    end,
    -- This part ensures it actually triggers even if the internal system fails
    Callback = function(Value)
        Window:Minimize()
    end
})

-- 3. (Optional) Force the UI to toggle if the internal system misses it
UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if not gameProcessed and input.KeyCode == Window.MinimizeKey then
        Window:Minimize()
    end
end)
-- --- TAB: TELEPORTS ---
local TeleportSection = Tabs.Teleports:AddSection("Emergency Hamburg Locations")

-- STOP BUTTON
TeleportSection:AddButton({
    Title = "STOP ALL TELEPORTS",
    Description = "Immediately cancels current movement and drops you",
    Callback = function()
        _G.TeleportActive = false
        Fluent:Notify({ Title = "System", Content = "Emergency Stop Triggered", Duration = 3 })
    end
})

local Locations = {
    ["Police Station"] = Vector3.new(-1671.36, 5.47, 2763.15),
    ["Club"] = Vector3.new(-1747.91, 11.09, 3015.92),
    ["Gas N Go"] = Vector3.new(-1516.56, 5.72, 3762.77),
    ["Elbe Jewels"] = Vector3.new(-424.94, 21.24, 3576.96),
    ["Bank"] = Vector3.new(-1240.94, 7.72, 3144.96),
    ["Ares Gas"] = Vector3.new(-836.77, 5.01, 1531.86),
    ["Hospital"] = Vector3.new(-99.23, 5.47, 1091.17),
    ["Tool Shop"] = Vector3.new(-754.98, 5.46, 624.17),
    ["Dealership"] = Vector3.new(-1402.00, 5.47, 957.86),
    ["Osso Fuel"] = Vector3.new(-79.59, 5.20, -785.21),
    ["Smuggler"] = Vector3.new(1105.52, 29.19, 1875.98),
    ["Container Robbery"] = Vector3.new(1105.71, 28.66, 2315.70)
}

for Name, Coords in pairs(Locations) do
    TeleportSection:AddButton({
        Title = Name,
        Description = "Burst & Ground Drop TP",
        Callback = function()
            local char = game.Players.LocalPlayer.Character
            local root = char and char:FindFirstChild("HumanoidRootPart")
            if not root then return end

            _G.TeleportActive = true -- Set to true when starting
            
            local TargetPos = Coords
            local MoveSpeed = 80      
            local BurstDuration = 5.0 
            local RestDuration = 1.5  
            
            task.spawn(function()
                local plat
                local function CreatePlat()
                    if plat then plat:Destroy() end
                    plat = Instance.new("Part")
                    plat.Size = Vector3.new(12, 1, 12)
                    plat.Anchored = true
                    plat.Transparency = 1
                    plat.Parent = workspace
                end

                CreatePlat()
                local LastRest = tick()

                while _G.TeleportActive and (root.Position - TargetPos).Magnitude > 5 do
                    local Current = tick()

                    -- --- THE DROP PHASE ---
                    if (Current - LastRest) > BurstDuration then
                        if plat then plat:Destroy() plat = nil end
                        root.Velocity = Vector3.new(0, 0, 0)

                        local RayParams = RaycastParams.new()
                        RayParams.FilterDescendantsInstances = {char}
                        local RayResult = workspace:Raycast(root.Position + Vector3.new(0, 10, 0), Vector3.new(0, -50, 0), RayParams)
                        if RayResult then
                            root.CFrame = CFrame.new(RayResult.Position + Vector3.new(0, 3, 0))
                        end

                        task.wait(RestDuration)
                        if not _G.TeleportActive then break end -- Check if stop was pressed during wait
                        
                        CreatePlat()
                        LastRest = tick()
                    end

                    -- --- THE MOVEMENT PHASE ---
                    if plat and _G.TeleportActive then
                        local Direction = (TargetPos - root.Position).Unit
                        local NextPos = root.Position + (Direction * (MoveSpeed * 0.016))

                        local RayParams = RaycastParams.new()
                        RayParams.FilterDescendantsInstances = {char, plat}
                        local RayResult = workspace:Raycast(NextPos + Vector3.new(0, 50, 0), Vector3.new(0, -100, 0), RayParams)
                        
                        local GroundY = RayResult and RayResult.Position.Y or NextPos.Y
                        local FinalPos = Vector3.new(NextPos.X, GroundY + 1.1, NextPos.Z)

                        root.CFrame = CFrame.new(FinalPos)
                        plat.CFrame = CFrame.new(FinalPos - Vector3.new(0, 1.1, 0))
                        root.Velocity = Vector3.new(0, 0, 0)
                    end

                    task.wait()
                    if not char or not root.Parent then break end
                end

                -- Final Cleanup
                if plat then plat:Destroy() end
                _G.TeleportActive = false
                
                if (root.Position - TargetPos).Magnitude < 6 then
                    root.CFrame = CFrame.new(TargetPos + Vector3.new(0, 2, 0))
                    Fluent:Notify({ Title = "Arrived", Content = "Reached " .. Name, Duration = 3 })
                end
            end)
        end
    })
end
-- Auto-update loop
task.spawn(function()
    while true do
        updateESP()
        task.wait(2) 
    end
end)

Window:SelectTab(1)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: