local CollectionService = game:GetService("CollectionService") local Players = game:GetService("Players") local player = Players.LocalPlayer local function update(character) if character:GetAttribute("Character") == "Sonic" then local prepare = CollectionService:HasTag(character, "Prepare") local peelout = CollectionService:HasTag(character, "Peelout") character:SetAttribute("HeadTurn", not (prepare or peelout)) end end local function setup(character) update(character) character:GetAttributeChangedSignal("Character"):Connect(function() update(character) end) CollectionService:GetInstanceAddedSignal("Prepare"):Connect(function(instance) if instance == character then update(character) end end) CollectionService:GetInstanceRemovedSignal("Prepare"):Connect(function(instance) if instance == character then update(character) end end) CollectionService:GetInstanceAddedSignal("Peelout"):Connect(function(instance) if instance == character then update(character) end end) CollectionService:GetInstanceRemovedSignal("Peelout"):Connect(function(instance) if instance == character then update(character) end end) end if player.Character then setup(player.Character) end player.CharacterAdded:Connect(setup) while task.wait() do for _, instance in ipairs(CollectionService:GetTagged("Dropdash")) do if instance:GetAttribute("Character") == "Sonic" then CollectionService:AddTag(instance, "Charging") end end for _, instance in ipairs(CollectionService:GetTagged("Peelout")) do if instance:GetAttribute("Character") == "Sonic" then CollectionService:AddTag(instance, "Charging") end end for _, instance in ipairs(CollectionService:GetTagged("Charging")) do if not CollectionService:HasTag(instance, "Dropdash") and not CollectionService:HasTag(instance, "Peelout") then CollectionService:RemoveTag(instance, "Charging") end end end