Roblox 'sex' script *OP*

View and share code snippets on Pastefy.

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

-- Function to create a GUI for player selection
local function createPlayerSelectionGUI()
    local screenGui = Instance.new("ScreenGui")
    screenGui.Parent = Player:WaitForChild("PlayerGui")
    screenGui.Name = "PlayerSelectionGUI"

    local frame = Instance.new("Frame")
    frame.Size = UDim2.new(0, 200, 0, 300)
    frame.Position = UDim2.new(0.5, -100, 0.5, -150)
    frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    frame.Parent = screenGui

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 50)
    title.Text = "Select a Player to Follow"
    title.TextSize = 14
    title.TextColor3 = Color3.fromRGB(0, 0, 0)
    title.BackgroundTransparency = 1
    title.Parent = frame

    local playerList = Instance.new("UIListLayout")
    playerList.Padding = UDim(0, 5)
    playerList.SortOrder = Enum.SortOrder.LayoutOrder
    playerList.Parent = frame

    local function updatePlayerList()
        for _, child in ipairs(frame:GetChildren()) do
            if child:IsA("TextButton") then
                child:Destroy()
            end
        end

        for _, v in ipairs(Players:GetPlayers()) do
            if v ~= Player and v.Character and v.Character:FindFirstChild("HumanoidRootPart") then
                local button = Instance.new("TextButton")
                button.Size = UDim2.new(1, 0, 0, 50)
                button.Text = v.Name
                button.TextSize = 12
                button.TextColor3 = Color3.fromRGB(0, 0, 0)
                button.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
                button.Parent = frame

                button.MouseButton1Click:Connect(function()
                    screenGui:Destroy()
                    followPlayer(v)
                end)
            end
        end
    end

    updatePlayerList()
end

-- Function to teleport behind the selected player
local function teleportBehind(victim)
    local victimHRP = victim.Character.HumanoidRootPart
    local playerHRP = Character.HumanoidRootPart
    local offset = victimHRP.CFrame.LookVector * -3 -- 3 studs behind
    playerHRP.CFrame = victimHRP.CFrame + offset
end

-- Function to follow the selected player
local function followPlayer(victim)
    local victimHRP = victim.Character.HumanoidRootPart
    local playerHRP = Character.HumanoidRootPart
    local offset = victimHRP.CFrame.LookVector * -3 -- 3 studs behind
    playerHRP.CFrame = victimHRP.CFrame + offset

    -- Keep following in real time
    RunService.RenderStepped:Connect(function()
        playerHRP.CFrame = victimHRP.CFrame + offset
    end)
end

-- Create the player selection GUI
createPlayerSelectionGUI()

Tags

Description

A Roblox script written in Lua that appears to create a GUI for selecting and following other players. The title suggests it might be an exploit script, but the provided content preview focuses on GUI creation and player interaction elements.