--// CONFIG \\-- local Config = { MaxHats = 10, Height = 10, Scale = 0.6, Speed = 0.7, Radius = 6, Clockwise = true, NetlessVel = Vector3.new(30, 0, 0), Mode = "Heart", RGBMode = false, ShowTrails = false, RotateHats = false, MultiLayer = false, HeightStep = 1, ScaleStep = 0.05, SpeedStep = 0.1, RadiusStep = 0.5 } --// SERVICES \\-- local Players = game:GetService("Players") local RunService = game:GetService("RunService") local lp = Players.LocalPlayer local char = lp.Character or lp.CharacterAdded:Wait() local hrp = char:WaitForChild("HumanoidRootPart") --// ═══════════════════════════════════════════════════════════════ --// PRESETS --// ═══════════════════════════════════════════════════════════════ local Presets = { giant = {Mode = "Heart", Height = 15, Scale = 1.2, Speed = 0.5, Radius = 10}, fast = {Mode = "Orbit", Height = 8, Scale = 0.6, Speed = 2, Radius = 8}, slow = {Mode = "Spiral", Height = 12, Scale = 0.5, Speed = 0.3, Radius = 6}, crazy = {Mode = "Wave", Height = 10, Scale = 0.7, Speed = 1.5, Radius = 10}, mini = {Mode = "Heart", Height = 5, Scale = 0.3, Speed = 1, Radius = 4}, double = {Mode = "Orbit", Height = 8, Scale = 0.6, Speed = 0.8, Radius = 7, MultiLayer = true} } --// ═══════════════════════════════════════════════════════════════ --// HAT COLLECTION & DETACHMENT --// ═══════════════════════════════════════════════════════════════ local hats = {} local hatTrails = {} local showEffect = true -- Detach handle from character (remove all welds/motors) local function detachHandle(handle) for _, obj in ipairs(handle:GetDescendants()) do if obj:IsA("Weld") or obj:IsA("Motor6D") or obj:IsA("WeldConstraint") or obj:IsA("Attachment") then pcall(function() obj:Destroy() end) end end end -- Get RGB color based on time local function getRGBColor(t) return Color3.fromHSV((t / 3) % 1, 1, 1) end -- Create trail effect for hat local function createTrail(handle) local attach0 = Instance.new("Attachment") attach0.Parent = handle local trail = Instance.new("Trail") trail.Parent = handle trail.Attachment0 = attach0 trail.Attachment1 = attach0 trail.Lifetime = 0.5 trail.MinLength = 0 trail.FaceCamera = true trail.Color = ColorSequence.new(Color3.fromRGB(255, 100, 150)) trail.Transparency = NumberSequence.new{ NumberSequenceKeypoint.new(0, 0.5), NumberSequenceKeypoint.new(1, 1) } trail.WidthScale = NumberSequence.new(0.5) return trail end -- Collect all accessories from character local function collectHats() table.clear(hats) -- Remove old trails for _, trail in pairs(hatTrails) do if trail then pcall(function() trail:Destroy() end) end end table.clear(hatTrails) for _, inst in ipairs(char:GetChildren()) do if inst:IsA("Accessory") then local handle = inst:FindFirstChild("Handle") if handle and handle:IsA("BasePart") then detachHandle(handle) -- Move accessory to workspace inst.Parent = workspace -- Setup physics handle.Massless = true handle.CanCollide = false handle.Anchored = false handle.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) -- Set network owner to client for netless pcall(function() handle:SetNetworkOwner(lp) end) table.insert(hats, handle) -- Create trail if enabled if Config.ShowTrails then hatTrails[handle] = createTrail(handle) end if #hats >= Config.MaxHats then break end end end end print("[Heart Orbit] Collected " .. #hats .. " accessories") return #hats end collectHats() -- Auto-refresh when new accessory added char.ChildAdded:Connect(function(c) if c:IsA("Accessory") then task.wait(0.15) collectHats() end end) --// ═══════════════════════════════════════════════════════════════ --// NETLESS LOOP (keeps hats from falling) --// ═══════════════════════════════════════════════════════════════ RunService.Heartbeat:Connect(function() for _, handle in ipairs(hats) do if handle and handle.Parent then handle.AssemblyLinearVelocity = Config.NetlessVel handle.AssemblyAngularVelocity = Vector3.zero end end end) --// ═══════════════════════════════════════════════════════════════ --// SHAPE FUNCTIONS (parametric curves for different modes) --// ═══════════════════════════════════════════════════════════════ -- Heart shape using parametric equation local function heart2D(t) local s = math.sin(t) local c = math.cos(t) local x = 16 * (s^3) local y = 13*c - 5*math.cos(2*t) - 2*math.cos(3*t) - math.cos(4*t) return Vector3.new(x * Config.Scale, y * Config.Scale, 0) end -- Circle orbit around player local function orbit(t, layer) layer = layer or 0 local rad = Config.Radius + (layer * 2) return Vector3.new( math.cos(t) * rad, layer * 2, math.sin(t) * rad ) end -- Spiral going upward local function spiral(t, heightOffset) return Vector3.new( math.cos(t) * Config.Radius, heightOffset * 2, math.sin(t) * Config.Radius ) end -- Wave pattern local function wave(t, heightOffset) return Vector3.new( math.cos(t) * Config.Radius, math.sin(t * 3) * 2, math.sin(t) * Config.Radius ) end -- Infinity symbol (lemniscate) local function infinity(t) local scale = Config.Scale * 10 return Vector3.new( scale * math.sin(t), 0, scale * math.sin(t) * math.cos(t) ) end -- Star pattern local function star(t) local points = 5 local inner = Config.Radius * 0.5 local outer = Config.Radius local angle = (t % (math.pi * 2 / points)) * points local radius = (math.floor(t / (math.pi * 2 / points)) % 2 == 0) and outer or inner return Vector3.new( math.cos(angle) * radius, 0, math.sin(angle) * radius ) end -- DNA helix pattern local function helix(t, heightOffset) return Vector3.new( math.cos(t) * Config.Radius, t * 0.5 + heightOffset, math.sin(t) * Config.Radius ) end --// ═══════════════════════════════════════════════════════════════ --// MAIN RENDER LOOP (updates hat positions every frame) --// ═══════════════════════════════════════════════════════════════ local t0 = tick() RunService.RenderStepped:Connect(function() if not showEffect or not hrp or not hrp.Parent or #hats == 0 then return end local now = tick() - t0 local dir = Config.Clockwise and 1 or -1 local tBase = now * Config.Speed * dir for i, handle in ipairs(hats) do if handle and handle.Parent then local offset = (i-1) / #hats * math.pi * 2 local tParam = tBase + offset local pos local layer = Config.MultiLayer and (i % 2) or 0 -- Calculate position based on current mode if Config.Mode == "Heart" then local p2d = heart2D(tParam) pos = Vector3.new(p2d.X, Config.Height + p2d.Y, p2d.Z) elseif Config.Mode == "Orbit" then local orb = orbit(tParam, layer) pos = Vector3.new(orb.X, Config.Height + orb.Y, orb.Z) elseif Config.Mode == "Spiral" then local heightOff = (i-1) / #hats * Config.Height local spr = spiral(tParam, heightOff) pos = Vector3.new(spr.X, Config.Height + spr.Y, spr.Z) elseif Config.Mode == "Wave" then local wv = wave(tParam, (i-1) / #hats) pos = Vector3.new(wv.X, Config.Height + wv.Y, wv.Z) elseif Config.Mode == "Infinity" then local inf = infinity(tParam) pos = Vector3.new(inf.X, Config.Height + inf.Y, inf.Z) elseif Config.Mode == "Star" then local st = star(tParam) pos = Vector3.new(st.X, Config.Height + st.Y, st.Z) elseif Config.Mode == "Helix" then local hx = helix(tParam, (i-1) / #hats * 2) pos = Vector3.new(hx.X, Config.Height + hx.Y, hx.Z) end -- Apply position and optional rotation if pos then local rotation = Config.RotateHats and CFrame.Angles(0, tParam, 0) or CFrame.new() handle.CFrame = hrp.CFrame * CFrame.new(pos) * rotation end -- RGB Mode: change hat color if Config.RGBMode and handle:IsA("MeshPart") then handle.Color = getRGBColor(now + i * 0.2) end -- Update trail color (RGB or default) if Config.ShowTrails and hatTrails[handle] then if Config.RGBMode then hatTrails[handle].Color = ColorSequence.new(getRGBColor(now + i * 0.2)) else hatTrails[handle].Color = ColorSequence.new(Color3.fromRGB(255, 100, 150)) end end end end end) --// ═══════════════════════════════════════════════════════════════ --// CHAT COMMANDS SYSTEM --// ═══════════════════════════════════════════════════════════════ -- Print help information local function printHelp() print("\n╔════════════════════════════════════════╗") print("║ HEART ORBIT COMMANDS HELP ║") print("╠════════════════════════════════════════╣") print("║ MAIN COMMANDS: ║") print("║ .orbit on/off - enable/disable ║") print("║ .orbit refresh - reload hats ║") print("║ .orbit dir - change direction ║") print("║ .orbit status - show status ║") print("║ .orbit help - show this help ║") print("╠════════════════════════════════════════╣") print("║ MODES: ║") print("║ .mode heart - heart shape ║") print("║ .mode orbit - circle orbit ║") print("║ .mode spiral - spiral pattern ║") print("║ .mode wave - wave pattern ║") print("║ .mode infinity - infinity symbol ║") print("║ .mode star - star pattern ║") print("║ .mode helix - DNA helix ║") print("╠════════════════════════════════════════╣") print("║ VALUE SETTINGS: ║") print("║ .height [num] - set height ║") print("║ .scale [num] - set scale ║") print("║ .speed [num] - set speed ║") print("║ .radius [num] - set radius ║") print("╠════════════════════════════════════════╣") print("║ EFFECTS: ║") print("║ .rgb on/off - RGB mode ║") print("║ .trails on/off - trail effects ║") print("║ .rotate on/off - hat rotation ║") print("║ .layer on/off - multi-layer ║") print("╠════════════════════════════════════════╣") print("║ PRESETS: ║") print("║ .preset giant - giant heart ║") print("║ .preset fast - fast orbit ║") print("║ .preset slow - slow spiral ║") print("║ .preset crazy - crazy wave ║") print("║ .preset mini - mini heart ║") print("║ .preset double - double layer ║") print("╠════════════════════════════════════════╣") print("║ EXAMPLES: ║") print("║ .mode heart ║") print("║ .height 15 ║") print("║ .rgb on ║") print("║ .preset giant ║") print("╚════════════════════════════════════════╝\n") end -- Print current status local function printStatus() print("\n╔════════════════════════════════════════╗") print("║ CURRENT STATUS ║") print("╠════════════════════════════════════════╣") print("║ Effect: " .. (showEffect and "ON" or "OFF") .. string.rep(" ", 32 - (showEffect and 2 or 3)) .. "║") print("║ Mode: " .. Config.Mode .. string.rep(" ", 35 - #Config.Mode) .. "║") print("║ Hats: " .. #hats .. "/" .. Config.MaxHats .. string.rep(" ", 34 - #tostring(#hats) - #tostring(Config.MaxHats)) .. "║") print("║ Height: " .. Config.Height .. string.rep(" ", 32 - #tostring(Config.Height)) .. "║") print("║ Scale: " .. string.format("%.2f", Config.Scale) .. string.rep(" ", 33 - #string.format("%.2f", Config.Scale)) .. "║") print("║ Speed: " .. string.format("%.2f", Config.Speed) .. string.rep(" ", 33 - #string.format("%.2f", Config.Speed)) .. "║") print("║ Radius: " .. string.format("%.1f", Config.Radius) .. string.rep(" ", 32 - #string.format("%.1f", Config.Radius)) .. "║") print("║ Direction: " .. (Config.Clockwise and "CW" or "CCW") .. string.rep(" ", 29 - (Config.Clockwise and 2 or 3)) .. "║") print("║ RGB: " .. (Config.RGBMode and "ON" or "OFF") .. string.rep(" ", 34 - (Config.RGBMode and 2 or 3)) .. "║") print("║ Trails: " .. (Config.ShowTrails and "ON" or "OFF") .. string.rep(" ", 31 - (Config.ShowTrails and 2 or 3)) .. "║") print("║ Rotate: " .. (Config.RotateHats and "ON" or "OFF") .. string.rep(" ", 31 - (Config.RotateHats and 2 or 3)) .. "║") print("║ Multi-Layer: " .. (Config.MultiLayer and "ON" or "OFF") .. string.rep(" ", 26 - (Config.MultiLayer and 2 or 3)) .. "║") print("╚════════════════════════════════════════╝\n") end -- Chat command handler lp.Chatted:Connect(function(msg) local cmd = msg:lower() -- Main commands if cmd == ".orbit on" or cmd == ".heart on" then showEffect = true print("[✓] Effect enabled") elseif cmd == ".orbit off" or cmd == ".heart off" then showEffect = false print("[✓] Effect disabled") elseif cmd == ".orbit refresh" or cmd == ".heart refresh" then local count = collectHats() print("[✓] Refreshed: " .. count .. " hats collected") elseif cmd == ".orbit dir" or cmd == ".heart dir" then Config.Clockwise = not Config.Clockwise print("[✓] Direction: " .. (Config.Clockwise and "Clockwise" or "Counter-Clockwise")) elseif cmd == ".orbit status" or cmd == ".heart status" then printStatus() elseif cmd == ".orbit help" or cmd == ".heart help" or cmd == ".help" then printHelp() -- Mode commands elseif cmd:sub(1, 6) == ".mode " then local mode = cmd:sub(7) local modes = { heart = "Heart", orbit = "Orbit", circle = "Orbit", spiral = "Spiral", wave = "Wave", infinity = "Infinity", star = "Star", helix = "Helix" } if modes[mode] then Config.Mode = modes[mode] print("[✓] Mode: " .. Config.Mode) else print("[✗] Unknown mode. Use: heart, orbit, spiral, wave, infinity, star, helix") end -- Value settings elseif cmd:sub(1, 8) == ".height " then local val = tonumber(cmd:sub(9)) if val then Config.Height = val print("[✓] Height: " .. val) else print("[✗] Invalid number") end elseif cmd:sub(1, 7) == ".scale " then local val = tonumber(cmd:sub(8)) if val and val > 0 then Config.Scale = val print("[✓] Scale: " .. val) else print("[✗] Invalid number (must be > 0)") end elseif cmd:sub(1, 7) == ".speed " then local val = tonumber(cmd:sub(8)) if val and val > 0 then Config.Speed = val print("[✓] Speed: " .. val) else print("[✗] Invalid number (must be > 0)") end elseif cmd:sub(1, 8) == ".radius " then local val = tonumber(cmd:sub(9)) if val and val > 0 then Config.Radius = val print("[✓] Radius: " .. val) else print("[✗] Invalid number (must be > 0)") end -- Effect toggles elseif cmd == ".rgb on" then Config.RGBMode = true print("[✓] RGB Mode: ON") elseif cmd == ".rgb off" then Config.RGBMode = false print("[✓] RGB Mode: OFF") elseif cmd == ".trails on" then Config.ShowTrails = true collectHats() print("[✓] Trails: ON") elseif cmd == ".trails off" then Config.ShowTrails = false for _, trail in pairs(hatTrails) do if trail then pcall(function() trail:Destroy() end) end end table.clear(hatTrails) print("[✓] Trails: OFF") elseif cmd == ".rotate on" then Config.RotateHats = true print("[✓] Rotation: ON") elseif cmd == ".rotate off" then Config.RotateHats = false print("[✓] Rotation: OFF") elseif cmd == ".layer on" or cmd == ".multilayer on" then Config.MultiLayer = true print("[✓] Multi-Layer: ON") elseif cmd == ".layer off" or cmd == ".multilayer off" then Config.MultiLayer = false print("[✓] Multi-Layer: OFF") -- Presets elseif cmd:sub(1, 8) == ".preset " then local presetName = cmd:sub(9) if Presets[presetName] then for k, v in pairs(Presets[presetName]) do Config[k] = v end print("[✓] Preset applied: " .. presetName) else print("[✗] Unknown preset. Use: giant, fast, slow, crazy, mini, double") end end end) --// ═══════════════════════════════════════════════════════════════ --// INITIALIZE & WELCOME MESSAGE --// ═══════════════════════════════════════════════════════════════ print("\n╔════════════════════════════════════════╗") print("║ ❤ HEART ORBIT v3.0 COMMAND-ONLY ❤ ║") print("╠════════════════════════════════════════╣") print("║ Loaded successfully! ║") print("║ Accessories: " .. #hats .. "/10" .. string.rep(" ", 26 - #tostring(#hats)) .. "║") print("║ Mode: " .. Config.Mode .. string.rep(" ", 35 - #Config.Mode) .. "║") print("╠════════════════════════════════════════╣") print("║ Type .orbit help for all commands ║") print("║ Type .orbit status for current status ║") print("╚════════════════════════════════════════╝\n")