Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players").LocalPlayer
- local StarterGui = game:GetService("StarterGui")
- -- GUI Setup
- local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- gui.ResetOnSpawn = false
- local frame = Instance.new("Frame", gui)
- frame.Size = UDim2.new(0, 160, 0, 130)
- frame.Position = UDim2.new(0.5, -80, 0.5, -65)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.BorderSizePixel = 0
- frame.Active, frame.Draggable = true, true
- -- Stylish Label
- local label = Instance.new("TextLabel", frame)
- label.Size = UDim2.new(1, 0, 0, 25)
- label.Position = UDim2.new(0, 0, 1, -25)
- label.Text = "YT: SeanBlox"
- label.TextColor3 = Color3.fromRGB(0, 255, 255)
- label.Font = Enum.Font.GothamBlack
- label.TextSize = 16
- label.BackgroundTransparency = 1
- local stroke = Instance.new("UIStroke", label)
- stroke.Color = Color3.new(1, 1, 1)
- stroke.Thickness = 1
- stroke.Transparency = 0.3
- -- Buttons
- local function createBtn(text, posY)
- local btn = Instance.new("TextButton", frame)
- btn.Size = UDim2.new(1, -20, 0, 35)
- btn.Position = UDim2.new(0, 10, 0, posY)
- btn.Text = text
- btn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Font = Enum.Font.SourceSansBold
- btn.TextSize = 18
- btn.BorderSizePixel = 0
- return btn
- end
- local teleportBtn = createBtn("Collect Diamond", 10)
- local afkBtn = createBtn("Anti-AFK", 50)
- -- Close Button
- local closeBtn = Instance.new("TextButton", frame)
- closeBtn.Size = UDim2.new(0, 25, 0, 25)
- closeBtn.Position = UDim2.new(1, -25, 0, 0)
- closeBtn.Text = "X"
- closeBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
- closeBtn.TextColor3 = Color3.new(1,1,1)
- closeBtn.Font = Enum.Font.SourceSansBold
- closeBtn.TextSize = 16
- closeBtn.BorderSizePixel = 0
- closeBtn.MouseButton1Click:Connect(function()
- gui:Destroy()
- end)
- -- Teleport Function
- local function getChar() return player.Character or player.CharacterAdded:Wait() end
- local function teleportTo(part)
- local root = getChar():WaitForChild("HumanoidRootPart", 5)
- if root and part:IsA("BasePart") then
- root.CFrame = part.CFrame + Vector3.new(0, 5, 0)
- end
- end
- teleportBtn.MouseButton1Click:Connect(function()
- for _, emerald in ipairs(workspace:WaitForChild("Secured"):WaitForChild("EmeraldPickups"):GetChildren()) do
- if emerald:IsA("BasePart") then
- teleportTo(emerald)
- task.wait(0.2)
- end
- end
- end)
- -- Anti-AFK
- afkBtn.MouseButton1Click:Connect(function()
- player.Idled:Connect(function()
- local vu = game:GetService("VirtualUser")
- vu:Button2Down(Vector2.new(), workspace.CurrentCamera.CFrame)
- task.wait(1)
- vu:Button2Up(Vector2.new(), workspace.CurrentCamera.CFrame)
- end)
- afkBtn.Text = "Anti-AFK: ON"
- afkBtn.BackgroundColor3 = Color3.fromRGB(0, 200, 0)
- afkBtn.AutoButtonColor = false
- StarterGui:SetCore("SendNotification", {
- Title = "Anti-AFK Activated",
- Text = "You won't go idle anymore.",
- Duration = 3
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment