local Players = game:GetService("Players") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") -- GUI local ScreenGui = Instance.new("ScreenGui", PlayerGui) ScreenGui.Name = "OrientationGUI" ScreenGui.ResetOnSpawn = false local Frame = Instance.new("Frame", ScreenGui) Frame.Size = UDim2.new(0, 260, 0, 150) Frame.Position = UDim2.new(0.5, -130, 0.4, 0) Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) Frame.Active = true Frame.Draggable = true Frame.BorderSizePixel = 0 local UICorner = Instance.new("UICorner", Frame) UICorner.CornerRadius = UDim.new(0, 12) -- Tytuł local Title = Instance.new("TextLabel", Frame) Title.Size = UDim2.new(1, 0, 0, 40) Title.Text = "Screen Orientation" Title.TextColor3 = Color3.new(1,1,1) Title.BackgroundTransparency = 1 Title.Font = Enum.Font.GothamBold Title.TextSize = 18 -- Portrait Button local Portrait = Instance.new("TextButton", Frame) Portrait.Size = UDim2.new(0.45, 0, 0, 40) Portrait.Position = UDim2.new(0.05, 0, 0.45, 0) Portrait.Text = "Portrait" Portrait.BackgroundColor3 = Color3.fromRGB(70, 130, 180) Portrait.TextColor3 = Color3.new(1,1,1) Portrait.Font = Enum.Font.Gotham Portrait.TextSize = 16 Instance.new("UICorner", Portrait).CornerRadius = UDim.new(0, 10) -- Landscape Button local Landscape = Instance.new("TextButton", Frame) Landscape.Size = UDim2.new(0.45, 0, 0, 40) Landscape.Position = UDim2.new(0.5, 0, 0.45, 0) Landscape.Text = "Sensor" Landscape.BackgroundColor3 = Color3.fromRGB(60, 179, 113) Landscape.TextColor3 = Color3.new(1,1,1) Landscape.Font = Enum.Font.Gotham Landscape.TextSize = 16 Instance.new("UICorner", Landscape).CornerRadius = UDim.new(0, 10) -- Funkcje Portrait.MouseButton1Click:Connect(function() pcall(function() PlayerGui.ScreenOrientation = Enum.ScreenOrientation.Portrait end) end) Landscape.MouseButton1Click:Connect(function() pcall(function() PlayerGui.ScreenOrientation = Enum.ScreenOrientation.Sensor end) end)