local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local VirtualUser = game:GetService("VirtualUser") local RebirthEvent = ReplicatedStorage.rEvents.rebirthEvent local Player = Players.LocalPlayer spawn(function() repeat task.wait() until Player Player.Idled:Connect(function() VirtualUser:CaptureController() VirtualUser:ClickButton2(Vector2.new()) end) end) local Hoops = workspace.Hoops:GetChildren() spawn(function() while task.wait(0.05) do for _, Hoop in pairs(Hoops) do if Hoop.Name == "Hoop" and Player.Character and Player.Character.HumanoidRootPart then Hoop.CFrame = Player.Character.HumanoidRootPart.CFrame Hoop.Transparency = 1 Hoop.hoopSound.Volume = 0 if Hoop:FindFirstChild("hoopParticle") then Hoop.playerParticle:Destroy() Hoop.hoopGui:Destroy() Hoop.hoopParticle:Destroy() end end end end end) spawn(function() while task.wait(0.01) do if not (Player.Character and Player.Character.HumanoidRootPart) then continue end for _, Orb in pairs(workspace.orbFolder:GetDescendants()) do if Orb.Name:match(" Orb$") and Orb:FindFirstChild("outerOrb") then Orb.outerOrb.CFrame = Player.Character.HumanoidRootPart.CFrame elseif Orb.Name == "Gem" and Orb:FindFirstChild("outerGem") then Orb.outerGem.CFrame = Player.Character.HumanoidRootPart.CFrame end end end end) spawn(function() while task.wait(0.05) do if Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") then RebirthEvent:FireServer("rebirthRequest") end end end) Player.CharacterAdded:Connect(function(Character) repeat task.wait(0.03) until Character:FindFirstChild("HumanoidRootPart") end)