So, this is my script:
function module:SlowMotion(enabled: boolean, timeScale: number)
timeScale = timeScale or 0.3
local Formula = (enabled and timeScale or (1 / timeScale))
workspace.Gravity = workspace.Gravity * Formula
for _, v in workspace:GetDescendants() do
if v:IsA("BasePart") then
v.AssemblyLinearVelocity = v.AssemblyLinearVelocity * Formula
v.AssemblyAngularVelocity = v.AssemblyAngularVelocity * Formula
elseif v:IsA("humanoid") then
v.WalkSpeed = v.WalkSpeed * Formula
v.JumpPower = v.JumpPower * Formula
elseif v:IsA("Linearvelocity") then
v.MaxForce = v.MaxForce * Formula
v.VectorVelocity = v.VectorVelocity * Formula
elseif v:IsA("AngularVelocity") or v:IsA("BodyAngularVelocity") then
v.AngularVelocity = v.AngularVelocity * Formula
v.MaxTorque = v.MaxTorque * Formula
elseif v:IsA("BodyVelocity") then
v.MaxForce = v.MaxForce * Formula
v.Velocity = v.Velocity * Formula
elseif v:IsA("BodyThrust") or v:IsA("LineForce") then
v.Force = v.Force * Formula
elseif v:IsA("ParticleEmitter") then
v.TimeScale = v.TimeScale * Formula
end
end
end
I havenβt added music, tween etc, because you have to manually set it (not music, I was just lazy enough to not add music.)
No AI was used except for vscode completion lol.
What do you think? Pls try this because if I were to try this, it wouldβve taken me 2 hours because of recent vinegar issues.\
Also any suggestions?
[new] Full module (with tween support too):
