Universal Script šŸ“Œ
4.2k Views
1.3k Executions

Chroma Orbit GUI

Universal Script šŸ“Œ
Skele
SkelePublished 5
1 year 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

Features: • Orbits the nearest player with the speed of 500. ———————————— How do I change the speed?: Since the script is Open Sourced, you can easily change the orbit speed by modifying this line near the top of the script: local orbitSpeed = 500

View Raw
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera

local orbiting = false
local orbitSpeed = 500
local orbitRadius = 3
local orbitConnection
local currentTarget
local humanoidRootPart

local function rainbow()
	return Color3.fromHSV((tick() * 0.5) % 1, 1, 1)
end

local function getNearestTarget()
	local nearest = nil
	local minDist = math.huge
	if not humanoidRootPart then return end
	for _, p in pairs(Players:GetPlayers()) do
		if p ~= player and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
			local dist = (humanoidRootPart.Position - p.Character.HumanoidRootPart.Position).Magnitude
			if dist < minDist then
				minDist = dist
				nearest = p.Character.HumanoidRootPart
			end
		end
	end
	return nearest
end

local function toggleOrbit()
	orbiting = not orbiting
	if orbiting then
		currentTarget = getNearestTarget()
		if currentTarget then
			if orbitConnection then orbitConnection:Disconnect() end
			orbitConnection = RunService.RenderStepped:Connect(function()
				if not humanoidRootPart or not humanoidRootPart.Parent then return end


Comments

1
Log in to join the conversation. Login
errorvirus817's profile picture
errorvirus81711 months ago

a good gui silly to

1

More universal scripts

See all
Script hub
52.8k
13.9k
Bumped 1 hour ago
Key System
Paid
Universal Script šŸ“Œ
80
225
Approved 4 hours ago
Key System
Script hub
457.4k
956.8k
Bumped 4 hours ago
Key System

Script hub

Hall of Fame #5

Verified script badgeRonix Hub | 52 Supported Games + OP!

Universal Script šŸ“Œ
3.4k
465
Approved 5 hours ago
Key System