local RunService = game:GetService("RunService") local Player = game.Players.LocalPlayer local char = Player.Character or Player.CharacterAdded:Wait() local head = char:WaitForChild("Head") local headMesh = head:FindFirstChildWhichIsA("SpecialMesh") local tool = Player:FindFirstChild("SyncAPI", true) or game.ReplicatedStorage:FindFirstChild("SyncAPI", true) if not tool then return end local server = tool.Parent.SyncAPI.ServerEndpoint local myHats = {} for _, thing in ipairs(char:GetChildren()) do if thing:IsA("Accessory") and thing:FindFirstChild("Handle") then local mesh = thing.Handle:FindFirstChildWhichIsA("SpecialMesh") if mesh then table.insert(myHats, { part = thing.Handle, mesh = mesh.MeshId }) end end end local time = 1 local off = 1 local target = 0 local smooth = 14 local acc = 0 local rate = 1/60 _G.ShakeSistemi = true RunService.RenderStepped:Connect(function(dt) if not _G.ShakeSistemi then return end time = time + dt * 10 target = math.sin(time) * 0.7 off = off + (target - off) * dt * smooth acc = acc + dt if acc >= rate then acc = 0 local stuff = { { Part = head, MeshId = headMesh.MeshId, Offset = Vector3.new(off, 0, 0) } } for _, hat in ipairs(myHats) do table.insert(stuff, { Part = hat.part, MeshId = hat.mesh, Offset = Vector3.new(off, 0, 0) }) end server:InvokeServer("SyncMesh", stuff) end end)