Universal Script πŸ“Œ
913 Views
420 Executions

universal orbit script

Universal Script πŸ“Œ
whatssq
whatssqFirst script
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

orbit

View Raw
local TargetName = "name" 
local Radius = 2               
local Height = 0             
local Speed = 5                
local Smoothness = 1           

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local function orbit()
    local targetPlayer = Players:FindFirstChild(TargetName)
    
    if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
        local targetPart = targetPlayer.Character.HumanoidRootPart
        local angle = tick() * Speed
        
        local x = math.cos(angle) * Radius
        local z = math.sin(angle) * Radius
        
        local targetPos = targetPart.Position + Vector3.new(x, Height, z)
        
        if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
            LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetPos, targetPart.Position)
        end
    end
end

local connection
connection = RunService.Heartbeat:Connect(function()
    if not TargetName or TargetName == "" then 
        connection:Disconnect() 
        return 
    end
    orbit()
end)


Comments

1
Log in to join the conversation. Login
FriedRiceIsYummy's profile picture
FriedRiceIsYummy8 months ago

add toggle

1

Tags

More universal scripts

See all
Script hub
169
989
Bumped 1 hour ago

Script hub

Lunyx Hub

Script hub
120.8k
221.2k
Bumped 2 hours ago
Key System
Script hub
10.6k
201.0k
Bumped 2 hours ago

Script hub

KeylessVerified script badgeIRIDIUM HUB | #1

Script hub
33.3k
299.8k
Bumped 5 hours ago
Script hub
23.7k
5.3k
Bumped 5 hours ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
333
1.2k
Bumped 5 hours ago