Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local teleportPosition = Vector3.new(-65, 97, -18.5)
- -- Create main GUI
- local gui = Instance.new("ScreenGui")
- gui.Name = "TeleportScrollUI"
- gui.ResetOnSpawn = false
- gui.Parent = player:WaitForChild("PlayerGui")
- -- POLEREX Title
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(0, 300, 0, 50)
- title.Position = UDim2.new(0.5, -150, 0.5, -160)
- title.Text = "POLEREX"
- title.Font = Enum.Font.GothamBold
- title.TextSize = 32
- title.TextColor3 = Color3.new(1, 1, 1)
- title.BackgroundTransparency = 1
- title.Parent = gui
- local titleGradient = Instance.new("UIGradient")
- titleGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 170, 0)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 85, 0))
- }
- titleGradient.Rotation = 90
- titleGradient.Parent = title
- -- Create ScrollingFrame
- local scroll = Instance.new("ScrollingFrame")
- scroll.Size = UDim2.new(0, 300, 0, 200)
- scroll.Position = UDim2.new(0.5, -150, 0.5, -100)
- scroll.CanvasSize = UDim2.new(0, 0, 0, 400)
- scroll.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- scroll.BorderSizePixel = 0
- scroll.ScrollBarThickness = 8
- scroll.Parent = gui
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 12)
- corner.Parent = scroll
- local layout = Instance.new("UIListLayout")
- layout.Padding = UDim.new(0, 10)
- layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- layout.SortOrder = Enum.SortOrder.LayoutOrder
- layout.Parent = scroll
- -- Teleport Button
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 200, 0, 50)
- button.Text = "End Game"
- button.Font = Enum.Font.GothamBold
- button.TextSize = 18
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.fromRGB(255, 85, 0)
- button.AutoButtonColor = true
- button.Parent = scroll
- local btnCorner = Instance.new("UICorner")
- btnCorner.CornerRadius = UDim.new(0, 8)
- btnCorner.Parent = button
- button.MouseButton1Click:Connect(function()
- local char = player.Character or player.CharacterAdded:Wait()
- local hrp = char:WaitForChild("HumanoidRootPart")
- hrp.CFrame = CFrame.new(teleportPosition)
- end)
- -- Noclip Toggle Button
- local noclipEnabled = false
- local noclipButton = Instance.new("TextButton")
- noclipButton.Size = UDim2.new(0, 200, 0, 50)
- noclipButton.Text = "Toggle Noclip"
- noclipButton.Font = Enum.Font.GothamBold
- noclipButton.TextSize = 18
- noclipButton.TextColor3 = Color3.new(1, 1, 1)
- noclipButton.BackgroundColor3 = Color3.fromRGB(255, 85, 0)
- noclipButton.AutoButtonColor = true
- noclipButton.Parent = scroll
- local ncCorner = Instance.new("UICorner")
- ncCorner.CornerRadius = UDim.new(0, 8)
- ncCorner.Parent = noclipButton
- noclipButton.MouseButton1Click:Connect(function()
- noclipEnabled = not noclipEnabled
- end)
- game:GetService("RunService").Stepped:Connect(function()
- if noclipEnabled then
- local char = player.Character
- if char then
- for _, part in pairs(char:GetDescendants()) do
- if part:IsA("BasePart") then
- part.CanCollide = false
- end
- end
- end
- end
- end)
- -- Draggable Toggle Button
- local toggleGui = Instance.new("ScreenGui")
- toggleGui.Name = "ToggleButtonUI"
- toggleGui.ResetOnSpawn = false
- toggleGui.Parent = player:WaitForChild("PlayerGui")
- local toggleButton = Instance.new("ImageButton")
- toggleButton.Size = UDim2.new(0, 60, 0, 60)
- toggleButton.Position = UDim2.new(0, 10, 0, 10)
- toggleButton.Image = "rbxassetid://133744312808716"
- toggleButton.BackgroundTransparency = 1
- toggleButton.Active = true
- toggleButton.Parent = toggleGui
- toggleButton.MouseButton1Click:Connect(function()
- gui.Enabled = not gui.Enabled
- end)
- -- Tweened Drag Logic
- local UIS = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local dragging = false
- local dragStart = nil
- local startPos = nil
- toggleButton.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = toggleButton.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
- local delta = input.Position - dragStart
- local newPos = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- TweenService:Create(toggleButton, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
- Position = newPos
- }):Play()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment