local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local IMAGE_ID = "rbxassetid://9825825713" -- SafeZone data local ZONES = { { Name = "OLD", Target = Vector3.new(486.130, -14.698, -4804.921), Platform = true, Walls = true }, { Name = "NEW", Target = Vector3.new(-9.830, 221.830, -31563.822), Platform = false, Walls = false } } local ZONE_SIZE = 30 local HALF_ZONE = ZONE_SIZE / 2 local WALL_HEIGHT = 18 local oldCFrame = nil local activeTarget = nil local activeZone = nil local inSafeZone = false local noclip = false local minimized = false local animation = nil local EXPANDED_HEIGHT = 250 local COLLAPSED_HEIGHT = 42 local CONTENT_HEIGHT = 208 local animationInfo = TweenInfo.new( 0.35, Enum.EasingStyle.Quint, Enum.EasingDirection.Out ) -- Cleanup local oldGui = playerGui:FindFirstChild("SafeZone") if oldGui then oldGui:Destroy() end local oldObjects = workspace:FindFirstChild("SafeZoneObjects") if oldObjects then oldObjects:Destroy() end -- Remove leftover walls around NEW only local newTarget = ZONES[2].Target for _, object in ipairs(workspace:GetDescendants()) do if object:IsA("BasePart") then local isOldWall = object.Name == "SafeZoneWall" local isOldPlatform = object.Name == "OldSafeZonePlatform" if (isOldWall or isOldPlatform) and (object.Position - newTarget).Magnitude < 50 then object:Destroy() end end end local objects = Instance.new("Folder") objects.Name = "SafeZoneObjects" objects.Parent = workspace -- GUI local gui = Instance.new("ScreenGui") gui.Name = "SafeZone" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 100 gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = playerGui local main = Instance.new("Frame") main.Size = UDim2.fromOffset(310, EXPANDED_HEIGHT) main.Position = UDim2.new(0.5, -155, 0.5, -125) main.BackgroundColor3 = Color3.fromRGB(17, 19, 26) main.BorderSizePixel = 0 main.ClipsDescendants = false main.Parent = gui -- Square outline local mainStroke = Instance.new("UIStroke") mainStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border mainStroke.Thickness = 2 mainStroke.Transparency = 0 mainStroke.Parent = main -- Background image local mainImage = Instance.new("ImageLabel") mainImage.Size = UDim2.fromScale(1, 1) mainImage.BackgroundTransparency = 1 mainImage.Image = IMAGE_ID mainImage.ImageTransparency = 0.88 mainImage.ScaleType = Enum.ScaleType.Crop mainImage.ZIndex = 0 mainImage.Parent = main -- Header local top = Instance.new("Frame") top.Size = UDim2.new(1, 0, 0, 42) top.BackgroundColor3 = Color3.fromRGB(27, 32, 44) top.BackgroundTransparency = 0.05 top.BorderSizePixel = 0 top.ZIndex = 2 top.Parent = main local topImage = Instance.new("ImageLabel") topImage.Size = UDim2.fromScale(1, 1) topImage.BackgroundTransparency = 1 topImage.Image = IMAGE_ID topImage.ImageTransparency = 0.88 topImage.ScaleType = Enum.ScaleType.Crop topImage.ZIndex = 2 topImage.Parent = top local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -90, 1, 0) title.Position = UDim2.fromOffset(14, 0) title.BackgroundTransparency = 1 title.Text = "Safe Zone" title.TextColor3 = Color3.fromRGB(245, 247, 255) title.TextSize = 17 title.Font = Enum.Font.GothamBold title.TextXAlignment = Enum.TextXAlignment.Left title.ZIndex = 3 title.Parent = top local minimize = Instance.new("TextButton") minimize.Size = UDim2.fromOffset(40, 42) minimize.Position = UDim2.new(1, -80, 0, 0) minimize.BackgroundTransparency = 1 minimize.Text = "—" minimize.TextColor3 = Color3.fromRGB(220, 225, 240) minimize.TextSize = 20 minimize.Font = Enum.Font.GothamBold minimize.ZIndex = 4 minimize.Parent = top local close = Instance.new("TextButton") close.Size = UDim2.fromOffset(40, 42) close.Position = UDim2.new(1, -40, 0, 0) close.BackgroundTransparency = 1 close.Text = "×" close.TextColor3 = Color3.fromRGB(255, 110, 110) close.TextSize = 25 close.Font = Enum.Font.GothamBold close.ZIndex = 4 close.Parent = top local content = Instance.new("Frame") content.Name = "Content" content.Size = UDim2.new(1, 0, 0, CONTENT_HEIGHT) content.Position = UDim2.fromOffset(0, 42) content.BackgroundTransparency = 1 content.BorderSizePixel = 0 content.ClipsDescendants = true content.ZIndex = 2 content.Parent = main -- UI Helpers local function createSection(text, y) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -40, 0, 20) label.Position = UDim2.new(0, 20, 0, y) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.fromRGB(145, 160, 190) label.TextSize = 12 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 3 label.Parent = content return label end local function createButton(text, y) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -40, 0, 38) btn.Position = UDim2.new(0, 20, 0, y) btn.BackgroundColor3 = Color3.fromRGB(38, 45, 61) btn.BorderSizePixel = 0 btn.Text = text btn.TextColor3 = Color3.fromRGB(240, 243, 255) btn.TextSize = 13 btn.Font = Enum.Font.GothamSemibold btn.AutoButtonColor = false btn.ClipsDescendants = true btn.ZIndex = 3 btn.Parent = content local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = btn local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(85, 105, 145) stroke.Transparency = 0.5 stroke.Thickness = 1 stroke.Parent = btn btn.MouseEnter:Connect(function() TweenService:Create(btn, TweenInfo.new(0.15), { BackgroundColor3 = Color3.fromRGB(55, 67, 91) }):Play() end) btn.MouseLeave:Connect(function() TweenService:Create(btn, TweenInfo.new(0.15), { BackgroundColor3 = Color3.fromRGB(38, 45, 61) }):Play() end) return btn end -- STATUS createSection("STATUS", 7) local statusFrame = Instance.new("Frame") statusFrame.Size = UDim2.new(1, -40, 0, 38) statusFrame.Position = UDim2.new(0, 20, 0, 28) statusFrame.BackgroundColor3 = Color3.fromRGB(35, 41, 55) statusFrame.BorderSizePixel = 0 statusFrame.ClipsDescendants = true statusFrame.ZIndex = 3 statusFrame.Parent = content local statusCorner = Instance.new("UICorner") statusCorner.CornerRadius = UDim.new(0, 8) statusCorner.Parent = statusFrame local statusDot = Instance.new("Frame") statusDot.Size = UDim2.fromOffset(10, 10) statusDot.Position = UDim2.new(0, 14, 0.5, -5) statusDot.BackgroundColor3 = Color3.fromRGB(200, 60, 60) statusDot.BorderSizePixel = 0 statusDot.ZIndex = 4 statusDot.Parent = statusFrame local statusDotCorner = Instance.new("UICorner") statusDotCorner.CornerRadius = UDim.new(1, 0) statusDotCorner.Parent = statusDot local statusText = Instance.new("TextLabel") statusText.Size = UDim2.new(1, -50, 1, 0) statusText.Position = UDim2.fromOffset(36, 0) statusText.BackgroundTransparency = 1 statusText.Text = "OUTSIDE" statusText.TextColor3 = Color3.fromRGB(200, 200, 200) statusText.TextSize = 14 statusText.Font = Enum.Font.GothamBold statusText.TextXAlignment = Enum.TextXAlignment.Left statusText.ZIndex = 4 statusText.Parent = statusFrame -- CONTROLS createSection("CONTROLS", 73) local oldButton = createButton("Old Zone", 94) oldButton.Size = UDim2.new(0.5, -25, 0, 38) oldButton.Position = UDim2.new(0, 20, 0, 94) local newButton = createButton("New Zone", 94) newButton.Size = UDim2.new(0.5, -25, 0, 38) newButton.Position = UDim2.new(0.5, 5, 0, 94) -- TELEPORT createSection("TELEPORT", 148) local backButton = createButton("Teleport Back", 169) -- STATUS FUNCTIONS local function updateStatus() if inSafeZone and activeZone then statusText.Text = "IN " .. activeZone.Name .. " ZONE" statusDot.BackgroundColor3 = Color3.fromRGB(60, 200, 100) statusText.TextColor3 = Color3.fromRGB(150, 240, 170) else statusText.Text = "OUTSIDE" statusDot.BackgroundColor3 = Color3.fromRGB(200, 60, 60) statusText.TextColor3 = Color3.fromRGB(200, 200, 200) end end local function disableBack() backButton.Active = false backButton.AutoButtonColor = false backButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) backButton.TextColor3 = Color3.fromRGB(90, 90, 90) end local function enableBack() backButton.Active = true backButton.AutoButtonColor = true backButton.BackgroundColor3 = Color3.fromRGB(38, 45, 61) backButton.TextColor3 = Color3.new(1, 1, 1) end disableBack() updateStatus() -- WORLD local function createWall(size, position) local wall = Instance.new("Part") wall.Name = "SafeZoneWall" wall.Size = size wall.Position = position wall.Anchored = true wall.CanCollide = true wall.Transparency = 1 wall.Parent = objects end local function createZone(zone) local target = zone.Target local platformY = target.Y - 4 -- OLD ZONE: ORIGINAL CREATION if zone.Platform then local platform = Instance.new("Part") platform.Name = "OldSafeZonePlatform" platform.Size = Vector3.new(30, 0.5, 30) platform.Position = Vector3.new(target.X, platformY, target.Z) platform.Anchored = true platform.CanCollide = true platform.Material = Enum.Material.Neon platform.Color = Color3.fromRGB(0, 170, 255) platform.Parent = objects for _, face in ipairs(Enum.NormalId:GetEnumItems()) do local decal = Instance.new("Decal") decal.Texture = IMAGE_ID decal.Face = face decal.Transparency = 0.15 decal.Parent = platform end end -- Walls only for zones that explicitly enable them if zone.Walls then local wallY = platformY + WALL_HEIGHT / 2 createWall( Vector3.new(1, WALL_HEIGHT, 30), Vector3.new(target.X - HALF_ZONE, wallY, target.Z) ) createWall( Vector3.new(1, WALL_HEIGHT, 30), Vector3.new(target.X + HALF_ZONE, wallY, target.Z) ) createWall( Vector3.new(30, WALL_HEIGHT, 1), Vector3.new(target.X, wallY, target.Z - HALF_ZONE) ) createWall( Vector3.new(30, WALL_HEIGHT, 1), Vector3.new(target.X, wallY, target.Z + HALF_ZONE) ) end end for _, zone in ipairs(ZONES) do createZone(zone) end -- CHARACTER local function getCharacter() return player.Character or player.CharacterAdded:Wait() end local function disableNoclip() noclip = false local character = player.Character if not character then return end for _, object in ipairs(character:GetDescendants()) do if object:IsA("BasePart") then object.CanCollide = true end end end local function enableNoclip() noclip = true local character = player.Character if not character then return end for _, object in ipairs(character:GetDescendants()) do if object:IsA("BasePart") then object.CanCollide = false end end end local noclipConnection = RunService.Stepped:Connect(function() if not noclip then return end local character = player.Character if not character then return end for _, object in ipairs(character:GetDescendants()) do if object:IsA("BasePart") then object.CanCollide = false end end end) -- Boundary: OLD only local boundaryConnection = RunService.Heartbeat:Connect(function() if not inSafeZone or not activeTarget then return end -- NEW has no invisible boundaries if not activeZone or not activeZone.Walls then return end local character = player.Character if not character then return end local root = character:FindFirstChild("HumanoidRootPart") if not root then return end local pos = root.Position local target = activeTarget local minX = target.X - HALF_ZONE + 1.5 local maxX = target.X + HALF_ZONE - 1.5 local minZ = target.Z - HALF_ZONE + 1.5 local maxZ = target.Z + HALF_ZONE - 1.5 local newX = math.clamp(pos.X, minX, maxX) local newZ = math.clamp(pos.Z, minZ, maxZ) if newX ~= pos.X or newZ ~= pos.Z then root.CFrame = CFrame.new(newX, pos.Y, newZ) * root.CFrame.Rotation end end) -- TELEPORT local function teleportToZone(zone) local character = getCharacter() if not inSafeZone then oldCFrame = character:GetPivot() end local target = zone.Target character:PivotTo( CFrame.new(target.X, target.Y + 2, target.Z) ) activeTarget = target activeZone = zone inSafeZone = true enableNoclip() enableBack() updateStatus() end oldButton.MouseButton1Click:Connect(function() teleportToZone(ZONES[1]) end) newButton.MouseButton1Click:Connect(function() teleportToZone(ZONES[2]) end) backButton.MouseButton1Click:Connect(function() if not inSafeZone or not oldCFrame then return end disableNoclip() getCharacter():PivotTo(oldCFrame) oldCFrame = nil activeTarget = nil activeZone = nil inSafeZone = false disableBack() updateStatus() end) -- Rainbow outline local rainbowConnection = RunService.RenderStepped:Connect(function() local hue = (os.clock() * 0.15) % 1 mainStroke.Color = Color3.fromHSV(hue, 0.9, 1) end) -- CLOSE close.MouseButton1Click:Connect(function() disableNoclip() if inSafeZone and oldCFrame then getCharacter():PivotTo(oldCFrame) end inSafeZone = false oldCFrame = nil activeTarget = nil activeZone = nil noclipConnection:Disconnect() boundaryConnection:Disconnect() rainbowConnection:Disconnect() objects:Destroy() gui:Destroy() end) -- MINIMIZE minimize.MouseButton1Click:Connect(function() minimized = not minimized if animation then animation:Cancel() end local targetHeight = minimized and 0 or CONTENT_HEIGHT local mainHeight = minimized and COLLAPSED_HEIGHT or EXPANDED_HEIGHT animation = TweenService:Create(content, animationInfo, { Size = UDim2.new(1, 0, 0, targetHeight) }) local mainAnimation = TweenService:Create(main, animationInfo, { Size = UDim2.fromOffset(310, mainHeight) }) minimize.Text = minimized and "+" or "—" animation:Play() mainAnimation:Play() end) -- DRAG GUI local dragging = false local dragStart local startPosition local dragInput top.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPosition = main.Position dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if not dragging then return end if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragStart main.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if input == dragInput or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end)