Run it
Copy the script and paste it into your executor.
HOUSE_MODEL_ID =
TEXTURE_ID =
TORNADO_SOUND_ID =
CRASH_SOUND_ID =
RAIN_SOUND_ID =
THUNDER_SOUND_IDS = {
,
,
,
}
TIMELINE = {
SupercellSeconds = ,
CloudFadeIn = ,
DelayMin = ,
DelayMax = ,
DescendSeconds = ,
FormDistMin = ,
FormDistMax = ,
}
WIND = {
StartMPH = ,
RiseRate = ,
FallRate = ,
PeakMin = ,
PeakMax = ,
PeakBias = ,
Wobble = ,
DriftEvery = {, },
}
CARS = {
MinEF = ,
HeavyMass = ,
MaxCars = ,
CarryMin = ,
CarryMax = ,
ThrowAccel = ,
ThrowTime = ,
ThrowUp = ,
Cooldown = ,
}
EF_BEHAVIOR = {
[] = {air = , pull = , orbit = , liftFrac = , damp = },
[] = {air = , pull = , orbit = , liftFrac = , damp = },
[] = {air = , pull = , orbit = , liftFrac = , damp = , tossEvery = {, }, tossTime = , tossPower = },
[] = {air = , pull = , orbit = , height = , damp = , tossEvery = {, }, tossTime = , tossPower = },
[] = {air = , pull = , orbit = , height = , damp = , tossEvery = {, }, tossTime = , tossPower = },
[] = {air = , pull = , orbit = , height = , damp = , tossEvery = {, }, tossTime = , tossPower = },
}
LIFT = {
Enabled = ,
Duration = ,
PullRange = ,
CatchRange = ,
PullMin = ,
PullMax = ,
OrbitSpeed = ,
MaxHeight = ,
RadiusFrac = ,
Cooldown = ,
ThrowSpeed = ,
ThrowUp = ,
PullGain = ,
PullLiftFrac = ,
}
INSIDE = {
FogColor = .(, , ),
FogStart = ,
FogEnd = ,
AtmDensity = ,
Tint = .(, , ),
ShakeRot = ,
ShakePos = ,
}
QUALITY =
MAX_DEBRIS =
DESTROY_BUILDINGS =
FUNNEL_PARTS = .(, .( * QUALITY))
FIXED_HEIGHT =
CLOUD_CLEARNESS =
SPIN_SPEED =
MOVE_SPEED =
RADAR = {
Range = ,
PlateSize = ,
Grid = .(, .( * QUALITY)),
ScanSpeed = ,
WallHeight = ,
RoomPos = .(, , ),
active = ,
realCamPos = .zero,
}
TOOLS = {}
SIREN = {
SoundId = ,
Count = ,
MinDist = ,
MaxDist = ,
Volume = ,
FadeIn = ,
FadeOut = ,
ReverbDecay = ,
RollOffMin = ,
RollOffMax = ,
AutoOnDescend = ,
}
SUPERCELL_SCALE =
CLOUD_BASE_OFFSET =
SUPERCELL_HEADING = .(, , ).Unit
SC_COUNTS = { Shelf = , Wall = , Tower = , Anvil = , Top = , Flank = , Shaft = }
k, v (SC_COUNTS) SC_COUNTS[k] = .(, .(v * QUALITY))
FOG_DENSITY =
FOG_END =
TORNADO_COLOR = .(, , )
COLOR_BRIGHTNESS =
BOTTOM_RATIO =
BULB_AMOUNT =
WEDGE_TOP_RADIUS =
TOP_FLARE =
STICK_CHANCE =
STICK_STRENGTH =
OVERCAST_SKY =
RAIN_ENABLED =
RAIN_DROPS = .(, .( * QUALITY))
RAIN_RADIUS =
RAIN_HEIGHT =
RAIN_INTENSITY =
RAIN_VOLUME =
RAIN_FADE_IN =
RAIN_FOG =
RAIN_FOG_END =
RAIN_FOG_DENSITY =
SHELTER_RADIUS =
LIGHTNING_ENABLED =
LIGHTNING_MIN_DELAY =
LIGHTNING_MAX_DELAY =
LIGHTNING_RANGE =
THUNDER_SPEED =
BOLT_COLOR = .(, , )
MULTI_VORTEX_ENABLED =
AUTO_EF_BY_WINDSPEED =
EF_SETTINGS = {
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
[] = {MinMPH=, MaxMPH=, BaseRadius=, TopRadius=, Height=, Speed=, Move=, Force=, DebrisSize=, Name=},
}
currentEF =
currentWindSpeedMPH =
peakWindSpeedMPH =
angle =
timeElapsed =
frameCount =
descendProgress =
contact =
insideBlend =
windBase = WIND.StartMPH
windPeak = WIND.PeakMin + (WIND.PeakMax - WIND.PeakMin) * (.() ^ WIND.PeakBias)
windTarget = windPeak
nextWindShift =
groundY =
STORM_POS = .(, , )
liveStormPos = .(, , )
targetDirection = .(, , ).Unit
nextDirChange =
lightningFlash =
strikeLightning
phase =
supercellTime =
supercellProgress =
formAt =
tOffF = SUPERCELL_SCALE * (.() * - )
tOffS = SUPERCELL_SCALE * (.() * - )
RunService = :()
Lighting = :()
Players = :()
Player = Players.LocalPlayer
Debris = :()
UserInputService = :()
SoundService = :()
sm = {}
k, v (EF_SETTINGS[]) sm[k] = v
WEDGE_TOP_RADIUS sm.TopRadius = WEDGE_TOP_RADIUS
FIXED_HEIGHT sm.Height = FIXED_HEIGHT
windSm = {BaseRadius = , TopRadius = , Height = , MaxMPH = }
THIN = {[] = , [] = }
sm.WidthMul = THIN[]
FUNNEL_COLOR = .(, , )
DUST_COLOR = .(, , )
(id)
ok, obj = (() :(id)[] )
ok obj
(x, z, model)
rayOrigin = .(x, , z)
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.FilterDescendantsInstances = {Player.Character}
result = :(rayOrigin, .(, -, ), params)
gy = result result.Position.Y
_, size = model:()
.(x, gy + (size.Y / ), z)
(p)
m = p:()
m ~= m:() ~=
()
RADAR.active RADAR.realCamPos
cam = .CurrentCamera
cam cam.CFrame.Position
char = Player.Character
root = char char:()
root root.Position .zero
char = Player.Character
rp = char char:()
center = ()
a = .() * .pi *
d = TIMELINE.FormDistMin + .() * (TIMELINE.FormDistMax - TIMELINE.FormDistMin)
sx, sz = center.X + .(a) * d, center.Z + .(a) * d
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.FilterDescendantsInstances = {Player.Character}
r = :(.(sx, , sz), .(, -, ), params)
r
groundY = r.Position.Y
groundY = rp (rp.Position.Y - )
STORM_POS = .(sx, groundY, sz)
()
OVERCAST_SKY
(()
Lighting.ClockTime =
Lighting.Brightness =
Lighting.Ambient = .(, , )
Lighting.OutdoorAmbient = .(, , )
Lighting.ExposureCompensation = -
Lighting.FogColor = .(, , )
Lighting.FogStart =
Lighting.FogEnd = FOG_END
atm = Lighting:() .(, Lighting)
atm.Density = FOG_DENSITY
atm.Offset =
atm.Color = .(, , )
atm.Decay = .(, , )
atm.Glare =
atm.Haze =
rays = Lighting:() .(, Lighting)
rays.Intensity =
rays.Spread =
)
()
(worldPosition, stormCenter, efData, currentDescend)
relPos = worldPosition - stormCenter
horizontalDist = .(relPos.X, , relPos.Z).Magnitude
heightY = .(relPos.Y, , efData.Height)
horizontalDist <= .zero,
effectiveHeight = efData.Height * currentDescend
heightFactor = heightY / .(effectiveHeight, )
coreRadius = efData.BaseRadius + (heightFactor * (efData.TopRadius - efData.BaseRadius))
radDir = .(relPos.X, , relPos.Z).Unit
tangentDir = .(-radDir.Z, , radDir.X)
velMagnitude
horizontalDist < coreRadius
velMagnitude = (horizontalDist / coreRadius) * efData.MaxMPH
velMagnitude = EF_SETTINGS[].MaxMPH * (coreRadius / horizontalDist)^
inflowMagnitude = velMagnitude *
inflowDir = -radDir
updraftMagnitude = .( - (horizontalDist / (coreRadius * )), , ) * (efData.MaxMPH * )
updraftDir = .(, , )
finalWindVector = (tangentDir * velMagnitude) + (inflowDir * inflowMagnitude) + (updraftDir * updraftMagnitude)
calculatedMPH = .(finalWindVector.Magnitude * currentDescend, , efData.MaxMPH * )
finalWindVector * currentDescend, calculatedMPH
()
cam = .CurrentCamera
look = cam .(cam.CFrame.LookVector.X, , cam.CFrame.LookVector.Z) .(, , )
look.Magnitude < look = .(, , )
startPos = () + look.Unit *
STORM_POS = .(startPos.X, groundY, startPos.Z)
r = ,
c = ,
.(()
model = (HOUSE_MODEL_ID)
model
model.Name =
model.Parent =
posX = startPos.X + (r * ) -
posZ = startPos.Z + (c * ) -
model:((posX, posZ, model) * .(, .(.()), ))
_, p (model:())
p:()
p.Name = (.(, ))
p.Anchored =
)
()
_, v (:())
v.Name ==
v:()
()
targetPos = ()
delta = .(targetPos.X - STORM_POS.X, , targetPos.Z - STORM_POS.Z)
delta.Magnitude >
targetDirection = delta.Unit
nextDirChange = timeElapsed + (delta.Magnitude / (EF_SETTINGS[currentEF].Move * * MOVE_SPEED))
windHudLabel, efHudLabel, autoEfBtn
()
sg = .()
sg.Name =
sg.ResetOnSpawn =
sg.Parent = Player.PlayerGui
hudFrame = .(, sg)
hudFrame.Size, hudFrame.Position = .(, , , ), .(, -, , )
hudFrame.BackgroundColor3 = .(, , )
hudFrame.BackgroundTransparency =
.(, hudFrame)
windHudLabel = .(, hudFrame)
windHudLabel.Size, windHudLabel.Position = .(, -, , ), .(, , , )
windHudLabel.BackgroundTransparency =
windHudLabel.Text =
windHudLabel.TextColor3 = .(, , )
windHudLabel.Font = .Font.SourceSansBold
windHudLabel.TextSize =
windHudLabel.TextXAlignment = .TextXAlignment.Left
efHudLabel = .(, hudFrame)
efHudLabel.Size, efHudLabel.Position = .(, -, , ), .(, , , )
efHudLabel.BackgroundTransparency =
efHudLabel.Text =
efHudLabel.TextColor3 = .(, , )
efHudLabel.Font = .Font.SourceSansBold
efHudLabel.TextSize =
efHudLabel.TextXAlignment = .TextXAlignment.Left
PANEL_W, PANEL_H = ,
container = .(, sg)
container.Size, container.Position = .(, PANEL_W, , PANEL_H), .(, , , )
container.BackgroundColor3 = .(, , )
container.BackgroundTransparency =
.(, container)
titleBar = .(, container)
titleBar.Size, titleBar.Position = .(, -, , ), .(, , , )
titleBar.BackgroundTransparency =
titleBar.AutoButtonColor =
titleBar.Text =
titleBar.TextColor3 = .(, , )
titleBar.Font = .Font.SourceSansBold
titleBar.TextSize =
titleBar.TextXAlignment = .TextXAlignment.Left
collapseBtn = .(, container)
collapseBtn.Size, collapseBtn.Position = .(, , , ), .(, -, , )
collapseBtn.BackgroundColor3 = .(, , )
collapseBtn.Text, collapseBtn.TextColor3, collapseBtn.Font, collapseBtn.TextSize = , .(, , ), .Font.SourceSansBold,
.(, collapseBtn)
scroll = .(, container)
scroll.Position, scroll.Size = .(, , , ), .(, -, , -)
scroll.BackgroundTransparency =
scroll.BorderSizePixel =
scroll.ScrollBarThickness =
scroll.CanvasSize = .(, , , )
scroll.AutomaticCanvasSize = .AutomaticSize.Y
scroll.ScrollingDirection = .ScrollingDirection.Y
layout = .(, scroll)
layout.Padding = .(, )
layout.SortOrder = .SortOrder.LayoutOrder
collapsed =
collapseBtn.MouseButton1Click:(()
collapsed = collapsed
scroll.Visible = collapsed
container.Size = .(, PANEL_W, , collapsed PANEL_H)
collapseBtn.Text = collapsed
)
dragging, dragInput, dragStart, startPos
titleBar.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = container.Position
input.Changed:(()
input.UserInputState == .UserInputState.End dragging =
)
)
titleBar.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch
dragInput = input
)
UserInputService.InputChanged:((input)
input == dragInput dragging
delta = input.Position - dragStart
container.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
)
order =
(text, color)
order +=
btn = .()
btn.LayoutOrder = order
btn.Size = .(, -, , )
btn.BackgroundColor3 = color
btn.Text, btn.TextColor3, btn.Font, btn.TextSize = text, .(, , ), .Font.SourceSansBold,
btn.Parent = scroll
.(, btn)
btn
(, .(, , )).MouseButton1Click:(()
phase == phase == phase =
)
(, .(, , )).MouseButton1Click:(targetPlayerPosition)
(, .(, , )).MouseButton1Click:(()
AUTO_EF_BY_WINDSPEED =
currentEF = (currentEF + ) %
currentWindSpeedMPH = EF_SETTINGS[currentEF].MinMPH +
windBase = currentWindSpeedMPH
autoEfBtn autoEfBtn.Text =
)
autoEfBtn = (, .(, , ))
autoEfBtn.MouseButton1Click:(()
AUTO_EF_BY_WINDSPEED = AUTO_EF_BY_WINDSPEED
AUTO_EF_BY_WINDSPEED windBase = currentWindSpeedMPH
autoEfBtn.Text = .. (AUTO_EF_BY_WINDSPEED )
)
(, .(, , )).MouseButton1Click:(spawnNeighborhood)
(, .(, , )).MouseButton1Click:(clearHouses)
mvBtn = (, .(, , ))
mvBtn.MouseButton1Click:(()
MULTI_VORTEX_ENABLED = MULTI_VORTEX_ENABLED
mvBtn.Text = .. (MULTI_VORTEX_ENABLED )
)
rainBtn = ( .. (RAIN_ENABLED ), .(, , ))
rainBtn.MouseButton1Click:(()
RAIN_ENABLED = RAIN_ENABLED
rainBtn.Text = .. (RAIN_ENABLED )
)
lightBtn = ( .. (LIGHTNING_ENABLED ), .(, , ))
lightBtn.MouseButton1Click:(()
LIGHTNING_ENABLED = LIGHTNING_ENABLED
lightBtn.Text = .. (LIGHTNING_ENABLED )
)
(, .(, , )).MouseButton1Click:(()
strikeLightning ()
)
(, .(, , )).MouseButton1Click:(()
TOOLS.deployProbe TOOLS.()
)
(, .(, , )).MouseButton1Click:(()
TOOLS.clearProbes TOOLS.()
)
(, .(, , )).MouseButton1Click:(()
TOOLS.deployRadar TOOLS.()
)
(, .(, , )).MouseButton1Click:(()
TOOLS.openRadar TOOLS.()
)
(, .(, , )).MouseButton1Click:(()
TOOLS.siren TOOLS.()
)
(, .(, , )).MouseButton1Click:(clearHouses)
()
hitbox = .(, )
hitbox.Anchored, hitbox.CanCollide, hitbox.Transparency = , ,
hitbox.CanQuery =
orbitCube = .(, )
orbitCube.Anchored, orbitCube.CanCollide, orbitCube.Transparency = , ,
orbitCube.CanQuery =
funnelFolder = .(, )
funnelFolder.Name =
tornadoSound = .(, hitbox)
tornadoSound.SoundId = TORNADO_SOUND_ID
tornadoSound.Looped =
tornadoSound.Volume =
tornadoSound.RollOffMaxDistance =
tornadoSound.RollOffMinDistance =
tornadoSound:()
distortionEffect = .(, tornadoSound)
distortionEffect.Level =
(position)
sndPart = .(, )
sndPart.Anchored =
sndPart.Transparency =
sndPart.CanCollide =
sndPart.Position = position
snd = .(, sndPart)
snd.SoundId = CRASH_SOUND_ID
snd.Volume = .(, ) /
snd.PlaybackSpeed = .(, ) /
snd.RollOffMaxDistance =
snd:()
Debris:(sndPart, )
(trans)
p = .()
p.Size = .(, , )
p.Anchored, p.Transparency, p.CanCollide = , ,
p.CanQuery, p.CanTouch, p.CastShadow = , ,
p.Parent = funnelFolder
bb = .(, p)
bb.Size, bb.LightInfluence = .(, , , ),
img = .(, bb)
img.Size, img.BackgroundTransparency, img.Image = .(, , , ), , TEXTURE_ID
img.ImageTransparency, img.Rotation = trans, .()
p, img, bb
PARKED = .(, -, )
funnel = {}
i = , FUNNEL_PARTS
p, img, bb = ()
p.CFrame = PARKED
funnel[i] = {
p = p, img = img, bb = bb, idx = i,
pr = (((i - ) + .()) / FUNNEL_PARTS) ^ ,
ang = .() * ,
rf = + * .(.()),
sizeMul = + .() * ,
shade = (.() - ) * ,
seed = .() * ,
stick = .() < STICK_CHANCE,
nextKick = .() * ,
ex = , exv = , boost = ,
}
funnelHidden =
funnelParts, funnelCFs = {}, {}
i, d (funnel)
funnelParts[i] = d.p
funnelCFs[i] = PARKED
cloudBatchParts, cloudBatchCFs, lastCloudNb = {}, {},
subVortexParticles = {}
i = , .(, .( * QUALITY))
p, img, bb = ()
p.CFrame = PARKED
.(subVortexParticles, {p = p, img = img, bb = bb, pr = .(), ang = .() * , vIdx = (i % ) + })
DC = {N = .(, .( * QUALITY)), list = {}, parts = {}, cfs = {}, parked = }
i = , DC.N
p, img, bb = ()
p.CFrame = PARKED
img.ImageColor3 = .(, , )
DC.list[i] = {
p = p, img = img, bb = bb,
pr = .() ^ , ang = .() * ,
rf = + .() * , sizeMul = + .() * ,
rise = + .(), seed = .() * ,
}
DC.parts[i] = p
DC.cfs[i] = PARKED
DUST = {N = .(, .( * QUALITY)), list = {}, parts = {}, cfs = {}, parked = }
i = , DUST.N
p, img, bb = ()
p.CFrame = PARKED
img.ImageColor3 = DUST_COLOR
DUST.list[i] = {
p = p, img = img, bb = bb,
ang = .() * , rr = + .() * ,
hh = .() ^ , sizeMul = + .() * ,
seed = .() * , spin = + .() * ,
}
DUST.parts[i] = p
DUST.cfs[i] = PARKED
clouds = {}
(kind, d)
p, img, bb = ()
p.CFrame = PARKED
d.kind, d.p, d.img, d.bb = kind, p, img, bb
d.idx = #clouds +
d.seed = .() *
d.sizeMul = + .() *
d.revealAt = .huge
clouds[d.idx] = d
_ = , SC_COUNTS.Shelf (, {f = - + * .(), sf = .() * - , dy = .() * })
_ = , SC_COUNTS.Wall (, {a = .() * .pi * , rr = .(.())})
_ = , SC_COUNTS.Tower (, {h = .() ^ , a = .() * .pi * , rf = + * .(.())})
_ = , SC_COUNTS.Anvil (, {u = - + * (.() ^ ), sf = .() * - , yo = .() * - })
_ = , SC_COUNTS.Top (, {th = .() * .pi * , ph = .(), rr = + * .()})
_ = , SC_COUNTS.Flank (, {u = .(), so = .(), hh = .() ^ })
_ = , SC_COUNTS.Shaft (, {f = + * .(), s = (.() * - ) * , hy = .()})
prio = {shelf = , wall = , flank = , shaft = , tower = , anvil = , top = }
order = {}
i, d (clouds)
order[i] = {d = d, key = prio[d.kind] + .() * }
.(order, (a, b) a.key < b.key )
interval = TIMELINE.SupercellSeconds / #order
rank, o (order)
o.d.revealAt = (rank - ) * interval
(shade)
s = shade * COLOR_BRIGHTNESS * ( + lightningFlash * )
.(
.(FUNNEL_COLOR.R * s, , ),
.(FUNNEL_COLOR.G * s, , ),
.(FUNNEL_COLOR.B * s, , )
)
CLOUD_DARK = .(TORNADO_COLOR.R * , TORNADO_COLOR.G * , TORNADO_COLOR.B * )
CLOUD_LIGHT = .(, , )
(v)
v = .(v + lightningFlash * , , )
c = CLOUD_DARK:(CLOUD_LIGHT, v)
.(
.(c.R * COLOR_BRIGHTNESS, , ),
.(c.G * COLOR_BRIGHTNESS, , ),
.(c.B * COLOR_BRIGHTNESS, , )
)
()
.(sm.TopRadius, ) * BOTTOM_RATIO * sm.WidthMul
(pr)
col = ()
top = .(sm.TopRadius * sm.WidthMul, col + )
r = col + (top - col) * (pr ^ TOP_FLARE)
bulb = + BULB_AMOUNT * .(-(((pr - ) / ) ^ ))
round = + * .(.(pr / , ))
r * bulb * round
victims = {}
cooldowns = {}
victimRay = RaycastParams.()
victimRay.FilterType = .RaycastFilterType.Exclude
(st, hum)
st
st.vf st.vf:() st.vf =
st.att st.att:() st.att =
st.ps hum hum.PlatformStand =
st.ps =
BEND = {tx = , tz = , sx = , sz = }
(pr)
k = pr ^
s = .(pr * + timeElapsed * ) * pr
BEND.tx * k + BEND.sx * s, BEND.tz * k + BEND.sz * s
(dt, tPos, colR, widthScale)
LIFT.Enabled
groundR = colR * widthScale
pullRange = groundR * LIFT.PullRange
catchR = groundR * LIFT.CatchRange
_, plr (Players:())
char = plr.Character
root = char char:()
hum = char char:()
st = victims[plr]
root hum hum.Health <=
(st)
victims[plr] =
rel = .(root.Position.X - tPos.X, , root.Position.Z - tPos.Z)
dist = rel.Magnitude
st
contact >= timeElapsed >= (cooldowns[plr] )
dist < pullRange (root.Position.Y - tPos.Y) <
st = {mode = }
victims[plr] = st
st
st.mode ==
dist > pullRange *
(st, hum)
victims[plr] =
dist <= catchR
(st)
st.mode =
st.t =
st.ang = .(rel.Z, rel.X)
st.rad = dist
st.startRel = root.Position.Y - tPos.Y
st.tx = (.() - ) *
st.ty = (.() - ) *
st.tz = (.() - ) *
st.prev = root.Position
st.yaw = (, root.CFrame:())
hum.PlatformStand =
radDir = dist > (rel / dist) .(, , )
tangent = .(-radDir.Z, , radDir.X)
k = - dist / pullRange
speed = LIFT.PullMin + (LIFT.PullMax - LIFT.PullMin) * k
want = -radDir * speed + tangent * speed *
plr == Player
st.vf st.vf.Parent
(st)
att = .()
att.Name =
att.Parent = root
vf = .()
vf.Name =
vf.Attachment0, vf.RelativeTo = att, .ActuatorRelativeTo.World
vf.ApplyAtCenterOfMass =
vf.Force = .zero
vf.Parent = root
st.att, st.vf = att, vf
hum.PlatformStand =
st.ps =
vel = root.AssemblyLinearVelocity
steer = (want - .(vel.X, , vel.Z)) * LIFT.PullGain
mass = root.AssemblyMass
st.vf.Force = .(steer.X * mass, .Gravity * LIFT.PullLiftFrac * mass, steer.Z * mass)
root.CFrame = root.CFrame + want * dt
st.mode ==
st.t += dt
isMe = (plr == Player)
q = .(st.t / LIFT.Duration, , )
rise = - ( - q) ^
maxH = sm.Height * LIFT.MaxHeight
h = st.startRel + (maxH - st.startRel) * rise
pr = .(h / sm.Height, , )
targetRad = .((pr) * widthScale * LIFT.RadiusFrac, )
st.rad += (targetRad - st.rad) * ( - .(-dt * ))
st.ang += (LIFT.OrbitSpeed / .(st.rad, )) * dt
bx, bz = (pr)
ax = tPos.X + bx
az = tPos.Z + bz
pos = .(
ax + .(st.ang) * st.rad,
tPos.Y + h + (isMe .(st.t * ) * ),
az + .(st.ang) * st.rad
)
isMe
root.CFrame = .(pos) * .(, st.yaw, )
root.CFrame = .(pos) * .(st.t * st.tx, st.t * st.ty, st.t * st.tz)
root.AssemblyLinearVelocity = .zero
root.AssemblyAngularVelocity = .zero
st.prev = pos
st.t >= LIFT.Duration
radDir = .(.(st.ang), , .(st.ang))
tangent = .(-.(st.ang), , .(st.ang))
throwVel = radDir * (LIFT.ThrowSpeed * ) + tangent * (LIFT.ThrowSpeed * ) + .(, LIFT.ThrowUp, )
root.CFrame = .(pos) * .(, st.ang, )
cooldowns[plr] = timeElapsed + LIFT.Cooldown
plr == Player
hum.PlatformStand =
hum:(.HumanoidStateType.Freefall)
root.AssemblyLinearVelocity = throwVel
victims[plr] =
st.mode =
st.v = throwVel
st.fly =
st.mode ==
st.fly += dt
st.v += .(, -.Gravity, ) * dt
from = root.Position
step = st.v * dt
victimRay.FilterDescendantsInstances = {char, funnelFolder}
hit = :(from, step + step.Unit * , victimRay)
hit st.fly >
hit root.CFrame = .(hit.Position + .(, , ))
root.AssemblyLinearVelocity = .zero
hum.PlatformStand =
victims[plr] =
root.CFrame = .(from + step)
root.AssemblyLinearVelocity = .zero
lastPhysicsUpdate =
lastDebrisForce =
lastCarUpdate =
carTracked, carCount, carCooldown = {}, , {}
carCache = ({}, {__mode = })
(root)
c = carCache[root]
c ~= c
c = root:()
c
ok, parts = (() root:() )
ok
_, q (parts)
q:() c =
c
m = root:()
_ = ,
m m ==
m:(, ) #m:() <=
c =
m = m.Parent m.Parent:()
carCache[root] = c
c
debrisTracked, debrisCount = {},
debrisOverlap = OverlapParams.()
debrisOverlap.FilterType = .RaycastFilterType.Exclude
houseTracked, houseCount, lastHouseStep = {}, ,
HOUSE_MAX =
HOUSE_FORCE_MUL =
HOUSE_WIND_MUL =
HOUSE_LIFT_EVERY =
HOUSE_LIFT_MUL =
HOUSE_MAX_SPEED =
(st, mass, pPos, rel, dist, stormPos, activeHeight)
b = EF_BEHAVIOR[currentEF]
g = .Gravity
st.seed
st.seed = .() *
st.nextToss = timeElapsed + + .() *
radDir = rel / dist
tangentDir = .(-radDir.Z, , radDir.X)
force = radDir * (.(dist + ) * b.pull * mass) + tangentDir * (b.orbit * mass)
b.air
targetHeight = stormPos.Y + activeHeight * b.height
diff = .((targetHeight - pPos.Y) * , -, )
bob = .(timeElapsed * + st.seed) *
force += .(, (g * + diff + bob) * mass, )
force += .(, g * b.liftFrac * mass, )
b.tossEvery
timeElapsed >= st.nextToss
st.nextToss = timeElapsed + b.tossEvery[] + .() * (b.tossEvery[] - b.tossEvery[])
st.tossEnd = timeElapsed + b.tossTime
b.air
ejectDir = (radDir + .(.() - , .() * , .() - )).Unit
st.tossVec = (ejectDir * b.tossPower + .(, b.tossPower * , ))
st.tossVec = .(
(.() * - ) * b.tossPower * ,
g * ( - b.liftFrac) + b.tossPower,
(.() * - ) * b.tossPower *
)
st.tossEnd timeElapsed < st.tossEnd st.tossVec
force += st.tossVec * mass
force
(part, b)
v = part.AssemblyLinearVelocity
b.air
part.AssemblyLinearVelocity = v * b.damp
part.AssemblyLinearVelocity = .(v.X * b.damp, v.Y, v.Z * b.damp)
RunService.Heartbeat:((dt)
dt = .(dt, )
timeElapsed += dt
frameCount +=
supercellTime = .(supercellTime + dt, TIMELINE.SupercellSeconds)
supercellProgress = .(supercellTime / TIMELINE.SupercellSeconds, , )
phase ==
supercellProgress >=
phase =
formAt = timeElapsed + TIMELINE.DelayMin + .() * (TIMELINE.DelayMax - TIMELINE.DelayMin)
phase ==
timeElapsed >= formAt phase =
phase ==
rate = ( / TIMELINE.DescendSeconds) * .( + .(timeElapsed * , ) * , , )
descendProgress = .(descendProgress + dt * rate, , )
descendProgress >= phase =
contact = .((descendProgress - ) / , , )
AUTO_EF_BY_WINDSPEED
phase ==
timeElapsed >= nextWindShift
nextWindShift = timeElapsed + WIND.DriftEvery[] + .() * (WIND.DriftEvery[] - WIND.DriftEvery[])
.() <
windPeak = .(windPeak + (.() - ) * , WIND.PeakMin, WIND.PeakMax)
windTarget = .(windPeak * ( + * .()), WIND.StartMPH, )
windBase += .(windTarget - windBase, -WIND.FallRate * dt, WIND.RiseRate * dt)
currentWindSpeedMPH = windBase * ( + .(timeElapsed * , ) * * WIND.Wobble)
efLevel = , , -
windBase >= EF_SETTINGS[efLevel].MinMPH
currentEF = efLevel
currentWindSpeedMPH > peakWindSpeedMPH peakWindSpeedMPH = currentWindSpeedMPH
windHudLabel efHudLabel frameCount % ==
phase ==
windHudLabel.Text =
efHudLabel.Text = .(, .(supercellProgress * ))
phase ==
windHudLabel.Text =
efHudLabel.Text =
phase ==
windHudLabel.Text =
efHudLabel.Text = .(, .(descendProgress * ))
windHudLabel.Text = .(, .(currentWindSpeedMPH))
efHudLabel.Text = .(, EF_SETTINGS[currentEF].Name, AUTO_EF_BY_WINDSPEED )
stats = EF_SETTINGS[currentEF]
tornadoSound.Volume = ( + (currentEF * )) * descendProgress
tornadoSound.PlaybackSpeed = + (currentEF * )
a = - .(-dt * )
sm.BaseRadius += (stats.BaseRadius - sm.BaseRadius) * a
sm.TopRadius += ((WEDGE_TOP_RADIUS stats.TopRadius) - sm.TopRadius) * a
sm.Height += ((FIXED_HEIGHT stats.Height) - sm.Height) * a
sm.MaxMPH = stats.MaxMPH
sm.WidthMul += ((THIN[currentEF] ) - sm.WidthMul) * a
timeElapsed > nextDirChange
rx, rz = .(-, ), .(-, )
rx == rz == rx =
targetDirection = .(rx, , rz).Unit
nextDirChange = timeElapsed + .(, )
moveMul = .(, contact)
STORM_POS += targetDirection * stats.Move * * MOVE_SPEED * moveMul * dt
stormPos = STORM_POS + .(.(timeElapsed * , ) * , , .(, timeElapsed * ) * )
liveStormPos = stormPos
activeHeight = .(sm.Height * descendProgress, )
lowEdge = sm.Height - activeHeight
widthScale = + * descendProgress
colR = ()
hitbox.Size = .(colR * , activeHeight, colR * )
hitbox.Position = stormPos + .(, lowEdge + activeHeight / , )
windSm.BaseRadius = colR
windSm.TopRadius = .(sm.TopRadius, colR + )
windSm.Height = sm.Height
windSm.MaxMPH = stats.MaxMPH
angle += dt * stats.Speed * SPIN_SPEED
orbitCube.CFrame = hitbox.CFrame * .(.(angle) * colR * , -(activeHeight / ) + , .(angle) * colR * )
sideDir = .(-targetDirection.Z, , targetDirection.X)
leanAmp = sm.Height * .(, - currentEF * )
nA = .(timeElapsed * , )
nB = .(, timeElapsed * )
nC = .(timeElapsed * , ) *
lean = -( + nA * + nC) * leanAmp
sideLean = (nB + nC * ) * leanAmp *
topX = targetDirection.X * lean + sideDir.X * sideLean
topZ = targetDirection.Z * lean + sideDir.Z * sideLean
swayAmp = leanAmp * * ( + nB)
ease = - .(-dt * )
BEND.tx += (topX - BEND.tx) * ease
BEND.tz += (topZ - BEND.tz) * ease
BEND.sx += (sideDir.X * swayAmp - BEND.sx) * ease
BEND.sz += (sideDir.Z * swayAmp - BEND.sz) * ease
cam = .CurrentCamera
target =
cam descendProgress >
cp = cam.CFrame.Position
camH = cp.Y - stormPos.Y
camH >= lowEdge camH <= sm.Height
pr = .((camH - lowEdge) / activeHeight, , )
bx, bz = (pr)
ax = stormPos.X + bx
az = stormPos.Z + bz
dist = .((cp.X - ax) ^ + (cp.Z - az) ^ )
r = (pr) * widthScale
target = .((r - dist) / (r * ), , )
insideBlend += (target - insideBlend) * ( - .(-dt * ))
descendProgress >
funnelHidden =
baseSpin = ( + currentEF * ) * SPIN_SPEED
fm = frameCount %
funnelTrans = + * ( - .(descendProgress * , , ))
_, d (funnel)
baseR = (d.pr) * widthScale
angVel = baseSpin * ( + ( - d.pr) * )
d.stick
d.nextKick -= dt
d.nextKick <=
d.nextKick = + .() *
d.exv += ( + .() * ) * STICK_STRENGTH
d.boost += + .() *
d.exv += (- * d.ex - * d.exv) * dt
d.ex = .(d.ex + d.exv * dt, , * STICK_STRENGTH)
d.boost -= d.boost * * dt
angVel = angVel * ( + d.boost)
d.ang += angVel * dt
rad = .(d.ang)
r = baseR * d.rf * ( + d.ex)
h = lowEdge + d.pr * activeHeight
bx, bz = (d.pr)
funnelCFs[d.idx] = .(stormPos + .(.(rad) * r + bx, h, .(rad) * r + bz))
d.idx % == fm
thinBoost = (sm.WidthMul < )
sz = (.(baseR, colR * ) * + * ( + * sm.WidthMul))
* d.sizeMul * ( + d.ex * ) * thinBoost
d.bb.Size = .(sz, , sz, )
shade = + d.pr * + d.shade + .(timeElapsed * , d.seed) * - currentEF * + d.ex *
d.img.ImageColor3 = (.(shade, , ))
d.img.ImageTransparency = funnelTrans
:(funnelParts, funnelCFs, .BulkMoveMode.FireCFrameChanged)
funnelHidden
funnelHidden =
i = , #funnelCFs funnelCFs[i] = PARKED
:(funnelParts, funnelCFs, .BulkMoveMode.FireCFrameChanged)
vis = .(contact, , ) * .( + currentEF * , , )
activeN = .(DC.N * vis)
activeN >
DC.parked =
spin = ( + currentEF * ) * SPIN_SPEED
i = , DC.N
d = DC.list[i]
i > activeN
DC.cfs[i] = PARKED
d.pr += dt * ( + * ( - d.pr)) * d.rise * ( + currentEF * )
d.pr >=
d.pr =
d.ang = .() *
d.rf = + .() *
d.ang += spin * ( + ( - d.pr) * ) * ( + d.rise * ) * dt
rad = .(d.ang)
baseR = (d.pr) * widthScale
r = baseR * d.rf +
h = lowEdge + d.pr * activeHeight
bx, bz = (d.pr)
DC.cfs[i] = .(stormPos + .(.(rad) * r + bx, h, .(rad) * r + bz))
(i + frameCount) % ==
sz = ( + baseR * ) * d.sizeMul
d.bb.Size = .(sz, , sz, )
fade = .(d.pr / , ) * .(( - d.pr) / , )
tr = + * d.pr
d.img.ImageTransparency = tr + ( - tr) * ( - fade)
sh = ( + * .(timeElapsed * , d.seed)) * ( + lightningFlash * )
d.img.ImageColor3 = .(
.( * sh, , ), .( * sh, , ), .( * sh, , ))
:(DC.parts, DC.cfs, .BulkMoveMode.FireCFrameChanged)
DC.parked
DC.parked =
i = , DC.N DC.cfs[i] = PARKED
:(DC.parts, DC.cfs, .BulkMoveMode.FireCFrameChanged)
vis = .(contact, , )
activeN = .(DUST.N * vis)
activeN >
DUST.parked =
baseR = () * widthScale
skirt = baseR * +
spin = ( + currentEF * ) * SPIN_SPEED
i = , DUST.N
d = DUST.list[i]
i > activeN
DUST.cfs[i] = PARKED
d.ang += spin * d.spin * dt *
rad = .(d.ang)
r = skirt * d.rr
h = + d.hh * ( + baseR * ) + .(timeElapsed * + d.seed) *
DUST.cfs[i] = .(stormPos + .(.(rad) * r, h, .(rad) * r))
(i + frameCount) % ==
sz = (skirt * + ) * d.sizeMul
d.bb.Size = .(sz, , sz, )
edge = .( - (d.rr - ) / , , )
tr = + * ( - edge)
d.img.ImageTransparency = tr + ( - tr) * ( - vis)
sh = ( + * .(timeElapsed * , d.seed)) * ( + lightningFlash * )
d.img.ImageColor3 = .(
.(DUST_COLOR.R * sh, , ), .(DUST_COLOR.G * sh, , ), .(DUST_COLOR.B * sh, , ))
:(DUST.parts, DUST.cfs, .BulkMoveMode.FireCFrameChanged)
DUST.parked
DUST.parked =
i = , DUST.N DUST.cfs[i] = PARKED
:(DUST.parts, DUST.cfs, .BulkMoveMode.FireCFrameChanged)
_, d (subVortexParticles)
MULTI_VORTEX_ENABLED contact >=
d.pr = (d.pr + dt * ) %
loopTime = (timeElapsed * ) + (d.vIdx * (.pi * ))
boomerangDist = sm.BaseRadius + (.(loopTime) * (sm.BaseRadius * ))
subOrbitAngle = angle + (d.vIdx * (.pi * ))
subCenter = stormPos + .(.(subOrbitAngle) * boomerangDist, , .(subOrbitAngle) * boomerangDist)
d.ang += ( + currentEF * ) * dt
rad = .(d.ang)
subRadius = + (d.pr * )
currentHeight = d.pr * (activeHeight * )
d.p.CFrame = .(subCenter + .(.(rad) * subRadius, currentHeight, .(rad) * subRadius))
sz = + (d.pr * )
d.bb.Size = .(sz, , sz, )
d.img.ImageColor3 = .(, , )
d.img.ImageTransparency =
d.parked =
d.parked
d.parked =
d.p.CFrame = PARKED
K = SUPERCELL_SCALE
fwd = SUPERCELL_HEADING
sideV = .(-fwd.Z, , fwd.X)
baseY = sm.Height + CLOUD_BASE_OFFSET
towerH = * K
cm = frameCount %
nb =
_, d (clouds)
appear = .((supercellTime - d.revealAt) / TIMELINE.CloudFadeIn, , )
appear > (appear < d.idx % == cm)
kind = d.kind
F, S, Y, v, sz, tr
kind ==
h = d.h
ang = d.a + timeElapsed * ( + * h)
waist = (h < ) ( * ( - * h) ^ ) ( * ( * h - ) ^ )
R = K * ( + waist) * d.rf
F = K * ( + * h) + .(ang) * R
S = .(ang) * R
Y = baseY + h * towerH + .(timeElapsed * + d.seed) *
v = + * h + (d.rf - ) *
sz = K * * d.sizeMul * ( + * h)
tr = CLOUD_CLEARNESS + + ( - d.rf) *
kind ==
u = d.u
up = .(u, )
Wd
u <
Wd = + * .(.( - (u / ) ^ , ))
Wd = + * ( + * .(.pi * .(u, ) * )) * ( - .(u, ) ^ )
F = K * ( + * u)
S = d.sf * Wd * K
thick = * ( - up ^ ) +
Y = baseY + towerH + K * (thick * d.yo - * up * up) + .(timeElapsed * + d.seed) *
v = + * (d.yo * + )
sz = K * * ( - * up) * d.sizeMul
tr = CLOUD_CLEARNESS + + * up * up
kind ==
th = d.th + timeElapsed *
el = d.ph * (.pi / )
rad = K * * d.rr + .(timeElapsed * + d.seed) *
F = K * + .(th) * .(el) * rad
S = .(th) * .(el) * rad
Y = baseY + towerH + K * + .(el) * rad
v = + * .(el)
sz = K * * d.sizeMul
tr = CLOUD_CLEARNESS +
kind ==
F = K * d.f
t = .(-d.f / , , )
Wd
d.f >=
Wd = * .(.( - (d.f / ) ^ , ))
Wd = + * ( - t) ^
S = d.sf * Wd * K - K * * t * t
Y = baseY - d.dy * K + .(timeElapsed * + d.seed) *
v = - * (d.dy / )
sz = K * * d.sizeMul
tr = CLOUD_CLEARNESS +
kind ==
ang = d.a + timeElapsed *
R = K * * d.rr
F = K * - + .(ang) * R
S = .(ang) * R
Y = baseY + K * ( - * ( - d.rr ^ ))
v = + * d.rr
sz = K * * d.sizeMul
tr = CLOUD_CLEARNESS +
kind ==
u = d.u
F = K * (- - * u)
tt = ( + * u) /
S = K * (- * tt * tt + (d.so * - ) * * ( - tt))
Y = baseY - K * + d.hh * K * * ( - * u)
v = + * d.hh
sz = K * * d.sizeMul
tr = CLOUD_CLEARNESS +
F = K * d.f + ( - d.hy) * K *
S = d.s * K
Y = d.hy * (baseY - )
v = + * d.hy
sz = K * * d.sizeMul
tr = + * d.hy
nb +=
cloudBatchParts[nb] = d.p
cloudBatchCFs[nb] = .(stormPos + fwd * (F - tOffF) + sideV * (S - tOffS) + .(, Y, ))
d.tick = (d.tick ) +
appear < d.tick % == lightningFlash >
ease = appear * appear * ( - * appear)
s = sz * ( + * ease)
d.bb.Size = .(s, , s, )
d.img.ImageColor3 = (v)
d.img.ImageTransparency = tr + ( - tr) * ( - ease)
i = nb + , lastCloudNb
cloudBatchParts[i] =
cloudBatchCFs[i] =
lastCloudNb = nb
nb >
:(cloudBatchParts, cloudBatchCFs, .BulkMoveMode.FireCFrameChanged)
(dt, stormPos, colR, widthScale)
contact > timeElapsed - lastPhysicsUpdate >
lastPhysicsUpdate = timeElapsed
skip = {funnelFolder}
rf, bf = :(), :()
rf skip[#skip + ] = rf
bf skip[#skip + ] = bf
Player.Character skip[#skip + ] = Player.Character
debrisOverlap.FilterDescendantsInstances = skip
soundBudget =
_, p (:(hitbox.CFrame, hitbox.Size, debrisOverlap))
debrisCount >= MAX_DEBRIS carCount >= CARS.MaxCars
(p) p ~= hitbox p ~= orbitCube p.Parent ~= funnelFolder
isHousePart = (p.Name)
shouldSuck =
isHousePart isHousePart >= isHousePart <= isHousePart % ==
isHousePart <= currentEF houseTracked[p] houseCount < HOUSE_MAX
wasAnchored = p.Anchored
p.Anchored = false
p:BreakJoints()
for _, j in ipairs(p:GetJoints()) do pcall(function() j:Destroy() end) end
for _, c in ipairs(p:GetChildren()) do
if c:IsA("VectorForce") then c:Destroy() end
end
local att = Instance.new("Attachment")
att.Name = "HouseSuctionAtt"
att.Parent = p
local vf = Instance.new("VectorForce")
vf.Name = "HouseForce"
vf.Attachment0 = att
vf.RelativeTo = Enum.ActuatorRelativeTo.World
vf.Force = Vector3.zero
vf.Parent = p
houseTracked[p] = {vf = vf, att = att, lastLift = timeElapsed}
houseCount += 1
if wasAnchored and soundBudget > 0 and math.random(1, 4) == 1 then
soundBudget -= 1
playBreakSound(p.Position)
end
end
elseif not p.Anchored then
shouldSuck = true
end
if shouldSuck then
local aroot = p.AssemblyRootPart or p
if aroot and (isCarAssembly(aroot) or aroot.AssemblyMass >= CARS.HeavyMass) then
if currentEF >= CARS.MinEF and carCount < CARS.MaxCars
and not carTracked[aroot] and timeElapsed >= (carCooldown[aroot] or 0) then
local att = Instance.new("Attachment")
att.Name = "TornadoCarAtt"
att.Parent = aroot
local vf = Instance.new("VectorForce")
vf.Name = "TornadoCarForce"
vf.Attachment0, vf.RelativeTo = att, Enum.ActuatorRelativeTo.World
vf.Force = Vector3.zero
vf.Parent = aroot
carTracked[aroot] = {
vf = vf, att = att, mode = "carry",
throwAt = timeElapsed + CARS.CarryMin + math.random() * (CARS.CarryMax - CARS.CarryMin),
}
carCount += 1
end
elseif debrisCount < MAX_DEBRIS and not debrisTracked[p] then
if p.Anchored then
p.Anchored = false
p:BreakJoints()
end
if not p:FindFirstChild("TornadoForce") then
local att = Instance.new("Attachment", p)
local vf = Instance.new("VectorForce", p)
vf.Name, vf.Attachment0, vf.RelativeTo = "TornadoForce", att, Enum.ActuatorRelativeTo.World
debrisTracked[p] = {vf = vf, att = att}
debrisCount += 1
end
end
end
end
end
end
if contact > 0.4 and timeElapsed - lastDebrisForce > 0.1 then
lastDebrisForce = timeElapsed
local maxDist = colR * 8
local b = EF_BEHAVIOR[currentEF]
for p, st in pairs(debrisTracked) do
local vf = st.vf
local drop = false
if not p.Parent or p.Anchored or not vf.Parent then
drop = true
else
local mass = p:GetMass()
local pPos = p.Position
local bx, bz = bendAt(math.clamp((pPos.Y - stormPos.Y) / sm.Height, 0, 1))
local rel = Vector3.new(stormPos.X + bx - pPos.X, 0, stormPos.Z + bz - pPos.Z)
local dist = rel.Magnitude
if dist > maxDist then
drop = true
elseif dist > 0.1 then
vf.Force = computeForce(st, mass, pPos, rel, dist, stormPos, activeHeight)
dampPart(p, b)
end
end
if drop then
debrisTracked[p] = nil
debrisCount -= 1
if vf and vf.Parent then vf:Destroy() end
if st.att and st.att.Parent then st.att:Destroy() end
end
end
end
if next(carTracked) and timeElapsed - lastCarUpdate > 0.1 then
lastCarUpdate = timeElapsed
local maxDist = colR * 8
local b = EF_BEHAVIOR[currentEF]
for root, c in pairs(carTracked) do
local drop = false
if not root.Parent or root.Anchored or not c.vf.Parent then
drop = true
else
local mass = root.AssemblyMass
local pPos = root.Position
local bx, bz = bendAt(math.clamp((pPos.Y - stormPos.Y) / sm.Height, 0, 1))
local rel = Vector3.new(stormPos.X + bx - pPos.X, 0, stormPos.Z + bz - pPos.Z)
local dist = rel.Magnitude
if c.mode == "carry" then
if dist > maxDist then
drop = true
elseif timeElapsed >= c.throwAt then
if b.air then
local outward = dist > 0.1 and (-rel / dist) or Vector3.new(1, 0, 0)
local tangent = Vector3.new(outward.Z, 0, -outward.X)
local dir = (outward * 0.8 + tangent * 0.6).Unit
c.vf.Force = (dir * CARS.ThrowAccel + Vector3.new(0, workspace.Gravity + CARS.ThrowUp, 0)) * mass
c.mode = "throw"
c.endAt = timeElapsed + CARS.ThrowTime
carCooldown[root] = timeElapsed + CARS.ThrowTime + CARS.Cooldown
else
drop = true
carCooldown[root] = timeElapsed + CARS.Cooldown
end
elseif dist > 0.1 then
c.vf.Force = computeForce(c, mass, pPos, rel, dist, stormPos, activeHeight)
dampPart(root, b)
end
elseif timeElapsed >= c.endAt then
drop = true
end
end
if drop then
carTracked[root] = nil
carCount -= 1
carCooldown[root] = carCooldown[root] or (timeElapsed + 5)
if c.vf and c.vf.Parent then c.vf:Destroy() end
if c.att and c.att.Parent then c.att:Destroy() end
end
end
end
end)
-- [[ RAIN & LIGHTNING SYSTEM ]] --
local rainFolder = Instance.new("Folder")
rainFolder.Name = "RainAssets"
rainFolder.Parent = workspace
local boltFolder = Instance.new("Folder")
boltFolder.Name = "LightningAssets"
boltFolder.Parent = workspace
local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Exclude
local function rebuildFilter()
local list = {funnelFolder, rainFolder, boltFolder}
if Player.Character then table.insert(list, Player.Character) end
rayParams.FilterDescendantsInstances = list
end
rebuildFilter()
local baseBrightness = Lighting.Brightness
local baseAmbient = Lighting.Ambient
local baseOutdoor = Lighting.OutdoorAmbient
local baseFogEnd = Lighting.FogEnd
local baseFogStart = Lighting.FogStart
local baseFogColor = Lighting.FogColor
local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere")
local baseAtmDensity = atmosphere and atmosphere.Density or 0.3
local baseAtmColor = atmosphere and atmosphere.Color or Color3.new(1, 1, 1)
local stormGrade = Instance.new("ColorCorrectionEffect")
stormGrade.Name = "StormGrade"
stormGrade.Parent = Lighting
local HIDDEN_POS = Vector3.new(0, -100000, 0)
local HIDDEN_CF = CFrame.new(HIDDEN_POS)
local drops, dropParts, dropCFs = {}, {}, {}
for i = 1, RAIN_DROPS do
local p = Instance.new("Part")
p.Anchored = true
p.CanCollide, p.CanQuery, p.CanTouch, p.CastShadow = false, false, false, false
p.Material = Enum.Material.Neon
p.Color = Color3.fromRGB(180, 185, 195)
p.Transparency = 0.55
p.Size = Vector3.new(0.1, 0.1, 3 + math.random() * 2.5)
p.CFrame = HIDDEN_CF
p.Parent = rainFolder
drops[i] = {pos = HIDDEN_POS, v = 0.85 + math.random() * 0.3}
dropParts[i] = p
dropCFs[i] = HIDDEN_CF
end
local rainSound = Instance.new("Sound")
rainSound.Name = "RainLoop"
rainSound.SoundId = RAIN_SOUND_ID
rainSound.Looped = true
rainSound.Volume = 0
rainSound.Parent = SoundService
local rainEQ = Instance.new("EqualizerSoundEffect")
rainEQ.Parent = rainSound
rainSound:Play()
local splashPlate = Instance.new("Part")
splashPlate.Name = "RainSplashPlate"
splashPlate.Anchored = true
splashPlate.CanCollide, splashPlate.CanQuery, splashPlate.CanTouch, splashPlate.CastShadow = false, false, false, false
splashPlate.Transparency = 1
splashPlate.Size = Vector3.new(RAIN_RADIUS * 2, 0.2, RAIN_RADIUS * 2)
splashPlate.CFrame = HIDDEN_CF
splashPlate.Parent = rainFolder
local splash = Instance.new("ParticleEmitter")
splash.Texture = "rbxasset://textures/particles/sparkles_main.dds"
splash.Shape = Enum.ParticleEmitterShape.Box
splash.ShapeStyle = Enum.ParticleEmitterShapeStyle.Surface
splash.EmissionDirection = Enum.NormalId.Top
splash.Lifetime = NumberRange.new(0.15, 0.3)
splash.Speed = NumberRange.new(2, 6)
splash.Acceleration = Vector3.new(0, -30, 0)
splash.SpreadAngle = Vector2.new(35, 35)
splash.Size = NumberSequence.new(0.5, 1.5)
splash.Transparency = NumberSequence.new(0.45, 1)
splash.Color = ColorSequence.new(Color3.fromRGB(200, 205, 215))
splash.LightEmission = 0.15
splash.Rotation = NumberRange.new(0, 360)
splash.Rate = 0
splash.Parent = splashPlate
local mist = Instance.new("ParticleEmitter")
mist.Texture = "rbxasset://textures/particles/smoke_main.dds"
mist.Shape = Enum.ParticleEmitterShape.Box
mist.ShapeStyle = Enum.ParticleEmitterShapeStyle.Surface
mist.EmissionDirection = Enum.NormalId.Top
mist.Lifetime = NumberRange.new(3, 4.5)
mist.Speed = NumberRange.new(1, 4)
mist.Size = NumberSequence.new(18, 34)
mist.Transparency = NumberSequence.new(0.93, 1)
mist.Color = ColorSequence.new(Color3.fromRGB(170, 175, 185))
mist.Rotation = NumberRange.new(0, 360)
mist.RotSpeed = NumberRange.new(-8, 8)
mist.Rate = 0
mist.Parent = splashPlate
local rainVel = Vector3.new(30, -210, 15)
local rainIdle = false
local rainFade = 0
local shelterBlend = 0
local sheltered = false
local floorY = groundY
local nextShelterCheck = 0
local nextStrikeTime = 3
local flashApplied = false
local function respawnDrop(d, camPos, initial)
local ang = math.random() * math.pi * 2
local r = RAIN_RADIUS * math.sqrt(math.random())
if sheltered and r < SHELTER_RADIUS then
r = SHELTER_RADIUS + math.random() * (RAIN_RADIUS - SHELTER_RADIUS)
end
local topY = camPos.Y + RAIN_HEIGHT
local y
if initial then
y = floorY + math.random() * math.max(topY - floorY, 1)
else
y = camPos.Y + RAIN_HEIGHT * (0.7 + 0.3 * math.random())
end
local fallTime = math.max(y - floorY, 1) / math.max(-rainVel.Y, 40)
local drift = Vector3.new(rainVel.X, 0, rainVel.Z) * fallTime * 0.5
d.pos = Vector3.new(camPos.X + math.cos(ang) * r, y, camPos.Z + math.sin(ang) * r) - drift
end
local function playThunder(dist, big)
local delay = dist / THUNDER_SPEED
task.delay(delay, function()
local snd = Instance.new("Sound")
snd.SoundId = THUNDER_SOUND_IDS[math.random(#THUNDER_SOUND_IDS)]
snd.Volume = math.clamp(4.2 - dist / 1400, 0.8, 4.5) * (big and 1 or 0.7)
snd.PlaybackSpeed = (dist < 600 and 1.0 or 0.88) + (math.random() - 0.5) * 0.12
local eq = Instance.new("EqualizerSoundEffect")
eq.HighGain = -math.clamp(dist / 180, 0, 24)
eq.Parent = snd
snd.Parent = SoundService
snd:Play()
Debris:AddItem(snd, 30)
end)
end
local function buildBolt(topPos, groundPos, camPos)
local folder = Instance.new("Folder")
folder.Name = "Bolt"
local segs = {}
local dist = (groundPos - camPos).Magnitude
local thick = math.clamp(dist * 0.004, 1.5, 10)
local function addSeg(a, b, t, color, baseTrans)
local len = (b - a).Magnitude
if len < 0.1 then return end
local p = Instance.new("Part")
p.Anchored = true
p.CanCollide, p.CanQuery, p.CanTouch, p.CastShadow = false, false, false, false
p.Material = Enum.Material.Neon
p.Color = color
p.Size = Vector3.new(t, t, len)
p.CFrame = CFrame.lookAt((a + b) / 2, b)
p.Transparency = baseTrans
p.Parent = folder
segs[#segs + 1] = {p = p, base = baseTrans}
end
local function jaggedPath(a, b, n, amp)
local pts = {a}
local dir = b - a
local u = dir.Unit
for i = 1, n - 1 do
local r = Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5)
r = (r - u * r:Dot(u)) * 2 * amp
pts[#pts + 1] = a + dir * (i / n) + r
end
pts[#pts + 1] = b
return pts
end
local function drawPath(pts, t)
for i = 1, #pts - 1 do
addSeg(pts[i], pts[i + 1], t, BOLT_COLOR, 0)
addSeg(pts[i], pts[i + 1], t * 3.2, Color3.fromRGB(160, 175, 200), 0.75)
end
end
local n = 18
local mainPts = jaggedPath(topPos, groundPos, n, ((topPos - groundPos).Magnitude / n) * 0.55)
drawPath(mainPts, thick)
for i = 3, #mainPts - 3 do
if math.random() < 0.22 then
local s = mainPts[i]
local e = s + Vector3.new((math.random() - 0.5) * 800, -(250 + math.random() * 450), (math.random() - 0.5) * 800)
drawPath(jaggedPath(s, e, 5, 28), thick * 0.45)
end
end
local lightPart = Instance.new("Part")
lightPart.Anchored = true
lightPart.CanCollide, lightPart.CanQuery, lightPart.CanTouch = false, false, false
lightPart.Transparency = 1
lightPart.Size = Vector3.new(1, 1, 1)
lightPart.Position = groundPos + Vector3.new(0, 6, 0)
lightPart.Parent = folder
local pl = Instance.new("PointLight")
pl.Color = Color3.fromRGB(190, 200, 215)
pl.Range = 60
pl.Brightness = 0
pl.Parent = lightPart
folder.Parent = boltFolder
local function setBolt(dim)
for _, s in ipairs(segs) do
s.p.Transparency = s.base + (1 - s.base) * dim
end
pl.Brightness = 14 * (1 - dim)
end
return folder, setBolt
end
function strikeLightning(sheet)
local cam = workspace.CurrentCamera
if not cam then return end
local camPos = RADAR.active and RADAR.realCamPos or cam.CFrame.Position
if sheet then
local sheetDist = 1200 + math.random() * 3000
task.spawn(function()
for _ = 1, math.random(2, 4) do
lightningFlash = math.max(lightningFlash, 0.35 + math.random() * 0.3)
task.wait(0.06 + math.random() * 0.1)
end
end)
playThunder(sheetDist, false)
return
end
local fwdV = SUPERCELL_HEADING
local sideV = Vector3.new(-fwdV.Z, 0, fwdV.X)
local K = SUPERCELL_SCALE
local tx, tz
for _ = 1, 5 do
local F = K * (-3000 + math.random() * 8000)
local S = K * (math.random() * 2 - 1) * 3000
local wp = liveStormPos + fwdV * (F - tOffF) + sideV * (S - tOffS)
tx, tz = wp.X, wp.Z
if Vector2.new(tx - camPos.X, tz - camPos.Z).Magnitude <= LIGHTNING_RANGE then break end
end
rebuildFilter()
local hit = workspace:Raycast(Vector3.new(tx, camPos.Y + 4000, tz), Vector3.new(0, -9000, 0), rayParams)
local gy = hit and hit.Position.Y or groundY
local ground = Vector3.new(tx, gy, tz)
local cloudY = liveStormPos.Y + sm.Height + CLOUD_BASE_OFFSET
local top = Vector3.new(
tx + (math.random() - 0.5) * 400,
math.max(cloudY + math.random() * 300 - 150, gy + 600),
tz + (math.random() - 0.5) * 400
)
local dist = (ground - camPos).Magnitude
local folder, setBolt = buildBolt(top, ground, camPos)
local flashScale = math.clamp(1.15 - dist / 6000, 0.45, 1)
task.spawn(function()
local pulses = math.random(2, 4)
for i = 1, pulses do
local peak = (i == 1) and 1 or (0.5 + math.random() * 0.4)
lightningFlash = math.max(lightningFlash, peak * flashScale)
setBolt(0)
task.wait(0.04 + math.random() * 0.05)
setBolt(0.8)
task.wait(0.03 + math.random() * 0.07)
end
setBolt(1)
folder:Destroy()
end)
playThunder(dist, true)
end
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
local cam = workspace.CurrentCamera
if not cam then return end
local camPos = RADAR.active and RADAR.realCamPos or cam.CFrame.Position
local rainTarget = (RAIN_ENABLED and 1 or 0) * math.clamp((supercellProgress - 0.25) / 0.4, 0, 1)
rainFade += math.clamp(rainTarget - rainFade, -dt / 2, dt / RAIN_FADE_IN)
if timeElapsed >= nextShelterCheck then
nextShelterCheck = timeElapsed + 0.15
rebuildFilter()
local up = workspace:Raycast(camPos, Vector3.new(0, 70, 0), rayParams)
sheltered = up ~= nil and up.Instance.Transparency < 0.8
local down = workspace:Raycast(camPos, Vector3.new(0, -300, 0), rayParams)
floorY = down and down.Position.Y or (camPos.Y - 40)
floorY = math.max(floorY, camPos.Y - 150)
end
local windVec = calculateSpatialWindVector(camPos, liveStormPos, windSm, contact)
local ambientWind = targetDirection * 35 + Vector3.new(
math.noise(timeElapsed * 0.3, 2) * 25, 0, math.noise(5, timeElapsed * 0.3) * 25)
local h = Vector3.new(windVec.X, 0, windVec.Z) * 0.9 + ambientWind
if h.Magnitude > 260 then h = h.Unit * 260 end
local fall = 200 + currentEF * 12
rainVel = rainVel:Lerp(Vector3.new(h.X, -fall, h.Z), 1 - math.exp(-dt * 3))
local rot = CFrame.lookAt(Vector3.zero, rainVel)
local active = math.floor(RAIN_DROPS * math.clamp(rainFade * RAIN_INTENSITY, 0, 1))
local radius2 = (RAIN_RADIUS * 1.35) ^ 2
local shelterR2 = SHELTER_RADIUS ^ 2
if active > 0 or not rainIdle then
for i = 1, RAIN_DROPS do
local d = drops[i]
if i > active then
d.pos = HIDDEN_POS
dropCFs[i] = HIDDEN_CF
else
local pos = d.pos
if pos.Y < -50000 then
respawnDrop(d, camPos, true)
pos = d.pos
else
pos = pos + rainVel * (d.v * dt)
local dx, dz = pos.X - camPos.X, pos.Z - camPos.Z
local hd2 = dx * dx + dz * dz
if pos.Y < floorY or hd2 > radius2 or (sheltered and hd2 < shelterR2) then
respawnDrop(d, camPos, false)
pos = d.pos
else
d.pos = pos
end
end
dropCFs[i] = CFrame.new(pos) * rot
end
end
workspace:BulkMoveTo(dropParts, dropCFs, Enum.BulkMoveMode.FireCFrameChanged)
rainIdle = (active == 0)
end
splashPlate.CFrame = CFrame.new(camPos.X, floorY + 0.15, camPos.Z)
local f = math.clamp(rainFade * RAIN_INTENSITY, 0, 1)
splash.Rate = 1800 * QUALITY * f * (sheltered and 0.2 or 1)
mist.Rate = 12 * f
shelterBlend += ((sheltered and 1 or 0) - shelterBlend) * (1 - math.exp(-dt * 3))
rainSound.Volume = RAIN_VOLUME * rainFade * (1 - 0.6 * shelterBlend) * (0.8 + currentEF * 0.05)
rainEQ.HighGain = -22 * shelterBlend
if LIGHTNING_ENABLED and supercellProgress > 0.35 and timeElapsed >= nextStrikeTime then
local gap = LIGHTNING_MIN_DELAY + math.random() * (LIGHTNING_MAX_DELAY - LIGHTNING_MIN_DELAY)
nextStrikeTime = timeElapsed + gap / (1 + currentEF * 0.3)
strikeLightning(math.random() < 0.3)
if math.random() < 0.25 then
task.delay(0.3 + math.random() * 0.7, function() strikeLightning(false) end)
end
end
lightningFlash *= math.exp(-dt * 7)
if lightningFlash < 0.002 then lightningFlash = 0 end
if lightningFlash > 0 then
flashApplied = true
Lighting.Brightness = baseBrightness + lightningFlash * 3.5
local k = math.clamp(lightningFlash * 0.7, 0, 1)
Lighting.Ambient = baseAmbient:Lerp(Color3.fromRGB(200, 205, 215), k)
Lighting.OutdoorAmbient = baseOutdoor:Lerp(Color3.fromRGB(210, 215, 225), k)
elseif flashApplied then
flashApplied = false
Lighting.Brightness = baseBrightness
Lighting.Ambient = baseAmbient
Lighting.OutdoorAmbient = baseOutdoor
end
stormGrade.Brightness = -0.03 * rainFade + lightningFlash * 0.16
stormGrade.Saturation = -0.2 * rainFade
stormGrade.Contrast = 0.05 * rainFade
local fogEnd, atmDensity = baseFogEnd, baseAtmDensity
if RAIN_FOG then
fogEnd = baseFogEnd - (baseFogEnd - RAIN_FOG_END) * rainFade
atmDensity = baseAtmDensity + RAIN_FOG_DENSITY * rainFade
end
local ib = insideBlend
Lighting.FogEnd = fogEnd + (INSIDE.FogEnd - fogEnd) * ib
Lighting.FogStart = baseFogStart * (1 - ib) + INSIDE.FogStart * ib
Lighting.FogColor = baseFogColor:Lerp(INSIDE.FogColor, ib)
if atmosphere then
atmosphere.Density = atmDensity + (INSIDE.AtmDensity - atmDensity) * ib
atmosphere.Color = baseAtmColor:Lerp(INSIDE.FogColor, ib)
end
stormGrade.TintColor = Color3.new(1, 1, 1):Lerp(INSIDE.Tint, ib)
end)
-- [[ CAMERA SHAKE ]] --
RunService:BindToRenderStep("TornadoCameraShake", Enum.RenderPriority.Camera.Value + 1, function()
local ib = insideBlend
if ib < 0.01 then return end
local cam = workspace.CurrentCamera
if not cam then return end
local k = ib * (0.5 + currentEF * 0.15)
local t = os.clock() * 24
local function n(seed) return math.noise(t, seed) * 2 end
cam.CFrame = cam.CFrame
* CFrame.new(n(1.1) * INSIDE.ShakePos * k, n(2.2) * INSIDE.ShakePos * k, n(3.3) * INSIDE.ShakePos * k)
* CFrame.Angles(n(4.4) * INSIDE.ShakeRot * k, n(5.5) * INSIDE.ShakeRot * k, n(6.6) * INSIDE.ShakeRot * k)
end)
-- [[ PROBES & 3D RADAR SYSTEM ]] --
local function initProbesAndRadar()
local PLATE = RADAR.PlateSize
local HALF = PLATE / 2
local GRID = RADAR.Grid
local CELL = PLATE / GRID
local ROOM = RADAR.RoomPos
local TOP = ROOM.Y + 2
local SCALE = RADAR.Range / HALF
local WALL_H = RADAR.WallHeight
local ANG_STEP = 5
local ANG_BUCKETS = 360 / ANG_STEP
local RAD90 = math.rad(90)
local PALETTE = {
Color3.fromRGB(4, 233, 231), Color3.fromRGB(1, 159, 244), Color3.fromRGB(3, 0, 244),
Color3.fromRGB(2, 253, 2), Color3.fromRGB(1, 197, 1), Color3.fromRGB(0, 142, 0),
Color3.fromRGB(253, 248, 2), Color3.fromRGB(229, 188, 0), Color3.fromRGB(253, 149, 0),
Color3.fromRGB(253, 0, 0), Color3.fromRGB(212, 0, 0), Color3.fromRGB(188, 0, 0),
Color3.fromRGB(248, 0, 253), Color3.fromRGB(152, 84, 198), Color3.fromRGB(253, 253, 253),
}
local toolsFolder = Instance.new("Folder")
toolsFolder.Name = "TornadoTools"
toolsFolder.Parent = workspace
local roomFolder = Instance.new("Folder")
roomFolder.Name = "RadarRoom"
roomFolder.Parent = workspace
local function mkPart(parent, size, cf, color, material, solid)
local p = Instance.new("Part")
p.Size = size
p.CFrame = cf
p.Color = color
p.Material = material or Enum.Material.SmoothPlastic
p.Anchored = true
p.CanCollide = solid == true
p.CanQuery = solid == true
p.CanTouch = false
p.CastShadow = solid == true
p.Parent = parent
return p
end
local function mkCyl(parent, length, diameter, cf, color, material, solid)
local p = mkPart(parent, Vector3.new(length, diameter, diameter), cf, color, material, solid)
p.Shape = Enum.PartType.Cylinder
return p
end
local function mkLabel(adornee, w, h, offsetY, maxDist)
local bb = Instance.new("BillboardGui")
bb.Size = UDim2.fromOffset(w, h)
bb.StudsOffset = Vector3.new(0, offsetY, 0)
bb.AlwaysOnTop = true
bb.LightInfluence = 0
bb.MaxDistance = maxDist or 1500
bb.Adornee = adornee
bb.Parent = adornee
local tl = Instance.new("TextLabel")
tl.Size = UDim2.fromScale(1, 1)
tl.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
tl.BackgroundTransparency = 0.3
tl.TextColor3 = Color3.new(1, 1, 1)
tl.Font = Enum.Font.SourceSansBold
tl.TextSize = 14
tl.TextWrapped = true
tl.Text = ""
tl.Parent = bb
Instance.new("UICorner", tl)
return tl
end
local rayP = RaycastParams.new()
rayP.FilterType = Enum.RaycastFilterType.Exclude
local function groundAt(x, z, refY)
local list = {funnelFolder, rainFolder, boltFolder, toolsFolder, roomFolder}
if Player.Character then list[#list + 1] = Player.Character end
rayP.FilterDescendantsInstances = list
local r = workspace:Raycast(Vector3.new(x, refY + 80, z), Vector3.new(0, -400, 0), rayP)
return r and r.Position or Vector3.new(x, refY - 3, z)
end
local function spotInFront(dist, sideOff)
local char = Player.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
local base, look
if root then
base = root.Position
look = Vector3.new(root.CFrame.LookVector.X, 0, root.CFrame.LookVector.Z)
else
local cam = workspace.CurrentCamera
base = cam and cam.CFrame.Position or Vector3.zero
look = cam and Vector3.new(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) or Vector3.new(0, 0, -1)
end
if look.Magnitude < 0.05 then look = Vector3.new(0, 0, -1) end
look = look.Unit
local right = Vector3.new(-look.Z, 0, look.X)
local p = base + look * dist + right * (sideOff or 0)
return groundAt(p.X, p.Z, base.Y), look
end
local probes = {}
local probeCounter = 0
local MAX_PROBES = 12
local function buildProbe(pos, yaw)
local model = Instance.new("Model")
model.Name = "TornadoProbe"
model.Parent = toolsFolder
local B = CFrame.new(pos) * CFrame.Angles(0, yaw, 0)
local ORANGE = Color3.fromRGB(255, 170, 0)
local BLACK = Color3.fromRGB(15, 15, 15)
local LGREY = Color3.fromRGB(208, 208, 208)
local MGREY = Color3.fromRGB(165, 165, 165)
local METAL = Enum.Material.Metal
for i = 0, 4 do
local w = 16 - i * 2.9
mkPart(model, Vector3.new(w, 0.7, w), B * CFrame.new(0, 0.35 + i * 0.7, 0), ORANGE, Enum.Material.SmoothPlastic, true)
end
mkPart(model, Vector3.new(0.6, 9, 0.6), B * CFrame.new(0, 8, 0), BLACK, METAL, true)
mkPart(model, Vector3.new(4.6, 0.5, 0.5), B * CFrame.new(-2.3, 12.2, 0), BLACK, METAL, true)
mkPart(model, Vector3.new(0.5, 2.4, 0.5), B * CFrame.new(-4.6, 13.4, 0), BLACK, METAL, true)
mkPart(model, Vector3.new(0.4, 0.9, 0.4), B * CFrame.new(0, 12.95, 0), BLACK, METAL, true)
mkCyl(model, 2.4, 3.2, B * CFrame.new(-5.5, 15.6, 0), LGREY, METAL, true)
mkCyl(model, 2.2, 2.2, B * CFrame.new(-3.3, 15.6, 0), LGREY, METAL, true)
mkCyl(model, 1.6, 1.5, B * CFrame.new(-1.5, 15.6, 0), MGREY, METAL, true)
mkCyl(model, 1.0, 3.0, B * CFrame.new(-0.7, 15.6, 0), BLACK, METAL, true)
mkCyl(model, 0.6, 4.4, B * CFrame.new(0.1, 15.6, 0), BLACK, METAL, true)
mkPart(model, Vector3.new(5.1, 0.5, 0.5), B * CFrame.new(2.55, 6.8, 0), BLACK, METAL, true)
mkPart(model, Vector3.new(0.5, 2.9, 0.5), B * CFrame.new(5.1, 8.25, 0), BLACK, METAL, true)
local widths = {5.2, 5.9, 5.6, 4.8, 3.6}
for i, w in ipairs(widths) do
local y = 10.25 + (i - 1) * 1.1
mkCyl(model, 1.1, w, B * CFrame.new(5.1, y, 0) * CFrame.Angles(0, 0, RAD90),
(i % 2 == 0) and LGREY or MGREY, Enum.Material.SmoothPlastic, true)
end
local anchor = mkPart(model, Vector3.new(1, 1, 1), B * CFrame.new(0, 20, 0), BLACK, nil, false)
anchor.Transparency = 1
local label = mkLabel(anchor, 150, 62, 0, 900)
probeCounter += 1
local pr = {
id = probeCounter, pos = pos, model = model, label = label,
maxWind = 0, minP = 1013, marker = nil,
}
probes[#probes + 1] = pr
return pr
end
local function clearProbes()
for _, pr in ipairs(probes) do
if pr.model then pr.model:Destroy() end
if pr.marker then pr.marker.part:Destroy() end
end
probes = {}
end
local function deployProbe()
if RADAR.active then return end
if #probes >= MAX_PROBES then
local old = table.remove(probes, 1)
if old.model then old.model:Destroy() end
if old.marker then old.marker.part:Destroy() end
end
local pos = spotInFront(26, 0)
buildProbe(pos, math.random() * math.pi * 2)
end
local function probeReadings(pos)
local rx, rz = pos.X - liveStormPos.X, pos.Z - liveStormPos.Z
local d = math.sqrt(rx * rx + rz * rz)
local widthScale = 0.4 + 0.6 * descendProgress
local Rc = math.max(columnRadius() * widthScale * 0.5, 60)
local amb = 6 + 20 * supercellProgress + math.noise(timeElapsed * 0.4, pos.X * 0.01) * 10
local vort, dp = 0, 0
if contact > 0 then
local peak = currentWindSpeedMPH * contact
vort = (d < Rc) and peak * (d / Rc) or peak * (Rc / d) ^ 1.1
dp = contact * (currentWindSpeedMPH / 318) * 95 * math.exp(-(d / (Rc * 2.5)) ^ 2)
end
return math.max(amb + vort, 0), 1006 - 4 * supercellProgress - dp, d, Rc
end
local function windColor(w)
if w < 40 then return Color3.fromRGB(120, 255, 150)
elseif w < 80 then return Color3.fromRGB(255, 240, 90)
elseif w < 130 then return Color3.fromRGB(255, 160, 40)
end
return Color3.fromRGB(255, 70, 70)
end
local function updateProbes()
for _, pr in ipairs(probes) do
local wind, press, dist, Rc = probeReadings(pr.pos)
pr.wind, pr.press = wind, press
if wind > pr.maxWind then pr.maxWind = wind end
if press < pr.minP then pr.minP = press end
local extra = ""
if contact > 0.5 and dist < Rc then extra = "\n** INTERCEPTED **" end
pr.label.Text = string.format("PROBE %d\n%d MPH %d mb\nMAX %d MPH MIN %d mb%s",
pr.id, math.floor(wind), math.floor(press), math.floor(pr.maxWind), math.floor(pr.minP), extra)
pr.label.TextColor3 = windColor(wind)
local lines = (extra ~= "") and 4 or 3
pr.label.Parent.Size = UDim2.fromOffset(170, 20 + lines * 15)
end
end
local stations = {}
local stationCounter = 0
local enterRadar
local function buildStation(pos)
stationCounter += 1
local name = "RADAR " .. stationCounter
local model = Instance.new("Model")
model.Name = "RadarStation"
model.Parent = toolsFolder
local WHITE = Color3.fromRGB(235, 238, 242)
local GREY = Color3.fromRGB(120, 125, 132)
local CONC = Color3.fromRGB(150, 150, 150)
local B = CFrame.new(pos)
local slab = mkPart(model, Vector3.new(16, 1, 16), B * CFrame.new(0, 0.5, 0), CONC, Enum.Material.Concrete, true)
mkCyl(model, 30, 4, B * CFrame.new(0, 16, 0) * CFrame.Angles(0, 0, RAD90), WHITE, Enum.Material.SmoothPlastic, true)
mkPart(model, Vector3.new(5, 3, 5), B * CFrame.new(0, 32.5, 0), GREY, Enum.Material.Metal, true)
mkPart(model, Vector3.new(1.2, 5, 1.2), B * CFrame.new(0, 36.5, 0), GREY, Enum.Material.Metal, false)
local disc = mkCyl(model, 0.8, 14, B * CFrame.new(0, 40.5, 0), WHITE, Enum.Material.SmoothPlastic, false)
local horn = mkPart(model, Vector3.new(5, 0.8, 0.8), B * CFrame.new(3.4, 40.5, 0), GREY, Enum.Material.Metal, false)
local tip = mkPart(model, Vector3.new(1, 2, 2), B * CFrame.new(6.2, 40.5, 0), GREY, Enum.Material.Metal, false)
local beacon = mkPart(model, Vector3.new(1.4, 1.4, 1.4), B * CFrame.new(0, 34.7, 0), Color3.fromRGB(255, 40, 40), Enum.Material.Neon, false)
local lab = mkLabel(slab, 110, 26, 14, 700)
lab.Text = name
local prompt = Instance.new("ProximityPrompt")
prompt.ActionText = "OPEN RADAR"
prompt.ObjectText = name
prompt.HoldDuration = 0
prompt.MaxActivationDistance = 18
prompt.RequiresLineOfSight = false
prompt.Parent = slab
local st = {
name = name, pos = pos, model = model,
disc = disc, horn = horn, tip = tip, beacon = beacon,
ang = math.random() * 6,
}
prompt.Triggered:Connect(function()
if enterRadar then enterRadar(st) end
end)
stations[#stations + 1] = st
return st
end
local function deployRadar()
if RADAR.active then return nil end
local pos = spotInFront(40, 0)
return buildStation(pos)
end
local function nearestStation()
local ref = RADAR.active and RADAR.realCamPos or getFocusPosition()
local best, bd
for _, st in ipairs(stations) do
local d = (st.pos - ref).Magnitude
if not bd or d < bd then best, bd = st, d end
end
return best
end
local K = SUPERCELL_SCALE
local fwdV = SUPERCELL_HEADING
local sideV = Vector3.new(-fwdV.Z, 0, fwdV.X)
local tU, tV = tOffF / K, tOffS / K
local hook = {}
for i = 0, 14 do
local t = i / 14
local th = t * 4.6
local r = 950 - 520 * t
hook[#hook + 1] = {math.cos(th) * r, math.sin(th) * r}
end
local function stormDBZ(wx, wz)
local t = timeElapsed
local rx, rz = wx - liveStormPos.X, wz - liveStormPos.Z
local du = (rx * fwdV.X + rz * fwdV.Z) / K
local dv = (rx * sideV.X + rz * sideV.Z) / K
local u, v = du + tU, dv + tV
local g = math.clamp(supercellProgress, 0, 1)
local n1 = math.noise(wx * 0.0006, wz * 0.0006, t * 0.04)
local n2 = math.noise(wx * 0.0025 + 40, wz * 0.0025 + 40, t * 0.1)
local d1 = math.sqrt(((u - 1700) / 1500) ^ 2 + (v / 1300) ^ 2)
local dbz = 68 - 40 * d1 ^ 1.3 + n2 * 10
local d2 = math.sqrt(((u - 3600) / 3300) ^ 2 + ((v - 500) / 1100) ^ 2)
dbz = math.max(dbz, 46 - 34 * d2 ^ 1.2 + n2 * 9)
local d3 = math.sqrt(((u + 200) / 2600) ^ 2 + ((v + 900) / 1300) ^ 2)
dbz = math.max(dbz, 40 - 36 * d3 ^ 1.2 + n2 * 8)
local dc = math.sqrt((u - 1500) ^ 2 + v ^ 2) / 9000
dbz = math.max(dbz, 24 - 28 * dc + n1 * 28)
dbz = dbz - (1 - g ^ 0.7) * 60
local hookAmt = math.clamp((supercellProgress - 0.6) / 0.4, 0, 1)
if hookAmt > 0 then
local dh = math.huge
for _, h in ipairs(hook) do
local a, b = du - h[1], dv - h[2]
local dd = a * a + b * b
if dd < dh then dh = dd end
end
dh = math.sqrt(dh)
dbz = math.max(dbz, 60 * hookAmt * math.exp(-(dh / 230) ^ 2) - 4 + n2 * 4)
end
if contact > 0.2 then
local dtor = math.sqrt(du * du + dv * dv) * K
dbz = math.max(dbz, 78 * contact * math.exp(-(dtor / 1000) ^ 2))
end
return dbz
end
local function dbzToIdx(d)
if d < 5 then return 0 end
return math.min(15, math.floor((d - 5) / 5) + 1)
end
local room = {ready = false, cells = {}, byAngle = {}}
local curStation = nil
local sweepAng = 0
local sweepLine, tvs, tvsLabel, stationMarkLabel
local function setCell(c, idx)
if idx == c.bucket then return end
c.bucket = idx
local p = c.p
if idx == 0 then
p.Transparency = 1
return
end
local h = 0.25 + idx * 0.4
p.Color = PALETTE[idx]
p.Size = Vector3.new(CELL * 0.96, h, CELL * 0.96)
p.CFrame = CFrame.new(ROOM.X + c.lx, TOP + h / 2, ROOM.Z + c.lz)
p.Transparency = (idx <= 3) and 0.4 or 0
end
local function refreshCell(c, st)
local wx = st.pos.X + c.lx * SCALE
local wz = st.pos.Z + c.lz * SCALE
setCell(c, dbzToIdx(stormDBZ(wx, wz)))
end
local function fullRefresh(st)
for _, c in ipairs(room.cells) do refreshCell(c, st) end
end
local function refreshBucket(b, st)
local list = room.byAngle[b]
if not list then return end
for _, ci in ipairs(list) do refreshCell(room.cells[ci], st) end
end
local function buildOverlay(plate)
local sg = Instance.new("SurfaceGui")
sg.Face = Enum.NormalId.Top
sg.CanvasSize = Vector2.new(720, 720)
sg.LightInfluence = 0
sg.Parent = plate
local function line(x1, y1, x2, y2, color, thick, transp)
local f = Instance.new("Frame")
local dx, dy = x2 - x1, y2 - y1
f.AnchorPoint = Vector2.new(0.5, 0.5)
f.Position = UDim2.fromOffset((x1 + x2) / 2, (y1 + y2) / 2)
f.Size = UDim2.fromOffset(math.sqrt(dx * dx + dy * dy), thick)
f.Rotation = math.deg(math.atan2(dy, dx))
f.BackgroundColor3 = color
f.BackgroundTransparency = transp or 0
f.BorderSizePixel = 0
f.Parent = sg
end
for i = 1, 3 do
local ring = Instance.new("Frame")
local s = 720 * i / 3
ring.AnchorPoint = Vector2.new(0.5, 0.5)
ring.Position = UDim2.fromOffset(360, 360)
ring.Size = UDim2.fromOffset(s, s)
ring.BackgroundTransparency = 1
ring.Parent = sg
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0.5, 0)
corner.Parent = ring
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(235, 235, 235)
stroke.Thickness = 2
stroke.Transparency = 0.35
stroke.Parent = ring
local tl = Instance.new("TextLabel")
tl.AnchorPoint = Vector2.new(0.5, 0)
tl.Position = UDim2.fromOffset(360, 360 - s / 2 + 2)
tl.Size = UDim2.fromOffset(120, 22)
tl.BackgroundTransparency = 1
tl.TextColor3 = Color3.fromRGB(235, 235, 235)
tl.TextTransparency = 0.2
tl.Font = Enum.Font.SourceSansBold
tl.TextSize = 18
tl.Text = string.format("%dK", math.floor(RADAR.Range * i / 3 / 1000))
tl.Parent = sg
end
line(360, 0, 360, 720, Color3.fromRGB(235, 235, 235), 1.5, 0.55)
line(0, 360, 720, 360, Color3.fromRGB(235, 235, 235), 1.5, 0.55)
local rx, ry = 0, 120 + math.random() * 480
for _ = 1, 9 do
local nx = rx + 90 + math.random() * 30
local ny = math.clamp(ry + (math.random() - 0.5) * 140, 20, 700)
line(rx, ry, nx, ny, Color3.fromRGB(0, 230, 255), 3, 0.1)
rx, ry = nx, ny
end
for _ = 1, 4 do
local x1, y1 = math.random() * 720, math.random() * 720
local ang = math.random() * math.pi
for _ = 1, 3 do
local len = 90 + math.random() * 120
local x2, y2 = x1 + math.cos(ang) * len, y1 + math.sin(ang) * len
line(x1, y1, x2, y2, Color3.fromRGB(245, 245, 245), 2, 0.1)
x1, y1 = x2, y2
ang += (math.random() - 0.5) * 1.4
end
end
end
local function buildRoom()
local plate = mkPart(roomFolder, Vector3.new(PLATE, 4, PLATE), CFrame.new(ROOM), Color3.fromRGB(62, 135, 55), Enum.Material.Grass, false)
plate.Name = "RadarPlate"
local BLACK = Color3.fromRGB(12, 12, 12)
local wallY = ROOM.Y - 2 + (WALL_H + 4) / 2
mkPart(roomFolder, Vector3.new(PLATE + 16, WALL_H + 4, 8), CFrame.new(ROOM.X, wallY, ROOM.Z - HALF - 4), BLACK)
mkPart(roomFolder, Vector3.new(PLATE + 16, WALL_H + 4, 8), CFrame.new(ROOM.X, wallY, ROOM.Z + HALF + 4), BLACK)
mkPart(roomFolder, Vector3.new(8, WALL_H + 4, PLATE + 16), CFrame.new(ROOM.X - HALF - 4, wallY, ROOM.Z), BLACK)
mkPart(roomFolder, Vector3.new(8, WALL_H + 4, PLATE + 16), CFrame.new(ROOM.X + HALF + 4, wallY, ROOM.Z), BLACK)
buildOverlay(plate)
sweepLine = mkPart(roomFolder, Vector3.new(0.5, 0.5, HALF), CFrame.new(ROOM.X, TOP + 8, ROOM.Z), Color3.fromRGB(255, 255, 255), Enum.Material.Neon, false)
sweepLine.Transparency = 0.25
local mk = mkPart(roomFolder, Vector3.new(3, 6, 3), CFrame.new(ROOM.X, TOP + 3, ROOM.Z), Color3.fromRGB(240, 240, 240), Enum.Material.SmoothPlastic, false)
stationMarkLabel = mkLabel(mk, 90, 22, 5, 2500)
stationMarkLabel.Text = "RADAR"
tvs = mkPart(roomFolder, Vector3.new(1.6, 10, 1.6), CFrame.new(ROOM.X, TOP + 5, ROOM.Z), Color3.fromRGB(248, 0, 253), Enum.Material.Neon, false)
tvs.Transparency = 1
tvsLabel = mkLabel(tvs, 150, 24, 7, 2500)
tvsLabel.Text = ""
local count = 0
for iz = 1, GRID do
for ix = 1, GRID do
local lx = (ix - 0.5) * CELL - HALF
local lz = (iz - 0.5) * CELL - HALF
if lx * lx + lz * lz <= HALF * HALF then
local p = Instance.new("Part")
p.Name = "Echo"
p.Size = Vector3.new(CELL * 0.96, 0.2, CELL * 0.96)
p.CFrame = CFrame.new(ROOM.X + lx, TOP + 0.1, ROOM.Z + lz)
p.Material = Enum.Material.SmoothPlastic
p.Anchored = true
p.CanCollide, p.CanQuery, p.CanTouch, p.CastShadow = false, false, false, false
p.Transparency = 1
p.Parent = roomFolder
room.cells[#room.cells + 1] = {p = p, lx = lx, lz = lz, bucket = 0}
local a = math.deg(math.atan2(lz, lx)) % 360
local b = math.floor(a / ANG_STEP) + 1
room.byAngle[b] = room.byAngle[b] or {}
table.insert(room.byAngle[b], #room.cells)
count += 1
if count % 120 == 0 then task.wait() end
end
end
end
room.ready = true
end
local ui = Instance.new("ScreenGui")
ui.Name = "RadarUI"
ui.ResetOnSpawn = false
ui.DisplayOrder = 10
ui.Enabled = false
ui.Parent = Player.PlayerGui
local held = {}
local function mkBtn(text, anchor, pos, size, color, name)
local b = Instance.new("TextButton")
b.AnchorPoint = anchor
b.Position = pos
b.Size = size
b.BackgroundColor3 = color
b.BackgroundTransparency = 0.15
b.TextColor3 = Color3.new(1, 1, 1)
b.Font = Enum.Font.SourceSansBold
b.TextSize = 18
b.Text = text
b.AutoButtonColor = true
b.Parent = ui
Instance.new("UICorner", b)
if name then
b.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then
held[name] = true
end
end)
b.InputEnded:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then
held[name] = false
end
end)
end
return b
end
local infoLabel = Instance.new("TextLabel")
infoLabel.AnchorPoint = Vector2.new(0.5, 0)
infoLabel.Position = UDim2.new(0.5, 0, 0, 6)
infoLabel.Size = UDim2.new(1, -16, 0, 34)
infoLabel.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
infoLabel.BackgroundTransparency = 0.25
infoLabel.TextColor3 = Color3.fromRGB(0, 255, 150)
infoLabel.Font = Enum.Font.SourceSansBold
infoLabel.TextSize = 14
infoLabel.TextWrapped = true
infoLabel.Text = "RADAR"
infoLabel.Parent = ui
Instance.new("UICorner", infoLabel)
local legend = Instance.new("Frame")
legend.AnchorPoint = Vector2.new(0.5, 0)
legend.Position = UDim2.new(0.5, 0, 0, 46)
legend.Size = UDim2.fromOffset(255, 14)
legend.BackgroundTransparency = 1
legend.Parent = ui
for i = 1, 15 do
local f = Instance.new("Frame")
f.Position = UDim2.new((i - 1) / 15, 0, 0, 0)
f.Size = UDim2.new(1 / 15, 0, 1, 0)
f.BackgroundColor3 = PALETTE[i]
f.BorderSizePixel = 0
f.Parent = legend
end
local legendText = Instance.new("TextLabel")
legendText.AnchorPoint = Vector2.new(0.5, 0)
legendText.Position = UDim2.new(0.5, 0, 0, 61)
legendText.Size = UDim2.fromOffset(255, 14)
legendText.BackgroundTransparency = 1
legendText.TextColor3 = Color3.new(1, 1, 1)
legendText.TextStrokeTransparency = 0.4
legendText.Font = Enum.Font.SourceSansBold
legendText.TextSize = 12
legendText.Text = "5 dBZ 75"
legendText.Parent = ui
local BL, BR = Vector2.new(0, 1), Vector2.new(1, 1)
local SQ = UDim2.fromOffset(44, 44)
local GREYB, BLUEB = Color3.fromRGB(40, 40, 40), Color3.fromRGB(30, 80, 150)
mkBtn("▲", BL, UDim2.new(0, 52, 1, -96), SQ, GREYB, "up")
mkBtn("◀", BL, UDim2.new(0, 6, 1, -52), SQ, GREYB, "left")
mkBtn("▶", BL, UDim2.new(0, 98, 1, -52), SQ, GREYB, "right")
mkBtn("▼", BL, UDim2.new(0, 52, 1, -8), SQ, GREYB, "down")
mkBtn("+", BR, UDim2.new(1, -8, 1, -96), SQ, BLUEB, "zin")
mkBtn("-", BR, UDim2.new(1, -8, 1, -52), SQ, BLUEB, "zout")
local topBtn = mkBtn("TOP", BR, UDim2.new(1, -8, 1, -140), SQ, BLUEB, nil)
local exitBtn = mkBtn("EXIT RADAR", Vector2.new(0.5, 1), UDim2.new(0.5, 0, 1, -8), UDim2.fromOffset(120, 38), Color3.fromRGB(190, 40, 40), nil)
topBtn.TextSize = 13
exitBtn.TextSize = 14
local cam3 = {yaw = 0, pitch = math.rad(52), dist = 330, focus = Vector3.new(ROOM.X, TOP + 1, ROOM.Z)}
local saved = {}
local touches = {}
local mouseDown = false
local function setControls(enabled)
pcall(function()
local ps = Player:FindFirstChild("PlayerScripts")
local pm = ps and ps:FindFirstChild("PlayerModule")
if pm then
local controls = require(pm):GetControls()
if enabled then controls:Enable() else controls:Disable() end
end
end)
end
local function rotateCam(dx, dy)
cam3.yaw -= dx * 0.006
cam3.pitch = math.clamp(cam3.pitch + dy * 0.005, 0.12, 1.5)
end
local function zoomCam(mul)
cam3.dist = math.clamp(cam3.dist * mul, 30, 900)
end
local function stepCamera(dt)
local cam = workspace.CurrentCamera
if not cam then return end
dt = math.min(dt, 0.1)
local f = Vector3.new(-math.sin(cam3.yaw), 0, -math.cos(cam3.yaw))
local r = Vector3.new(math.cos(cam3.yaw), 0, -math.sin(cam3.yaw))
local mv = Vector3.zero
if held.up or UserInputService:IsKeyDown(Enum.KeyCode.W) then mv += f end
if held.down or UserInputService:IsKeyDown(Enum.KeyCode.S) then mv -= f end
if held.right or UserInputService:IsKeyDown(Enum.KeyCode.D) then mv += r end
if held.left or UserInputService:IsKeyDown(Enum.KeyCode.A) then mv -= r end
local fast = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) and 2 or 1
if mv.Magnitude > 0 then
cam3.focus += mv.Unit * cam3.dist * 0.7 * fast * dt
end
if UserInputService:IsKeyDown(Enum.KeyCode.E) then cam3.focus += Vector3.new(0, 70 * dt, 0) end
if UserInputService:IsKeyDown(Enum.KeyCode.Q) then cam3.focus -= Vector3.new(0, 70 * dt, 0) end
if held.zin then zoomCam(1 - 1.2 * dt) end
if held.zout then zoomCam(1 + 1.2 * dt) end
cam3.focus = Vector3.new(
math.clamp(cam3.focus.X, ROOM.X - HALF, ROOM.X + HALF),
math.clamp(cam3.focus.Y, TOP, TOP + WALL_H * 1.5),
math.clamp(cam3.focus.Z, ROOM.Z - HALF, ROOM.Z + HALF)
)
local cp = math.cos(cam3.pitch)
local pos = cam3.focus + Vector3.new(math.sin(cam3.yaw) * cp, math.sin(cam3.pitch), math.cos(cam3.yaw) * cp) * cam3.dist
cam.CFrame = CFrame.lookAt(pos, cam3.focus)
end
local function exitRadar()
if not RADAR.active then return end
RADAR.active = false
pcall(function() RunService:UnbindFromRenderStep("RadarCamera") end)
local cam = workspace.CurrentCamera
if cam then
cam.CameraType = saved.camType or Enum.CameraType.Custom
if saved.camCF then cam.CFrame = saved.camCF end
end
setControls(true)
ui.Enabled = false
if saved.gui then saved.gui.Enabled = true end
for k in pairs(held) do held[k] = false end
touches = {}
mouseDown = false
curStation = nil
end
function enterRadar(st)
if RADAR.active or not st then return end
if not room.ready then
warn("[radar] the radar room is still building, try again in a moment")
return
end
local cam = workspace.CurrentCamera
if not cam then return end
RADAR.realCamPos = cam.CFrame.Position
saved.camCF, saved.camType = cam.CFrame, cam.CameraType
RADAR.active = true
curStation = st
cam.CameraType = Enum.CameraType.Scriptable
setControls(false)
saved.gui = Player.PlayerGui:FindFirstChild("TornadoControls")
if saved.gui then saved.gui.Enabled = false end
ui.Enabled = true
cam3.yaw, cam3.pitch, cam3.dist = 0, math.rad(52), 330
cam3.focus = Vector3.new(ROOM.X, TOP + 1, ROOM.Z)
stationMarkLabel.Text = st.name
sweepAng = 0
fullRefresh(st)
RunService:BindToRenderStep("RadarCamera", Enum.RenderPriority.Camera.Value + 2, stepCamera)
end
exitBtn.MouseButton1Click:Connect(exitRadar)
topBtn.MouseButton1Click:Connect(function()
cam3.pitch = 1.5
cam3.yaw = 0
cam3.dist = 380
cam3.focus = Vector3.new(ROOM.X, TOP + 1, ROOM.Z)
end)
UserInputService.InputBegan:Connect(function(input, gp)
if not RADAR.active or gp then return end
local t = input.UserInputType
if t == Enum.UserInputType.Touch then
touches[input] = Vector2.new(input.Position.X, input.Position.Y)
elseif t == Enum.UserInputType.MouseButton1 or t == Enum.UserInputType.MouseButton2 then
mouseDown = true
end
end)
UserInputService.InputChanged:Connect(function(input, gp)
if not RADAR.active then return end
local t = input.UserInputType
if t == Enum.UserInputType.Touch then
local last = touches[input]
if not last then return end
local cur = Vector2.new(input.Position.X, input.Position.Y)
local n = 0
local other
for tin, p in pairs(touches) do
n += 1
if tin ~= input then other = p end
end
if n == 1 then
rotateCam(cur.X - last.X, cur.Y - last.Y)
elseif other then
local prevD = (last - other).Magnitude
local curD = (cur - other).Magnitude
if prevD > 8 and curD > 8 then zoomCam(prevD / curD) end
end
touches[input] = cur
elseif t == Enum.UserInputType.MouseMovement then
if mouseDown then rotateCam(input.Delta.X, input.Delta.Y) end
elseif t == Enum.UserInputType.MouseWheel then
zoomCam(1 - input.Position.Z * 0.12)
end
end)
UserInputService.InputEnded:Connect(function(input)
local t = input.UserInputType
if t == Enum.UserInputType.Touch then
touches[input] = nil
for k in pairs(held) do held[k] = false end
elseif t == Enum.UserInputType.MouseButton1 or t == Enum.UserInputType.MouseButton2 then
mouseDown = false
for k in pairs(held) do held[k] = false end
end
end)
local tick4 = 0
local function toRoom(st, wx, wz)
local lx = (wx - st.pos.X) / SCALE
local lz = (wz - st.pos.Z) / SCALE
if lx * lx + lz * lz > HALF * HALF then return nil end
return Vector3.new(ROOM.X + lx, TOP, ROOM.Z + lz)
end
local function updateRadarMarkers(st)
local tpos = toRoom(st, liveStormPos.X, liveStormPos.Z)
if tpos and descendProgress > 0.02 then
local h = 6 + descendProgress * 6 + contact * currentEF * 3
tvs.Size = Vector3.new(1.6, h, 1.6)
tvs.CFrame = CFrame.new(tpos + Vector3.new(0, h / 2, 0))
tvs.Transparency = 0
if contact >= 0.6 then
tvs.Color = Color3.fromRGB(248, 0, 253)
tvsLabel.Text = string.format("TVS %s %d MPH", EF_SETTINGS[currentEF].Name, math.floor(currentWindSpeedMPH))
else
tvs.Color = Color3.fromRGB(255, 160, 0)
tvsLabel.Text = string.format("FUNNEL ALOFT %d%%", math.floor(descendProgress * 100))
end
else
tvs.Transparency = 1
tvsLabel.Text = ""
end
for _, pr in ipairs(probes) do
local mpos = toRoom(st, pr.pos.X, pr.pos.Z)
if not pr.marker then
local part = mkPart(roomFolder, Vector3.new(2.2, 2.2, 2.2), CFrame.new(ROOM), Color3.fromRGB(255, 170, 0), Enum.Material.SmoothPlastic, false)
part.Transparency = 1
pr.marker = {part = part, label = mkLabel(part, 110, 36, 3, 2500)}
end
if mpos then
pr.marker.part.CFrame = CFrame.new(mpos + Vector3.new(0, 1.4, 0))
pr.marker.part.Transparency = 0
pr.marker.label.Text = string.format("PROBE %d\n%d MPH", pr.id, math.floor(pr.wind or 0))
pr.marker.label.TextColor3 = windColor(pr.wind or 0)
pr.marker.label.Parent.Enabled = true
else
pr.marker.part.Transparency = 1
pr.marker.label.Parent.Enabled = false
end
end
end
local function infoText(st)
local dx, dz = liveStormPos.X - st.pos.X, liveStormPos.Z - st.pos.Z
local dist = math.sqrt(dx * dx + dz * dz) / 1000
if contact >= 0.6 then
return string.format("%s | TORNADO ON GROUND | %s %d MPH | %.1fK studs away",
st.name, EF_SETTINGS[currentEF].Name, math.floor(currentWindSpeedMPH), dist)
elseif descendProgress > 0.02 then
return string.format("%s | FUNNEL DESCENDING %d%% | %.1fK studs away", st.name, math.floor(descendProgress * 100), dist)
elseif phase == "waiting" then
return string.format("%s | SUPERCELL READY - WATCH THE HOOK | %.1fK studs away", st.name, dist)
end
return string.format("%s | SUPERCELL FORMING %d%%", st.name, math.floor(supercellProgress * 100))
end
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
local clk = os.clock()
for _, st in ipairs(stations) do
st.ang += dt * 1.7
local R = CFrame.new(st.pos) * CFrame.Angles(0, st.ang, 0)
st.disc.CFrame = R * CFrame.new(0, 40.5, 0)
st.horn.CFrame = R * CFrame.new(3.4, 40.5, 0)
st.tip.CFrame = R * CFrame.new(6.2, 40.5, 0)
st.beacon.Transparency = (clk % 1.4 < 0.2) and 0 or 0.85
end
tick4 += dt
local doTick = tick4 >= 0.25
if doTick then
tick4 = 0
updateProbes()
end
if not RADAR.active or not curStation or not room.ready then return end
local st = curStation
local newAng = sweepAng + RADAR.ScanSpeed * dt
local b0 = math.floor(sweepAng / ANG_STEP)
local b1 = math.floor(newAng / ANG_STEP)
for b = b0 + 1, b1 do
refreshBucket((b % ANG_BUCKETS) + 1, st)
end
sweepAng = newAng % 360
local ar = math.rad(sweepAng)
local dir = Vector3.new(math.cos(ar), 0, math.sin(ar))
local c0 = Vector3.new(ROOM.X, TOP + 8, ROOM.Z)
sweepLine.CFrame = CFrame.lookAt(c0 + dir * (HALF / 2), c0 + dir * HALF)
if doTick then
updateRadarMarkers(st)
infoLabel.Text = infoText(st)
end
end)
TOOLS.deployProbe = deployProbe
TOOLS.clearProbes = clearProbes
TOOLS.deployRadar = deployRadar
TOOLS.openRadar = function()
if RADAR.active then return end
local st = nearestStation() or deployRadar()
if st then enterRadar(st) end
end
task.spawn(buildRoom)
task.spawn(function()
local char = Player.Character or Player.CharacterAdded:Wait()
char:WaitForChild("HumanoidRootPart", 10)
task.wait(1)
local rp = spotInFront(45, 12)
buildStation(rp)
local pp = spotInFront(30, -14)
buildProbe(pp, math.random() * math.pi * 2)
end)
end
task.spawn(initProbesAndRadar)
-- [[ SIRENS SYSTEM ]] --
local function initSirens()
local folder = Instance.new("Folder")
folder.Name = "TornadoSirens"
folder.Parent = workspace
local RAD90 = math.rad(90)
local sirens = {}
local playing = false
local started = false
local autoDone = false
local function smooth(x)
x = math.clamp(x, 0, 1)
return x * x * (3 - 2 * x)
end
local function mk(size, cf, color, material, solid, isCyl)
local p = Instance.new("Part")
p.Size = size
p.CFrame = cf
p.Color = color
p.Material = material or Enum.Material.SmoothPlastic
p.Anchored = true
p.CanCollide = solid == true
p.CanQuery = solid == true
p.CanTouch = false
p.CastShadow = solid == true
if isCyl then p.Shape = Enum.PartType.Cylinder end
p.Parent = folder
return p
end
local rayP = RaycastParams.new()
rayP.FilterType = Enum.RaycastFilterType.Exclude
local function groundAt(x, z)
local list = {funnelFolder, rainFolder, boltFolder, folder}
if Player.Character then list[#list + 1] = Player.Character end
rayP.FilterDescendantsInstances = list
local r = workspace:Raycast(Vector3.new(x, groundY + 400, z), Vector3.new(0, -1200, 0), rayP)
return r and r.Position or Vector3.new(x, groundY, z)
end
local function finish(s)
if not s.active then return end
s.active = false
s.snd.Volume = 0
s.rv.WetLevel = -80
s.rv.DryLevel = 0
end
local function buildSiren(pos)
local B = CFrame.new(pos)
local GREY = Color3.fromRGB(150, 152, 158)
local WHITE = Color3.fromRGB(235, 235, 235)
local ORANGE = Color3.fromRGB(255, 140, 0)
mk(Vector3.new(6, 1, 6), B * CFrame.new(0, 0.5, 0), Color3.fromRGB(140, 140, 140), Enum.Material.Concrete, true)
mk(Vector3.new(38, 2, 2), B * CFrame.new(0, 20, 0) * CFrame.Angles(0, 0, RAD90), GREY, Enum.Material.Metal, true, true)
local hub = mk(Vector3.new(2.4, 3.4, 3.4), B * CFrame.new(0, 40, 0) * CFrame.Angles(0, 0, RAD90), GREY, Enum.Material.Metal, false, true)
local beacon = mk(Vector3.new(1.3, 1.3, 1.3), B * CFrame.new(0, 42.4, 0), Color3.fromRGB(255, 40, 40), Enum.Material.Neon, false)
local horns = {}
for i = 0, 3 do
local off = i * math.pi / 2
local horn = mk(Vector3.new(5, 3, 3), B * CFrame.Angles(0, off, 0) * CFrame.new(3.6, 40, 0), WHITE, Enum.Material.SmoothPlastic, false, true)
local bell = mk(Vector3.new(1.2, 4.6, 4.6), B * CFrame.Angles(0, off, 0) * CFrame.new(6.3, 40, 0), ORANGE, Enum.Material.SmoothPlastic, false, true)
horns[#horns + 1] = {horn = horn, bell = bell, off = off}
end
local snd = Instance.new("Sound")
snd.Name = "SirenSound"
snd.SoundId = SIREN.SoundId
snd.Looped = false
snd.Volume = 0
snd.RollOffMinDistance = SIREN.RollOffMin
snd.RollOffMaxDistance = SIREN.RollOffMax
local rv = Instance.new("ReverbSoundEffect")
rv.DecayTime = SIREN.ReverbDecay
rv.Density = 1
rv.Diffusion = 1
rv.DryLevel = 0
rv.WetLevel = -80
rv.Parent = snd
snd.Parent = hub
local s = {pos = pos, hub = hub, beacon = beacon, horns = horns, snd = snd, rv = rv, ang = math.random() * 6, active = false, t0 = 0}
snd.Ended:Connect(function() finish(s) end)
sirens[#sirens + 1] = s
task.spawn(function()
pcall(function() game:GetService("ContentProvider"):PreloadAsync({snd}) end)
end)
return s
end
local function startSiren()
if playing then return end
playing = true
started = false
task.spawn(function()
local t0 = os.clock()
for _, s in ipairs(sirens) do
while not s.snd.IsLoaded and os.clock() - t0 < 10 do task.wait(0.1) end
end
if #sirens == 0 or not sirens[1].snd.IsLoaded then
warn("[siren] the siren audio did not load")
playing = false
return
end
for _, s in ipairs(sirens) do
s.snd.Volume = 0
s.snd.TimePosition = 0
s.rv.WetLevel = -80
s.rv.DryLevel = 0
s.active = true
s.t0 = os.clock()
s.snd:Play()
end
started = true
end)
end
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
if SIREN.AutoOnDescend and not autoDone and (phase == "descending" or phase == "active") then
autoDone = true
startSiren()
end
local clk = os.clock()
local anyActive = false
for _, s in ipairs(sirens) do
local env = 0
if s.active then
local snd = s.snd
if not snd.Playing and clk - s.t0 > 1.5 then
finish(s)
elseif snd.TimeLength > 0 then
local len, pos = snd.TimeLength, snd.TimePosition
local fi = math.min(SIREN.FadeIn, len * 0.4)
local fo = math.min(SIREN.FadeOut, len * 0.4)
local fadeInK = smooth(pos / fi)
local fadeOutK = smooth((len - pos) / fo)
env = fadeInK * fadeOutK
snd.Volume = SIREN.Volume * env
local f = smooth(1 - (len - pos) / fo)
s.rv.WetLevel = -60 + 63 * f
s.rv.DryLevel = -10 * f
anyActive = true
end
end
if env > 0.001 then
s.ang += dt * 3.2 * env
local R = CFrame.new(s.pos) * CFrame.Angles(0, s.ang, 0)
for _, h in ipairs(s.horns) do
local rot = R * CFrame.Angles(0, h.off, 0)
h.horn.CFrame = rot * CFrame.new(3.6, 40, 0)
h.bell.CFrame = rot * CFrame.new(6.3, 40, 0)
end
end
s.beacon.Transparency = (s.active and clk % 0.6 < 0.3) and 0 or 0.85
end
if playing and started and not anyActive then
playing = false
end
end)
TOOLS.siren = startSiren
task.spawn(function()
task.wait(1)
local center = getFocusPosition()
for i = 1, SIREN.Count do
local a = (i / SIREN.Count) * math.pi * 2 + (math.random() - 0.5) * 0.6
local d = SIREN.MinDist + math.random() * (SIREN.MaxDist - SIREN.MinDist)
buildSiren(groundAt(center.X + math.cos(a) * d, center.Z + math.sin(a) * d))
end
end)
end
task.spawn(initSirens)
-- ====================================================================
-- [[ DISASTER PACK: house-part suction, walking NPCs, crashable cars ]]
-- No other edits needed. It builds everything itself.
-- ====================================================================
task.spawn(function()
-- Define necessary services to fix the nil index error
local RunService = game:GetService("RunService")
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local CAR_ID = "rbxassetid://15030483102"
local PACK = {
-- house parts (named 1-5) after the tornado breaks them loose
WindScale = 1.0, -- mph -> studs/sec target speed of the wind field
DragBase = 0.5, -- how hard wind grabs parts (thin parts get grabbed harder)
LiftFrac = {[0] = 0.0, [1] = 0.15, [2] = 0.35, [3] = 0.6, [4] = 0.85, [5] = 1.05},
MaxParts = 600,
ReleaseDist = 5, -- x column radius, parts farther than this are let go
StepEvery = 0.06,
TossEvery = {[2] = {3, 7}, [3] = {2, 5}, [4] = {1.2, 3.5}, [5] = {0.8, 2.5}},
TossAccel = {[2] = 90, [3] = 170, [4] = 260, [5] = 380},
TossTime = 0.45,
EjectAfter = {[2] = {16, 32}, [3] = {11, 22}, [4] = {8, 16}, [5] = {6, 12}},
EjectAccel = 520,
EjectTime = 0.8,
Cooldown = 12,
SpinCap = 12,
-- cars
Cars = 5,
CarMin = 70,
CarMax = 260,
CrashDV = 45, -- sudden speed change (studs/s in one frame) that counts as a crash
-- npcs
Npcs = 10,
NpcMin = 30,
NpcMax = 220,
HitSpeed = 45, -- relative speed that knocks an NPC down
KillSpeed = 95, -- relative speed that kills an NPC
DeathSpeed = 100, -- landing speed that kills a thrown NPC
}
local packFolder = Instance.new("Folder")
packFolder.Name = "DisasterPack"
packFolder.Parent = workspace
local groundRay = RaycastParams.new()
groundRay.FilterType = Enum.RaycastFilterType.Exclude
local function groundAt(x, z)
local list = {funnelFolder, packFolder}
if Player.Character then list[#list + 1] = Player.Character end
groundRay.FilterDescendantsInstances = list
local top = getFocusPosition().Y + 400
local r = workspace:Raycast(Vector3.new(x, top, z), Vector3.new(0, -2000, 0), groundRay)
return r and r.Position or Vector3.new(x, groundY, z)
end
-- ================================================================
-- WIND FIELD (studs/sec): spin + inflow + updraft, scaled by live mph
-- ================================================================
local function fieldCore()
return math.max(columnRadius() * (0.4 + 0.6 * descendProgress) * 0.8, 60)
end
local function fieldAt(pos, center, peakMph, core)
local rx, rz = pos.X - center.X, pos.Z - center.Z
local dist = math.max(math.sqrt(rx * rx + rz * rz), 1)
local rdx, rdz = rx / dist, rz / dist
local vt = (dist < core) and (dist / core) or (core / dist) ^ 0.75
local h01 = math.clamp((pos.Y - center.Y) / sm.Height, 0, 1)
local upK = math.clamp(1 - dist / (core * 1.7), 0, 1) ^ 0.7
local v = Vector3.new(-rdz, 0, rdx) * (vt * peakMph)
+ Vector3.new(-rdx, 0, -rdz) * (vt * peakMph * 0.45)
+ Vector3.new(0, upK * peakMph * 0.7 * (1 - 0.5 * h01), 0)
return v * PACK.WindScale
end
local function centerAt(pos)
local h01 = math.clamp((pos.Y - liveStormPos.Y) / sm.Height, 0, 1)
local bx, bz = bendAt(h01)
return Vector3.new(liveStormPos.X + bx, liveStormPos.Y, liveStormPos.Z + bz)
end
-- ================================================================
-- EF HOUSE PARTS: VectorForce drag toward the wind, lift, tosses, ejection
-- ================================================================
local efParts, efCount = {}, 0
local function dropEF(p, st)
efParts[p] = nil
efCount -= 1
if st.vf then st.vf:Destroy() end
if st.att then st.att:Destroy() end
end
local function adopt(p)
if efCount >= PACK.MaxParts or efParts[p] then return end
p.Anchored = false
for _, j in ipairs(p:GetJoints()) do
pcall(function() j:Destroy() end)
end
local att = Instance.new("Attachment")
att.Name = "TornadoAtt"
att.Parent = p
local vf = Instance.new("VectorForce")
vf.Name = "TornadoForce" -- same name the main script checks, so it won't add a second force
vf.Attachment0 = att
vf.RelativeTo = Enum.ActuatorRelativeTo.World
vf.ApplyAtCenterOfMass = true
vf.Force = Vector3.zero
vf.Parent = p
local s = p.Size
local thick = math.max(math.min(s.X, s.Y, s.Z), 0.4)
local k = math.clamp(PACK.DragBase * 4 / thick, 0.25, 5)
p.CastShadow = false
efParts[p] = {
vf = vf, att = att, k = k,
light = math.clamp(k / 2, 0.3, 1.25),
nextToss = timeElapsed + 0.5 + math.random() * 2,
}
efCount += 1
end
-- take house parts away from the main script's weak generic debris force
local function takeover()
if efCount >= PACK.MaxParts then return end
for p, st in pairs(debrisTracked) do
if tonumber(p.Name) then
debrisTracked[p] = nil
debrisCount -= 1
if st.vf then st.vf:Destroy() end
if st.att and st.att.Parent then st.att:Destroy() end
if p.Parent then adopt(p) end
end
end
end
local function stepEF()
if efCount == 0 then return end
local now = timeElapsed
local ef = currentEF
local g = workspace.Gravity
local peak = currentWindSpeedMPH * contact
local liftBase = PACK.LiftFrac[ef] or 0
local maxDist = columnRadius() * PACK.ReleaseDist
local core = fieldCore()
local tossCfg, tossAccel = PACK.TossEvery[ef], PACK.TossAccel[ef]
local ejectCfg = PACK.EjectAfter[ef]
for p, st in pairs(efParts) do
local vf = st.vf
if not p.Parent or not vf.Parent or p.Anchored or p.Position.Y < -2000 then
dropEF(p, st)
continue
end
local pos = p.Position
local center = centerAt(pos)
local dx, dz = pos.X - center.X, pos.Z - center.Z
local dist = math.sqrt(dx * dx + dz * dz)
if dist > maxDist then
dropEF(p, st)
continue
end
if st.coolUntil then
if now < st.coolUntil then
vf.Force = Vector3.zero
continue
end
st.coolUntil = nil
end
local mass = p.AssemblyMass
if mass <= 0 then continue end
local rad = dist > 0.5 and Vector3.new(dx / dist, 0, dz / dist) or Vector3.new(1, 0, 0)
local tan = Vector3.new(-rad.Z, 0, rad.X)
local accel
if st.ejectEnd and now < st.ejectEnd then
-- violent ejection out of the vortex
accel = st.ejectVec + Vector3.new(0, g * 0.6, 0)
elseif st.ejectEnd then
-- ejection over: let it fly free for a while
st.ejectEnd, st.ejectAt = nil, nil
st.coolUntil = now + PACK.Cooldown
vf.Force = Vector3.zero
continue
else
local vel = p.AssemblyLinearVelocity
local target = fieldAt(pos, center, peak, core)
accel = (target - vel) * st.k + Vector3.new(0, g * liftBase * st.light, 0)
if tossCfg and now >= st.nextToss then
st.nextToss = now + tossCfg[1] + math.random() * (tossCfg[2] - tossCfg[1])
st.tossEnd = now + PACK.TossTime
local d = Vector3.new(rad.X * 0.5 + (math.random() - 0.5), 0.5 + math.random() * 0.8, rad.Z * 0.5 + (math.random() - 0.5)) + tan * 0.4
st.tossVec = d.Unit * tossAccel * (0.6 + math.random() * 0.8)
p.AssemblyAngularVelocity += Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5) * 10
end
if st.tossEnd and now < st.tossEnd and st.tossVec then
accel += st.tossVec
end
if ejectCfg then
if not st.ejectAt then
st.ejectAt = now + ejectCfg[1] + math.random() * (ejectCfg[2] - ejectCfg[1])
elseif now >= st.ejectAt then
st.ejectEnd = now + PACK.EjectTime
local d = rad * 0.8 + tan * 0.7 + Vector3.new(0, 0.5 + math.random() * 0.4, 0)
st.ejectVec = d.Unit * PACK.EjectAccel * (0.7 + math.random() * 0.6)
end
end
end
if accel.Magnitude > 900 then accel = accel.Unit * 900 end
vf.Force = accel * mass
local av = p.AssemblyAngularVelocity
if av.Magnitude > PACK.SpinCap then
p.AssemblyAngularVelocity = av.Unit * PACK.SpinCap
end
end
end
-- ================================================================
-- CRASHABLE CARS (rig 15030483102)
-- ================================================================
local cars = {}
local carTemplate
local function getCarTemplate()
if carTemplate then return carTemplate end
local obj = loadAsset(CAR_ID)
if not obj then return nil end
local model
if obj:IsA("Model") then
model = obj
else
model = Instance.new("Model")
if obj:IsA("BasePart") then
obj.Parent = model
else
for _, ch in ipairs(obj:GetChildren()) do ch.Parent = model end
obj:Destroy()
end
end
carTemplate = model
return model
end
local function spawnCar()
local tpl = getCarTemplate()
if not tpl then
warn("[cars] could not load car rig " .. CAR_ID)
return
end
local model = tpl:Clone()
model.Name = "CrashableCar"
local seat, biggest, bigV = nil, nil, 0
for _, d in ipairs(model:GetDescendants()) do
if d:IsA("LuaSourceContainer") then
d:Destroy()
elseif d:IsA("BasePart") then
d.Anchored = false
if tonumber(d.Name) then d.Name = "Car" .. d.Name end
carCache[d] = true
if d:IsA("VehicleSeat") then seat = d end
local v = d.Size.X * d.Size.Y * d.Size.Z
if v > bigV then biggest, bigV = d, v end
end
end
local main = model.PrimaryPart or seat or biggest
if not main then
model:Destroy()
return
end
local center = getFocusPosition()
local a = math.random() * math.pi * 2
local dist = PACK.CarMin + math.random() * (PACK.CarMax - PACK.CarMin)
local gp = groundAt(center.X + math.cos(a) * dist, center.Z + math.sin(a) * dist)
model.Parent = packFolder
model:PivotTo(CFrame.new(gp + Vector3.new(0, 40, 0)) * CFrame.Angles(0, math.random() * math.pi * 2, 0))
local bb, size = model:GetBoundingBox()
local bottom = bb.Position.Y - size.Y / 2
model:PivotTo(model:GetPivot() + Vector3.new(0, gp.Y + 0.6 - bottom, 0))
cars[#cars + 1] = {model = model, main = main, prevV = Vector3.zero, cd = timeElapsed + 2.5, damage = 0}
end
local function crashCar(c, dv)
c.cd = timeElapsed + 0.6
local power = math.clamp(dv / 90, 0.25, 2.5)
c.damage += power
local main = c.main
local snd = Instance.new("Sound")
snd.SoundId = CRASH_SOUND_ID
snd.Volume = math.clamp(0.5 + power * 0.9, 0.5, 3)
snd.PlaybackSpeed = 0.55 + math.random() * 0.25
snd.RollOffMaxDistance = 1800
snd.Parent = main
snd:Play()
Debris:AddItem(snd, 5)
local sparks = Instance.new("ParticleEmitter")
sparks.Texture = "rbxasset://textures/particles/sparkles_main.dds"
sparks.Rate = 0
sparks.Lifetime = NumberRange.new(0.3, 0.8)
sparks.Speed = NumberRange.new(25, 70)
sparks.SpreadAngle = Vector2.new(180, 180)
sparks.Acceleration = Vector3.new(0, -80, 0)
sparks.Size = NumberSequence.new(1.4, 0)
sparks.LightEmission = 1
sparks.Color = ColorSequence.new(Color3.fromRGB(255, 190, 80))
sparks.Parent = main
sparks:Emit(math.floor(12 + power * 16))
Debris:AddItem(sparks, 3)
local want = math.floor(power * 1.5 + math.random())
if want > 0 then
local cand = {}
local lim = main.Size.Magnitude * 0.9
for _, p in ipairs(c.model:GetDescendants()) do
if p:IsA("BasePart") and p ~= main and not p:IsA("VehicleSeat")
and not p:GetAttribute("Loose") and p.Size.Magnitude < lim then
cand[#cand + 1] = p
end
end
for _ = 1, math.min(want, #cand) do
local p = table.remove(cand, math.random(#cand))
p:SetAttribute("Loose", true)
for _, j in ipairs(p:GetJoints()) do
pcall(function() j:Destroy() end)
end
local dir = Vector3.new(math.random() - 0.5, 0.4 + math.random() * 0.6, math.random() - 0.5).Unit
p:ApplyImpulse(dir * p.AssemblyMass * (25 + 35 * power))
end
end
if c.damage > 2.5 and not c.smoke then
local smoke = Instance.new("ParticleEmitter")
smoke.Texture = "rbxasset://textures/particles/smoke_main.dds"
smoke.Rate = 18
smoke.Lifetime = NumberRange.new(2, 3.5)
smoke.Speed = NumberRange.new(4, 9)
smoke.Acceleration = Vector3.new(0, 6, 0)
smoke.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 12)})
smoke.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5), NumberSequenceKeypoint.new(1, 1)})
smoke.Color = ColorSequence.new(Color3.fromRGB(40, 40, 40))
smoke.Rotation = NumberRange.new(0, 360)
smoke.Parent = main
c.smoke = smoke
end
if c.damage > 6 and not c.fire then
local fire = Instance.new("Fire")
fire.Size = 9
fire.Heat = 6
fire.Parent = main
c.fire = fire
end
end
local function stepCars()
for i = #cars, 1, -1 do
local c = cars[i]
if not c.model.Parent or not c.main.Parent then
table.remove(cars, i)
else
local v = c.main.AssemblyLinearVelocity
local dv = (v - c.prevV).Magnitude
c.prevV = v
if timeElapsed >= c.cd and dv > PACK.CrashDV then
crashCar(c, dv)
end
end
end
end
-- ================================================================
-- NPCs: hand-built R6 rigs, procedural walk, flee, get sucked + thrown
-- ================================================================
local npcs = {}
local hitNPC, killNPC, knockNPC
local SKIN = {
Color3.fromRGB(255, 204, 153), Color3.fromRGB(234, 184, 146), Color3.fromRGB(198, 134, 66),
Color3.fromRGB(124, 92, 70), Color3.fromRGB(255, 224, 189),
}
local CLOTH = {
Color3.fromRGB(196, 40, 28), Color3.fromRGB(13, 105, 172), Color3.fromRGB(75, 151, 75),
Color3.fromRGB(245, 205, 48), Color3.fromRGB(98, 37, 209), Color3.fromRGB(40, 40, 40),
Color3.fromRGB(218, 133, 65), Color3.fromRGB(235, 235, 235),
}
local C = CFrame.new
local rootC = C(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
local neckC0 = C(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
local neckC1 = C(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
local rsC0 = C(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local rsC1 = C(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local lsC0 = C(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
local lsC1 = C(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
local rhC0 = C(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local rhC1 = C(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local lhC0 = C(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
local lhC1 = C(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
local function mkPart(parent, name, size, color)
local p = Instance.new("Part")
p.Name = name
p.Size = size
p.Color = color
p.Material = Enum.Material.SmoothPlastic
p.TopSurface = Enum.SurfaceType.Smooth
p.BottomSurface = Enum.SurfaceType.Smooth
p.Parent = parent
return p
end
local function mkJoint(name, p0, p1, c0, c1)
local m = Instance.new("Motor6D")
m.Name = name
m.Part0, m.Part1 = p0, p1
m.C0, m.C1 = c0, c1
m.Parent = p0
return m
end
local npcRay = RaycastParams.new()
npcRay.FilterType = Enum.RaycastFilterType.Exclude
local function releaseNPCForce(n)
if n.vf then n.vf:Destroy() n.vf = nil end
if n.att then n.att:Destroy() n.att = nil end
end
local function standUp(n)
releaseNPCForce(n)
local hrp = n.hrp
local _, yaw = hrp.CFrame:ToEulerAnglesYXZ()
hrp.AssemblyLinearVelocity = Vector3.zero
hrp.AssemblyAngularVelocity = Vector3.zero
hrp.CFrame = CFrame.new(hrp.Position + Vector3.new(0, 2.5, 0)) * CFrame.Angles(0, yaw, 0)
n.hum.PlatformStand = false
n.hum:ChangeState(Enum.HumanoidStateType.GettingUp)
n.hum.WalkSpeed = n.walkSpeed
n.mode = "walk"
n.nextWander = 0
end
function killNPC(n)
if n.mode == "dead" then return end
n.mode = "dead"
releaseNPCForce(n)
for _, d in ipairs(n.model:GetDescendants()) do
if d:IsA("Motor6D") then d:Destroy() end
end
n.hum.Health = 0
Debris:AddItem(n.model, 25)
end
function knockNPC(n, other)
n.mode = "down"
n.downUntil = timeElapsed + 2.5
n.hum.PlatformStand = true
local away = n.hrp.Position - other.Position
away = Vector3.new(away.X, 0, away.Z)
away = (away.Magnitude > 0.1) and away.Unit or Vector3.new(1, 0, 0)
local m = n.hrp.AssemblyMass
n.hrp:ApplyImpulse(away * m * 40 + Vector3.new(0, m * 25, 0))
end
function hitNPC(n, other)
if n.mode == "dead" or timeElapsed < n.hitCD then return end
if other.Anchored or other:IsDescendantOf(n.model) then return end
local rel = (other.AssemblyLinearVelocity - n.hrp.AssemblyLinearVelocity).Magnitude
if rel < PACK.HitSpeed or other.AssemblyMass < 1.5 then return end
n.hitCD = timeElapsed + 0.5
if rel > PACK.KillSpeed then
killNPC(n)
elseif n.mode == "walk" then
knockNPC(n, other)
end
end
local function buildNPC(pos)
local model = Instance.new("Model")
model.Name = "TornadoNPC"
local skin = SKIN[math.random(#SKIN)]
local shirt = CLOTH[math.random(#CLOTH)]
local pants = CLOTH[math.random(#CLOTH)]
local base = CFrame.new(pos + Vector3.new(0, 3.05, 0)) * CFrame.Angles(0, math.random() * math.pi * 2, 0)
local hrp = mkPart(model, "HumanoidRootPart", Vector3.new(2, 2, 1), skin)
hrp.Transparency = 1
hrp.CanCollide = false
local torso = mkPart(model, "Torso", Vector3.new(2, 2, 1), shirt)
local head = mkPart(model, "Head", Vector3.new(2, 1, 1), skin)
local rArm = mkPart(model, "Right Arm", Vector3.new(1, 2, 1), skin)
local lArm = mkPart(model, "Left Arm", Vector3.new(1, 2, 1), skin)
local rLeg = mkPart(model, "Right Leg", Vector3.new(1, 2, 1), pants)
local lLeg = mkPart(model, "Left Leg", Vector3.new(1, 2, 1), pants)
hrp.CFrame = base
torso.CFrame = base
head.CFrame = base * CFrame.new(0, 1.5, 0)
rArm.CFrame = base * CFrame.new(1.5, 0, 0)
lArm.CFrame = base * CFrame.new(-1.5, 0, 0)
rLeg.CFrame = base * CFrame.new(0.5, -2, 0)
lLeg.CFrame = base * CFrame.new(-0.5, -2, 0)
local mesh = Instance.new("SpecialMesh")
mesh.MeshType = Enum.MeshType.Head
mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
mesh.Parent = head
local face = Instance.new("Decal")
face.Name = "face"
face.Texture = "rbxasset://textures/face.png"
face.Face = Enum.NormalId.Front
face.Parent = head
mkJoint("RootJoint", hrp, torso, rootC, rootC)
mkJoint("Neck", torso, head, neckC0, neckC1)
local rs = mkJoint("Right Shoulder", torso, rArm, rsC0, rsC1)
local ls = mkJoint("Left Shoulder", torso, lArm, lsC0, lsC1)
local rh = mkJoint("Right Hip", torso, rLeg, rhC0, rhC1)
local lh = mkJoint("Left Hip", torso, lLeg, lhC0, lhC1)
local ws = 8 + math.random() * 6
local hum = Instance.new("Humanoid")
hum.RigType = Enum.HumanoidRigType.R6
hum.HipHeight = 0
hum.WalkSpeed = ws
hum.BreakJointsOnDeath = false
hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
hum.Parent = model
model.PrimaryPart = hrp
model.Parent = packFolder
local n = {
model = model, hrp = hrp, hum = hum, rs = rs, ls = ls, rh = rh, lh = lh,
mode = "walk", phase = math.random() * 6, walkSpeed = ws, home = pos,
nextThink = 0, nextWander = 0, cool = 0, hitCD = 0, lastSp = 0,
lastPos = pos, lastCheck = timeElapsed, fleeSide = (math.random() < 0.5) and 1 or -1,
}
npcs[#npcs + 1] = n
local function onHit(o) hitNPC(n, o) end
torso.Touched:Connect(onHit)
head.Touched:Connect(onHit)
return n
end
local function spawnNPC()
local center = getFocusPosition()
local a = math.random() * math.pi * 2
local d = PACK.NpcMin + math.random() * (PACK.NpcMax - PACK.NpcMin)
buildNPC(groundAt(center.X + math.cos(a) * d, center.Z + math.sin(a) * d))
end
local function startSuck(n, now)
releaseNPCForce(n)
n.mode = "sucked"
n.t0 = now
n.dur = 7 + math.random() * 6
n.hum.PlatformStand = true
local att = Instance.new("Attachment")
att.Name = "TornadoAtt"
att.Parent = n.hrp
local vf = Instance.new("VectorForce")
vf.Name = "TornadoForce"
vf.Attachment0 = att
vf.RelativeTo = Enum.ActuatorRelativeTo.World
vf.ApplyAtCenterOfMass = true
vf.Force = Vector3.zero
vf.Parent = n.hrp
n.att, n.vf = att, vf
end
local function thinkNPC(n, now, dist, dx, dz, colR)
local hrp, hum = n.hrp, n.hum
local pos = hrp.Position
if descendProgress > 0.25 and dist < colR * 3.2 then
hum.WalkSpeed = 24
local away = Vector3.new(dx, 0, dz)
away = (away.Magnitude > 1) and away.Unit or Vector3.new(1, 0, 0)
local side = Vector3.new(-away.Z, 0, away.X) * n.fleeSide
hum:MoveTo(pos + (away + side * 0.6).Unit * 90)
n.fleeing = true
return
end
if n.fleeing then
n.fleeing = false
hum.WalkSpeed = n.walkSpeed
n.nextWander = 0
end
if now >= n.nextWander then
if math.random() < 0.3 then
hum:MoveTo(pos)
n.nextWander = now + 2 + math.random() * 4
else
local a = math.random() * math.pi * 2
local d = 20 + math.random() * 60
local tx, tz = pos.X + math.cos(a) * d, pos.Z + math.sin(a) * d
local hx, hz = n.home.X - pos.X, n.home.Z - pos.Z
if hx * hx + hz * hz > 300 * 300 then
tx = n.home.X + (math.random() - 0.5) * 80
tz = n.home.Z + (math.random() - 0.5) * 80
end
hum:MoveTo(Vector3.new(tx, pos.Y, tz))
n.nextWander = now + 4 + math.random() * 6
end
end
if now - n.lastCheck >= 1 then
if hum.MoveDirection.Magnitude > 0.1 and (pos - n.lastPos).Magnitude < 1.2 then
hum.Jump = true
n.nextWander = 0
end
n.lastPos, n.lastCheck = pos, now
end
end
local function animateNPC(n, dt, now)
local sw
if n.mode == "walk" then
local v = n.hrp.AssemblyLinearVelocity
local sp = math.sqrt(v.X * v.X + v.Z * v.Z)
n.phase += dt * sp * 0.6
sw = math.sin(n.phase) * math.clamp(sp / 10, 0, 1) * 0.9
else
sw = math.sin(now * 9 + n.phase) * 1.3
end
n.rs.C0 = rsC0 * CFrame.Angles(0, 0, -sw)
n.ls.C0 = lsC0 * CFrame.Angles(0, 0, -sw)
n.rh.C0 = rhC0 * CFrame.Angles(0, 0, sw)
n.lh.C0 = lhC0 * CFrame.Angles(0, 0, sw)
end
local function stepNPCs(dt)
if #npcs == 0 then return end
local now = timeElapsed
local g = workspace.Gravity
local colR = columnRadius()
local groundR = colR * (0.4 + 0.6 * descendProgress)
local core = fieldCore()
local peak = currentWindSpeedMPH * contact
local liftBase = PACK.LiftFrac[currentEF] or 0
for i = #npcs, 1, -1 do
local n = npcs[i]
local hrp = n.hrp
if not n.model.Parent then
table.remove(npcs, i)
elseif n.mode ~= "dead" then
local pos = hrp.Position
local dx, dz = pos.X - liveStormPos.X, pos.Z - liveStormPos.Z
local dist = math.sqrt(dx * dx + dz * dz)
if n.mode == "walk" or n.mode == "down" then
if contact >= 0.6 and now >= n.cool and dist < groundR * 1.3 and pos.Y - liveStormPos.Y < 300 then
startSuck(n, now)
elseif n.mode == "down" then
if now >= n.downUntil then standUp(n) end
elseif now >= n.nextThink then
n.nextThink = now + 0.4
thinkNPC(n, now, dist, dx, dz, colR)
end
end
if n.mode == "sucked" then
local center = centerAt(pos)
local h01 = math.clamp((pos.Y - center.Y) / sm.Height, 0, 1)
local target = fieldAt(pos, center, peak, core)
local vel = hrp.AssemblyLinearVelocity
local up = (h01 < 0.7) and math.max(liftBase, 0.85) or 0.2
local accel = (target - vel) * 1.4 + Vector3.new(0, g * up, 0)
if accel.Magnitude > 700 then accel = accel.Unit * 700 end
n.vf.Force = accel * hrp.AssemblyMass
hrp.AssemblyAngularVelocity = Vector3.new(
math.sin(now * 1.7 + n.phase) * 2.5, math.sin(now * 1.1) * 3.5, math.cos(now * 1.3 + n.phase) * 2.5)
if now - n.t0 >= n.dur then
local rx, rz = pos.X - center.X, pos.Z - center.Z
local d = math.max(math.sqrt(rx * rx + rz * rz), 1)
local rad = Vector3.new(rx / d, 0, rz / d)
local tan = Vector3.new(-rad.Z, 0, rad.X)
releaseNPCForce(n)
hrp.AssemblyLinearVelocity = rad * 260 + tan * 200 + Vector3.new(0, 150, 0)
n.mode = "thrown"
n.t1 = now
n.cool = now + 25
n.lastSp = 0
end
elseif n.mode == "thrown" then
local sp = hrp.AssemblyLinearVelocity.Magnitude
local landed = false
if now - n.t1 > 0.7 then
npcRay.FilterDescendantsInstances = {n.model, funnelFolder}
local hit = workspace:Raycast(hrp.Position, Vector3.new(0, -5, 0), npcRay)
if hit and hrp.AssemblyLinearVelocity.Y < 10 then landed = true end
if now - n.t1 > 25 then landed = true end
end
if landed then
if n.lastSp > PACK.DeathSpeed then killNPC(n) else standUp(n) end
end
n.lastSp = sp
end
if n.mode ~= "dead" then animateNPC(n, dt, now) end
end
end
end
-- ================================================================
-- GUI buttons (added to the existing scrolling control panel)
-- ================================================================
local function clearAll()
for i = #cars, 1, -1 do
cars[i].model:Destroy()
table.remove(cars, i)
end
for i = #npcs, 1, -1 do
npcs[i].model:Destroy()
table.remove(npcs, i)
end
end
local function addButtons()
local sg = Player.PlayerGui:FindFirstChild("TornadoControls")
local scroll = sg and sg:FindFirstChildWhichIsA("ScrollingFrame", true)
if not scroll then return end
local function btn(text, color, order, fn)
local b = Instance.new("TextButton")
b.LayoutOrder = order
b.Size = UDim2.new(1, -6, 0, 20)
b.BackgroundColor3 = color
b.Text = text
b.TextColor3 = Color3.new(1, 1, 1)
b.Font = Enum.Font.SourceSansBold
b.TextSize = 11
b.Parent = scroll
Instance.new("UICorner", b)
b.MouseButton1Click:Connect(fn)
end
btn("SPAWN CARS", Color3.fromRGB(60, 100, 160), 100, function()
task.spawn(function() for _ = 1, 3 do spawnCar() end end)
end)
btn("SPAWN NPCS", Color3.fromRGB(60, 140, 90), 101, function()
for _ = 1, 5 do spawnNPC() end
end)
btn("CLEAR CARS/NPCS", Color3.fromRGB(140, 60, 60), 102, clearAll)
end
-- ================================================================
-- MAIN LOOP
-- ================================================================
local acc = 0
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
if next(debrisTracked) then takeover() end
acc += dt
if acc >= PACK.StepEvery then
acc = 0
stepEF()
end
stepCars()
stepNPCs(dt)
end)
addButtons()
task.wait(2)
for _ = 1, PACK.Npcs do spawnNPC() end
for _ = 1, PACK.Cars do spawnCar() end
end)
if timeElapsed - lastHouseStep > 0.1 then
lastHouseStep = timeElapsed
local force = stats.Force * HOUSE_FORCE_MUL
local g = workspace.Gravity
local maxDist2 = (colR * 8) ^ 2
local orbitPos = orbitCube.Position
for p, st in pairs(houseTracked) do
local drop = false
if not p.Parent or not st.vf.Parent or p.Anchored or p.Position.Y < -2000 then
drop = true
else
local pos = p.Position
local dx, dz = pos.X - stormPos.X, pos.Z - stormPos.Z
if dx * dx + dz * dz > maxDist2 then
drop = true
elseif contact < 0.2 then
st.vf.Force = Vector3.zero
else
local spatialVec = calculateSpatialWindVector(pos, stormPos, windSm, contact)
local toOrbit = orbitPos - pos
local pullDir = toOrbit.Magnitude > 0.1 and (toOrbit.Unit * force) or Vector3.zero
local lift = Vector3.zero
if timeElapsed - st.lastLift >= HOUSE_LIFT_EVERY then
st.lastLift = timeElapsed
lift = Vector3.new(0, p:GetMass() * g * HOUSE_LIFT_MUL, 0)
end
st.vf.Force = pullDir + spatialVec * HOUSE_WIND_MUL + lift
local v = p.AssemblyLinearVelocity
if v.Magnitude > HOUSE_MAX_SPEED then
p.AssemblyLinearVelocity = v.Unit * HOUSE_MAX_SPEED
end
end
end
if drop then
houseTracked[p] = nil
houseCount -= 1
if st.vf.Parent then st.vf:Destroy() end
if st.att.Parent then st.att:Destroy() end
end
end
end
-- ====================================================================
-- [[ HIGHER SUPERCELL ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script. No other edits.
--
-- Lifts the whole cell (cloud base, wall cloud, towers, anvil, lightning
-- origin) higher in the sky. The funnel is made taller by the same
-- amount so it still reaches the cloud base.
-- ====================================================================
do
local CELL = {
Raise = 1200, -- studs to lift the cell. 0 = original height. Bigger = higher
}
-- everything in the script reads FIXED_HEIGHT each frame:
-- cloud base = funnel height + CLOUD_BASE_OFFSET, so the whole cell rises with it
FIXED_HEIGHT = FIXED_HEIGHT + CELL.Raise
end
-- ====================================================================
-- [[ TORNADO SIDE SHADING ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script (works with or
-- without the El Reno add-on). No other edits.
--
-- One side of the funnel is lit, the opposite side falls into shadow,
-- so the tornado keeps a visible 3D form and silhouette even against
-- clouds of the same color.
-- ====================================================================
task.spawn(function()
local SHADE = {
Strength = 0.50, -- how dark the shadowed side gets (0 = none, 0.5 = half brightness)
Soften = 0.15, -- keeps the lit/shadow edge soft (0..0.4)
CameraRelative = false, -- true = lit side is always the camera's right side
LightDir = Vector3.new(0.7, 0, -0.7), -- horizontal light direction (toward the light) when CameraRelative is false
UseSun = true, -- use the sun's horizontal direction when it is strong enough
Darken = 1.0, -- overall funnel brightness multiplier
}
local function lightFlat()
if SHADE.CameraRelative then
local cam = workspace.CurrentCamera
if cam then
local r = cam.CFrame.RightVector
local v = Vector3.new(r.X, 0, r.Z)
if v.Magnitude > 0.05 then return v.Unit end
end
end
if SHADE.UseSun then
local s = Lighting:GetSunDirection()
local v = Vector3.new(s.X, 0, s.Z)
if v.Magnitude > 0.35 then return v.Unit end
end
local v = Vector3.new(SHADE.LightDir.X, 0, SHADE.LightDir.Z)
return v.Magnitude > 0.01 and v.Unit or Vector3.new(0.7, 0, -0.7)
end
RunService:BindToRenderStep("TornadoSideShade", Enum.RenderPriority.Last.Value, function()
if funnelHidden then return end
local L = lightFlat()
local lx, lz = L.X, L.Z
local strength, soften, darken = SHADE.Strength, SHADE.Soften, SHADE.Darken
local t = timeElapsed
for _, d in ipairs(funnel) do
-- outward direction of this particle around the funnel
local rad = math.rad(d.ang)
local lit = math.cos(rad) * lx + math.sin(rad) * lz -- 1 = facing the light, -1 = facing away
lit = math.clamp(lit * (1 + soften) , -1, 1)
local f = (1 - strength * (1 - lit) * 0.5) * darken
-- same base shade the main script uses, then the side factor on top
local shade = 0.88 + d.pr * 0.14 + d.shade + math.noise(t * 0.2, d.seed) * 0.06 - currentEF * 0.012 + d.ex * 0.06
local c = tint(math.clamp(shade, 0.7, 1.2))
d.img.ImageColor3 = Color3.new(
math.clamp(c.R * f, 0, 1),
math.clamp(c.G * f, 0, 1),
math.clamp(c.B * f, 0, 1)
)
end
end)
end)
-- ====================================================================
-- [[ PROBE RESTYLE: real cone mesh + propeller anemometer ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script. No other edits.
--
-- It rebuilds every TornadoProbe (the starting one and any you deploy)
-- to match your drawing:
-- * orange REAL cone mesh base
-- * black pole
-- * left arm: anemometer with a propeller at the FRONT. It turns to face
-- into the wind and the propeller spins faster as the wind speeds up
-- * right arm: stack of grey discs
-- The wind/pressure label and radar markers keep working as before.
-- ====================================================================
task.spawn(function()
local AssetService = game:GetService("AssetService")
local PROBE = {
ConeMeshId = "rbxassetid://1033714", -- cone mesh (swap this id if it isn't a cone)
ConeRot = CFrame.Angles(0, 0, 0), -- use CFrame.Angles(math.pi, 0, 0) if the cone is upside down
ConeSize = Vector3.new(16, 4.5, 16),
SpinPerMph = 0.55, -- propeller rad/s per mph of wind
MaxSpin = 40, -- cap so it never looks frozen from frame aliasing
SpinResponse = 2.0, -- how quickly the propeller speeds up / slows down
TurnResponse = 3.0, -- how quickly the anemometer turns into the wind
UpdateRange = 1500, -- probes farther than this from the camera aren't animated
}
local ORANGE = Color3.fromRGB(255, 170, 0)
local BLACK = Color3.fromRGB(15, 15, 15)
local LGREY = Color3.fromRGB(208, 208, 208)
local MGREY = Color3.fromRGB(165, 165, 165)
local RAD90 = math.rad(90)
local TAU = math.pi * 2
local PIVOT = CFrame.new(-5, 14.8, 0) -- anemometer pivot, in probe space
local PROP_X = 3.15 -- propeller position in front of the pivot
-- ================================================================
-- CONE MESH (loaded once, cloned per probe)
-- ================================================================
local coneTemplate
local coneState = "idle"
local function getCone()
if coneState == "loading" then
while coneState == "loading" do task.wait() end
elseif coneState == "idle" then
coneState = "loading"
local ok, mp = pcall(function()
return AssetService:CreateMeshPartAsync(Content.fromUri(PROBE.ConeMeshId))
end)
if not ok or not mp then
ok, mp = pcall(function()
return AssetService:CreateMeshPartAsync(PROBE.ConeMeshId)
end)
end
if ok and mp then coneTemplate = mp end
coneState = "done"
if not coneTemplate then
warn("[probe] cone mesh failed to load, using stacked discs instead")
end
end
return coneTemplate
end
-- ================================================================
-- WIND AT A PROBE (same model the probe label uses)
-- ================================================================
local function windAt(pos)
local rx, rz = pos.X - liveStormPos.X, pos.Z - liveStormPos.Z
local d = math.max(math.sqrt(rx * rx + rz * rz), 1)
local widthScale = 0.4 + 0.6 * descendProgress
local Rc = math.max(columnRadius() * widthScale * 0.5, 60)
local amb = math.max(6 + 20 * supercellProgress + math.noise(timeElapsed * 0.4, pos.X * 0.01) * 10, 0)
local vort = 0
if contact > 0 then
local peak = currentWindSpeedMPH * contact
vort = (d < Rc) and peak * (d / Rc) or peak * (Rc / d) ^ 1.1
end
local gust = math.noise(timeElapsed * 0.2, pos.Z * 0.01) * 0.7
local ambDir = CFrame.Angles(0, gust, 0) * Vector3.new(targetDirection.X, 0, targetDirection.Z)
local radX, radZ = rx / d, rz / d
local tor = Vector3.new(-radZ - radX * 0.45, 0, radX - radZ * 0.45).Unit -- spin + inflow
return ambDir * amb + tor * vort, amb + vort
end
-- ================================================================
-- BUILDING
-- ================================================================
local active = {}
local function mk(model, size, cf, color, mat, solid, cyl)
local p = Instance.new("Part")
p.Name = "ProbePart"
p.Size = size
p.CFrame = cf
p.Color = color
p.Material = mat or Enum.Material.Metal
p.TopSurface = Enum.SurfaceType.Smooth
p.BottomSurface = Enum.SurfaceType.Smooth
p.Anchored = true
p.CanCollide = solid == true
p.CanQuery = solid == true
p.CanTouch = false
p.CastShadow = solid == true
if cyl then p.Shape = Enum.PartType.Cylinder end
p.Parent = model
return p
end
local function findAnchor(model)
for _, p in ipairs(model:GetChildren()) do
if p:IsA("BasePart") and p:FindFirstChildOfClass("BillboardGui") then
return p
end
end
end
local function restyle(model)
if model:GetAttribute("Restyled") then return true end
local anchor = findAnchor(model)
if not anchor then return false end
model:SetAttribute("Restyled", true)
local cone = getCone() -- may yield the first time
if not model.Parent or not anchor.Parent then return true end
-- the original anchor sits at 20 studs above the probe base
local B = anchor.CFrame * CFrame.new(0, -20, 0)
for _, p in ipairs(model:GetChildren()) do
if p ~= anchor then p:Destroy() end
end
anchor.CFrame = B * CFrame.new(0, 21, 0)
-- cone base
local cs = PROBE.ConeSize
if cone then
local c = cone:Clone()
c.Name = "ProbeCone"
c.Size = cs
c.CFrame = B * CFrame.new(0, cs.Y / 2 - 0.1, 0) * PROBE.ConeRot
c.Color = ORANGE
c.Material = Enum.Material.SmoothPlastic
c.Anchored = true
c.CanCollide, c.CanQuery, c.CanTouch = true, true, false
c.CollisionFidelity = Enum.CollisionFidelity.Hull
c.Parent = model
else
for i = 0, 5 do
local w = cs.X - i * (cs.X / 6.2)
mk(model, Vector3.new(w, cs.Y / 6, w), B * CFrame.new(0, cs.Y / 12 + i * cs.Y / 6, 0), ORANGE, Enum.Material.SmoothPlastic, true)
end
end
-- pole
mk(model, Vector3.new(0.6, 9, 0.6), B * CFrame.new(0, 8, 0), BLACK, Enum.Material.Metal, true)
-- right arm: stacked grey discs
mk(model, Vector3.new(5.6, 0.5, 0.5), B * CFrame.new(2.5, 7, 0), BLACK, Enum.Material.Metal, true)
mk(model, Vector3.new(0.5, 2.9, 0.5), B * CFrame.new(5, 8.45, 0), BLACK, Enum.Material.Metal, true)
local widths = {5.2, 5.9, 5.6, 4.8, 3.6}
for i, w in ipairs(widths) do
mk(model, Vector3.new(1.1, w, w), B * CFrame.new(5, 10.25 + (i - 1) * 1.1, 0) * CFrame.Angles(0, 0, RAD90),
(i % 2 == 0) and LGREY or MGREY, Enum.Material.SmoothPlastic, true, true)
end
-- left arm: up to the anemometer pivot
mk(model, Vector3.new(5.6, 0.5, 0.5), B * CFrame.new(-2.5, 12.2, 0), BLACK, Enum.Material.Metal, true)
mk(model, Vector3.new(0.5, 2.6, 0.5), B * CFrame.new(-5, 13.5, 0), BLACK, Enum.Material.Metal, true)
-- anemometer (front = +X in pivot space)
local parts, rigidLocal = {}, {}
local function addRigid(size, lcf, color, mat, cyl)
local p = mk(model, size, B * PIVOT * lcf, color, mat, false, cyl)
parts[#parts + 1] = p
rigidLocal[#parts] = lcf
end
addRigid(Vector3.new(4.0, 1.5, 1.5), CFrame.new(-0.2, 0, 0), LGREY, Enum.Material.Metal, true) -- body
addRigid(Vector3.new(2.6, 2.7, 2.7), CFrame.new(-3.5, 0, 0), LGREY, Enum.Material.Metal, true) -- tail flare
addRigid(Vector3.new(0.9, 1.3, 1.3), CFrame.new(2.25, 0, 0), BLACK, Enum.Material.Metal, true) -- nose
addRigid(Vector3.new(0.5, 0.8, 0.8), CFrame.new(PROP_X, 0, 0), BLACK, Enum.Material.Metal, true) -- hub
addRigid(Vector3.new(2.2, 2.4, 0.2), CFrame.new(-4.2, 1.5, 0), BLACK, Enum.Material.Metal, false) -- tail fin
local rigidCount = #parts
for _ = 1, 3 do
local blade = mk(model, Vector3.new(0.14, 2.4, 1.0), B * PIVOT, BLACK, Enum.Material.Metal, false)
parts[#parts + 1] = blade
end
local cfs = table.create(#parts, CFrame.identity)
active[#active + 1] = {
model = model, B = B, parts = parts, cfs = cfs,
rigidLocal = rigidLocal, rigidCount = rigidCount,
yaw = math.random() * TAU, spin = 0, spinVel = 0,
vec = Vector3.zero, speed = 0, nextWind = 0,
}
return true
end
-- ================================================================
-- ANIMATION: face into the wind, propeller spins with wind speed
-- ================================================================
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
local focus = getFocusPosition()
for i = #active, 1, -1 do
local st = active[i]
if not st.model.Parent then
table.remove(active, i)
elseif (st.B.Position - focus).Magnitude < PROBE.UpdateRange then
st.nextWind -= dt
if st.nextWind <= 0 then
st.nextWind = 0.1
st.vec, st.speed = windAt(st.B.Position + Vector3.new(0, 15, 0))
end
-- turn so the propeller faces into the wind
if st.vec.Magnitude > 0.5 then
local target = math.atan2(st.vec.Z, -st.vec.X)
local diff = (target - st.yaw + math.pi) % TAU - math.pi
st.yaw += diff * (1 - math.exp(-dt * PROBE.TurnResponse))
end
-- propeller speed follows wind speed, with some inertia
local targetSpin = math.min(st.speed * PROBE.SpinPerMph, PROBE.MaxSpin)
st.spinVel += (targetSpin - st.spinVel) * (1 - math.exp(-dt * PROBE.SpinResponse))
st.spin = (st.spin + st.spinVel * dt) % TAU
local P = st.B * PIVOT * CFrame.Angles(0, st.yaw, 0)
for k = 1, st.rigidCount do
st.cfs[k] = P * st.rigidLocal[k]
end
for b = 0, 2 do
st.cfs[st.rigidCount + b + 1] = P
* CFrame.new(PROP_X, 0, 0)
* CFrame.Angles(st.spin + b * TAU / 3, 0, 0)
* CFrame.new(0, 1.5, 0)
* CFrame.Angles(0, math.rad(28), 0) -- blade pitch
end
workspace:BulkMoveTo(st.parts, st.cfs, Enum.BulkMoveMode.FireCFrameChanged)
end
end
end)
-- ================================================================
-- HOOK INTO EVERY PROBE (existing + newly deployed)
-- ================================================================
local tools = workspace:WaitForChild("TornadoTools", 15)
if not tools then
warn("[probe] TornadoTools folder not found")
return
end
local function handle(model)
if not model:IsA("Model") or model.Name ~= "TornadoProbe" then return end
task.spawn(function()
local waited = 0
while model.Parent and not restyle(model) and waited < 3 do
waited += task.wait()
end
end)
end
tools.ChildAdded:Connect(handle)
for _, c in ipairs(tools:GetChildren()) do handle(c) end
end)
-- ====================================================================
-- [[ STORM SHELTERS ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script (after the
-- DISASTER PACK block). Nothing else needs editing.
--
-- * Concrete bunkers with a sliding door (walk up to the doorway -> prompt)
-- * Inside a shelter, EVERY sound outside is muffled: tornado roar, rain,
-- thunder, sirens, crashes, even sounds from the game itself
-- * Door open = partly muffled, door closed = heavily muffled
-- * Your own character's sounds (footsteps etc.) are NOT muffled
-- * The roof also stops the tornado suction (your script's isIndoors check)
-- ====================================================================
task.spawn(function()
local TweenService = game:GetService("TweenService")
local SHELTER = {
Count = 2, -- shelters auto-built around you at start
MinDist = 45,
MaxDist = 110,
Width = 12, -- interior size
Depth = 14,
Height = 9,
Wall = 2,
DoorWidth = 6,
DoorHeight = 7,
DoorSpeed = 2.2, -- door open/close speed
-- muffling (door open -> door closed)
OpenVolume = 0.50, ClosedVolume = 0.12,
OpenHigh = -18, ClosedHigh = -42, -- treble cut (dB)
OpenMid = -6, ClosedMid = -14, -- mid cut (dB)
BoostLow = 3, -- slight low rumble through the walls
Blend = 4, -- how fast the muffle fades in/out
}
local W, D, H, T = SHELTER.Width, SHELTER.Depth, SHELTER.Height, SHELTER.Wall
local DW, DH = SHELTER.DoorWidth, SHELTER.DoorHeight
local OPEN_OFFSET = -(DW + 0.4)
local CONCRETE = Color3.fromRGB(128, 130, 134)
local DARK = Color3.fromRGB(88, 90, 95)
local DOORCOL = Color3.fromRGB(190, 70, 40)
local shelterFolder = Instance.new("Folder")
shelterFolder.Name = "StormShelters"
shelterFolder.Parent = workspace
-- ================================================================
-- SOUND MUFFLING
-- ================================================================
local group = Instance.new("SoundGroup")
group.Name = "OutsideSounds"
group.Volume = 1
group.Parent = SoundService
local eq = Instance.new("EqualizerSoundEffect")
eq.Name = "ShelterMuffle"
eq.HighGain, eq.MidGain, eq.LowGain = 0, 0, 0
eq.Parent = group
local function adopt(d)
if not d:IsA("Sound") then return end
if d.SoundGroup or d:GetAttribute("ShelterIgnore") then return end
if d:IsDescendantOf(shelterFolder) then return end
local m = d:FindFirstAncestorOfClass("Model")
if m and m.Name == Player.Name and m:FindFirstChildOfClass("Humanoid") then return end
d.SoundGroup = group
end
for _, d in ipairs(workspace:GetDescendants()) do adopt(d) end
for _, d in ipairs(SoundService:GetDescendants()) do adopt(d) end
workspace.DescendantAdded:Connect(adopt)
SoundService.DescendantAdded:Connect(adopt)
-- ================================================================
-- BUILDING A SHELTER
-- ================================================================
local shelters = {}
local function mk(s, size, lcf, color, mat)
local p = Instance.new("Part")
p.Name = "Shelter"
p.Anchored = true
p.Size = size
p.CFrame = s.cf * lcf
p.Color = color
p.Material = mat or Enum.Material.Concrete
p.TopSurface = Enum.SurfaceType.Smooth
p.BottomSurface = Enum.SurfaceType.Smooth
p.Parent = s.model
return p
end
local function smooth(x)
return x * x * (3 - 2 * x)
end
local function setDoor(s)
s.door.CFrame = s.cf * s.doorLocal * CFrame.new(OPEN_OFFSET * smooth(s.alpha), 0, 0)
s.door.CanCollide = s.alpha < 0.9
end
local function buildShelter(cf)
local s = {cf = cf, model = Instance.new("Model"), open = true, alpha = 1}
s.model.Name = "StormShelter"
s.model.Parent = shelterFolder
local outerW = W + 2 * T
local wallY = 1 + H / 2
-- thick floor (buried so it sits flush on slopes)
mk(s, Vector3.new(outerW, 6, D + 2 * T), CFrame.new(0, -2, 0), DARK)
-- back + side walls
mk(s, Vector3.new(outerW, H, T), CFrame.new(0, wallY, -(D / 2 + T / 2)), CONCRETE)
mk(s, Vector3.new(T, H, D), CFrame.new(-(W / 2 + T / 2), wallY, 0), CONCRETE)
mk(s, Vector3.new(T, H, D), CFrame.new((W / 2 + T / 2), wallY, 0), CONCRETE)
-- front wall with doorway
local sideW = (outerW - DW) / 2
local fz = D / 2 + T / 2
mk(s, Vector3.new(sideW, H, T), CFrame.new(-(DW / 2 + sideW / 2), wallY, fz), CONCRETE)
mk(s, Vector3.new(sideW, H, T), CFrame.new((DW / 2 + sideW / 2), wallY, fz), CONCRETE)
mk(s, Vector3.new(DW, H - DH, T), CFrame.new(0, 1 + DH + (H - DH) / 2, fz), CONCRETE)
-- roof
local roof = mk(s, Vector3.new(outerW + 2, T, D + 2 * T + 2), CFrame.new(0, 1 + H + T / 2, 0), DARK)
-- sliding door (in front of the doorway, slides sideways along the wall)
s.doorLocal = CFrame.new(0, 1 + DH / 2, D / 2 + T + 0.4)
s.door = mk(s, Vector3.new(DW + 0.6, DH, 0.8), CFrame.new(), DOORCOL, Enum.Material.Metal)
s.door.Name = "ShelterDoor"
setDoor(s)
-- interior: bench + ceiling lamp
mk(s, Vector3.new(W - 4, 1, 2), CFrame.new(0, 1.5, -D / 2 + 1.2), Color3.fromRGB(110, 78, 50), Enum.Material.Wood)
local lamp = mk(s, Vector3.new(4, 0.4, 1.2), CFrame.new(0, 1 + H - 0.2, 0), Color3.fromRGB(255, 230, 170), Enum.Material.Neon)
lamp.CanCollide = false
local light = Instance.new("PointLight")
light.Range, light.Brightness = 28, 1.5
light.Color = Color3.fromRGB(255, 230, 180)
light.Parent = lamp
-- door prompt (fixed part in the doorway so it doesn't slide away)
local pp = mk(s, Vector3.new(1, 1, 1), CFrame.new(0, 3, D / 2 + T / 2), CONCRETE)
pp.Transparency = 1
pp.CanCollide, pp.CanQuery, pp.CanTouch = false, false, false
local prompt = Instance.new("ProximityPrompt")
prompt.ObjectText = "STORM SHELTER"
prompt.ActionText = "CLOSE DOOR"
prompt.HoldDuration = 0
prompt.MaxActivationDistance = 14
prompt.RequiresLineOfSight = false
prompt.Parent = pp
prompt.Triggered:Connect(function()
s.open = not s.open
prompt.ActionText = s.open and "CLOSE DOOR" or "OPEN DOOR"
end)
-- sign
local bb = Instance.new("BillboardGui")
bb.Size = UDim2.fromOffset(130, 24)
bb.StudsOffset = Vector3.new(0, 5, 0)
bb.LightInfluence = 0
bb.MaxDistance = 700
bb.Adornee = roof
bb.Parent = roof
local tl = Instance.new("TextLabel")
tl.Size = UDim2.fromScale(1, 1)
tl.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
tl.BackgroundTransparency = 0.3
tl.TextColor3 = Color3.fromRGB(255, 200, 0)
tl.Font = Enum.Font.SourceSansBold
tl.TextSize = 14
tl.Text = "STORM SHELTER"
tl.Parent = bb
Instance.new("UICorner", tl)
shelters[#shelters + 1] = s
return s
end
-- ================================================================
-- PLACEMENT
-- ================================================================
local ray = RaycastParams.new()
ray.FilterType = Enum.RaycastFilterType.Exclude
local function groundAt(x, z, refY)
local list = {funnelFolder, shelterFolder}
local rf, bf = workspace:FindFirstChild("RainAssets"), workspace:FindFirstChild("LightningAssets")
if rf then list[#list + 1] = rf end
if bf then list[#list + 1] = bf end
if Player.Character then list[#list + 1] = Player.Character end
ray.FilterDescendantsInstances = list
local r = workspace:Raycast(Vector3.new(x, refY + 300, z), Vector3.new(0, -1000, 0), ray)
return r and r.Position or Vector3.new(x, groundY, z)
end
-- doorway (+Z side) faces the center point
local function spawnShelterAt(x, z, center)
local gp = groundAt(x, z, center.Y)
local away = Vector3.new(gp.X - center.X, 0, gp.Z - center.Z)
if away.Magnitude < 0.1 then away = Vector3.new(0, 0, -1) end
return buildShelter(CFrame.lookAt(gp, gp + away))
end
local function spawnInFront()
local center = getFocusPosition()
local char = Player.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
local base = root and root.Position or center
local look
if root then
look = Vector3.new(root.CFrame.LookVector.X, 0, root.CFrame.LookVector.Z)
else
local cam = workspace.CurrentCamera
look = cam and Vector3.new(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) or Vector3.new(0, 0, -1)
end
if look.Magnitude < 0.05 then look = Vector3.new(0, 0, -1) end
local p = base + look.Unit * 45
spawnShelterAt(p.X, p.Z, base)
end
local function clearShelters()
for i = #shelters, 1, -1 do
shelters[i].model:Destroy()
shelters[i] = nil
end
end
-- ================================================================
-- INSIDE CHECK + MUFFLE LOOP
-- ================================================================
local function isInside(s, p)
local l = s.cf:PointToObjectSpace(p)
return math.abs(l.X) < W / 2
and l.Z > -D / 2 and l.Z < D / 2 + T * 0.5
and l.Y > -2 and l.Y < H + 3
end
local inBlend, curClosed = 0, 0
local hud = Instance.new("ScreenGui")
hud.Name = "ShelterHUD"
hud.ResetOnSpawn = false
hud.Parent = Player.PlayerGui
local hudLabel = Instance.new("TextLabel")
hudLabel.AnchorPoint = Vector2.new(0.5, 1)
hudLabel.Position = UDim2.new(0.5, 0, 1, -60)
hudLabel.Size = UDim2.fromOffset(240, 22)
hudLabel.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
hudLabel.BackgroundTransparency = 0.3
hudLabel.TextColor3 = Color3.fromRGB(120, 255, 150)
hudLabel.Font = Enum.Font.SourceSansBold
hudLabel.TextSize = 14
hudLabel.Visible = false
hudLabel.Parent = hud
Instance.new("UICorner", hudLabel)
RunService.Heartbeat:Connect(function(dt)
dt = math.min(dt, 0.1)
local char = Player.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
local pos = root and root.Position or getFocusPosition()
local inside
for i = #shelters, 1, -1 do
local s = shelters[i]
if not s.model.Parent then
table.remove(shelters, i)
else
local goal = s.open and 1 or 0
if s.alpha ~= goal then
local step = SHELTER.DoorSpeed * dt
if s.alpha < goal then
s.alpha = math.min(s.alpha + step, goal)
else
s.alpha = math.max(s.alpha - step, goal)
end
setDoor(s)
end
if not inside and isInside(s, pos) then inside = s end
end
end
local k = 1 - math.exp(-dt * SHELTER.Blend)
inBlend += ((inside and 1 or 0) - inBlend) * k
if inside then
curClosed += ((1 - inside.alpha) - curClosed) * k
end
local c = curClosed
local vol = SHELTER.OpenVolume + (SHELTER.ClosedVolume - SHELTER.OpenVolume) * c
local high = SHELTER.OpenHigh + (SHELTER.ClosedHigh - SHELTER.OpenHigh) * c
local mid = SHELTER.OpenMid + (SHELTER.ClosedMid - SHELTER.OpenMid) * c
group.Volume = 1 + (vol - 1) * inBlend
eq.HighGain = high * inBlend
eq.MidGain = mid * inBlend
eq.LowGain = SHELTER.BoostLow * inBlend
hudLabel.Visible = inBlend > 0.5
if hudLabel.Visible then
hudLabel.Text = (inside and inside.open or (not inside and curClosed < 0.5))
and "IN SHELTER - DOOR OPEN" or "IN SHELTER - SOUNDS MUFFLED"
end
end)
-- ================================================================
-- GUI BUTTONS (added to your existing scrolling panel)
-- ================================================================
local function addButtons()
local sg = Player.PlayerGui:FindFirstChild("TornadoControls")
local scroll = sg and sg:FindFirstChildWhichIsA("ScrollingFrame", true)
if not scroll then return end
local function btn(text, color, order, fn)
local b = Instance.new("TextButton")
b.LayoutOrder = order
b.Size = UDim2.new(1, -6, 0, 20)
b.BackgroundColor3 = color
b.Text = text
b.TextColor3 = Color3.new(1, 1, 1)
b.Font = Enum.Font.SourceSansBold
b.TextSize = 11
b.Parent = scroll
Instance.new("UICorner", b)
b.MouseButton1Click:Connect(fn)
end
btn("SPAWN SHELTER", Color3.fromRGB(90, 90, 110), 110, spawnInFront)
btn("CLEAR SHELTERS", Color3.fromRGB(110, 70, 70), 111, clearShelters)
end
addButtons()
-- ================================================================
-- AUTO-BUILD A FEW AROUND YOU AT START
-- ================================================================
task.spawn(function()
local char = Player.Character or Player.CharacterAdded:Wait()
char:WaitForChild("HumanoidRootPart", 10)
task.wait(1.5)
local center = getFocusPosition()
for i = 1, SHELTER.Count do
local a = (i / SHELTER.Count) * math.pi * 2 + math.random() * 0.8
local d = SHELTER.MinDist + math.random() * (SHELTER.MaxDist - SHELTER.MinDist)
spawnShelterAt(center.X + math.cos(a) * d, center.Z + math.sin(a) * d, center)
end
end)
end)
-- ====================================================================
-- [[ TORNADO API + CAR DRIVER SHIELD for the vehicle garage ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script (after the
-- STORM SHELTERS block). If you pasted the older version, replace it.
-- Nothing else needs editing.
--
-- 1) TornadoAPI: lets dominator_garage.lua read the live storm so a car
-- is snatched when the wind at the car reaches its threshold.
-- 2) Driver shield: the tornado's player-lift grabs anyone within ~2x the
-- funnel radius and fights the car for control of your character. While
-- you are driving (character attribute "InVehicle") it now leaves you
-- alone, so you stay in the seat and ride with the car.
-- Run the tornado script first, then the garage script.
-- ====================================================================
if getgenv then
getgenv().TornadoAPI = function()
local widthScale = 0.4 + 0.6 * descendProgress
return {
contact = contact, -- 0..1, how far the funnel is on the ground
peak = currentWindSpeedMPH * contact, -- peak wind mph at the funnel
ef = currentEF,
pos = liveStormPos,
height = sm.Height,
colR = columnRadius() * widthScale,
bend = bendAt,
}
end
end
do
local origUpdateVictims = updateVictims
updateVictims = function(...)
local char = Player.Character
if char and char:GetAttribute("InVehicle") then
local st = victims[Player]
if st then
clearPull(st, char:FindFirstChildOfClass("Humanoid"))
victims[Player] = nil
end
cooldowns[Player] = timeElapsed + 2 -- keeps it from starting a new grab
end
return origUpdateVictims(...)
end
end
-- ====================================================================
-- [[ UNANCHORED OBJECT SUCTION ]]
-- PASTE THIS AT THE VERY BOTTOM of your tornado script (after the
-- tornado_api_addon block). Nothing else needs editing.
--
-- Why loose objects weren't being sucked in:
-- * only parts inside a small box around the funnel were ever grabbed
-- * at EF0-EF2 the pull was weaker than friction, so parts just sat there
-- * parts the SERVER owns ignore forces from your client
--
-- This adds a proper suction system:
-- * grabs every unanchored object within a wide radius of the funnel
-- * wind field drags them in, spins them and lifts them near the core
-- * after a few seconds each one is thrown back out of the vortex
-- * asks the engine to hand your client physics ownership of nearby parts
-- * 3 new panel buttons: SUCK LOOSE on/off, SPAWN LOOSE PARTS (test blocks
-- that always work), CLEAR LOOSE PARTS
-- ====================================================================
task.spawn(function()
local SUCK = {
Enabled = true,
BoostOwnership = true, -- request physics ownership of nearby loose parts
RadiusMul = 2.0, -- capture radius = funnel ground radius x this
MinRadius = 260,
MaxRadius = 1500,
MaxParts = 250, -- loose objects handled at once
ScanEvery = 0.15,
StepEvery = 0.05,
Drag = 1.1, -- how hard the wind grabs a part
MaxAccel = 900,
-- lift (in gravities) near the core, by EF level
Lift = {[0] = 0.8, [1] = 0.95, [2] = 1.1, [3] = 1.25, [4] = 1.4, [5] = 1.5},
-- heaviest assembly that can be sucked, by EF level (cars/heavy stuff use the old car logic)
MaxMass = {[0] = 15, [1] = 40, [2] = 90, [3] = 160, [4] = 220, [5] = 249},
-- seconds in the vortex before being thrown out, by EF level
Hold = {[0] = {14, 26}, [1] = {12, 24}, [2] = {10, 20}, [3] = {8, 16}, [4] = {6, 13}, [5] = {5, 10}},
EjectAccel = 520,
EjectTime = 0.8,
Cooldown = 12, -- seconds before a thrown part can be grabbed again
SpinCap = 12,
}
local SKIP_FOLDERS = {
"RainAssets", "LightningAssets", "DisasterPack", "TornadoTools", "RadarRoom",
"TornadoSirens", "StormShelters", "LooseTestParts",
}
local tracked, count = {}, 0
local recent = setmetatable({}, {__mode = "k"})
local params = OverlapParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.MaxParts = 500
-- ================================================================
-- helpers
-- ================================================================
local function groundRadius()
return columnRadius() * (0.4 + 0.6 * descendProgress)
end
local function captureRadius()
return math.clamp(groundRadius() * SUCK.RadiusMul, SUCK.MinRadius, SUCK.MaxRadius)
end
local function centerAt(pos)
local h01 = math.clamp((pos.Y - liveStormPos.Y) / math.max(sm.Height, 1), 0, 1)
local bx, bz = bendAt(h01)
return Vector3.new(liveStormPos.X + bx, liveStormPos.Y, liveStormPos.Z + bz)
end
-- wind velocity (studs/s): spin + inflow + updraft
local function fieldAt(pos, center, peak, core)
local rx, rz = pos.X - center.X, pos.Z - center.Z
local dist = math.max(math.sqrt(rx * rx + rz * rz), 1)
local rdx, rdz = rx / dist, rz / dist
local vt = (dist < core) and (dist / core) or (core / dist) ^ 0.75
local h01 = math.clamp((pos.Y - center.Y) / math.max(sm.Height, 1), 0, 1)
local upK = math.clamp(1 - dist / (core * 1.7), 0, 1) ^ 0.7
return Vector3.new(-rdz, 0, rdx) * (vt * peak)
+ Vector3.new(-rdx, 0, -rdz) * (vt * peak * 0.45)
+ Vector3.new(0, upK * peak * 0.7 * (1 - 0.5 * h01), 0)
end
local function boost()
pcall(function() sethiddenproperty(Player, "SimulationRadius", 1e9) end)
pcall(function() sethiddenproperty(Player, "MaximumSimulationRadius", 1e9) end)
pcall(function() Player.MaximumSimulationRadius = 1e9 end)
end
local function drop(root, st, ejected)
if tracked[root] then
tracked[root] = nil
count -= 1
end
if st.vf then st.vf:Destroy() end
if st.att then st.att:Destroy() end
for _, m in ipairs(st.markers) do
if m.Parent then m:Destroy() end
end
recent[root] = timeElapsed + (ejected and SUCK.Cooldown or 3)
end
local function adopt(root)
local att = Instance.new("Attachment")
att.Name = "SuckAtt"
att.Parent = root
local vf = Instance.new("VectorForce")
vf.Name = "SuckForce"
vf.Attachment0 = att
vf.RelativeTo = Enum.ActuatorRelativeTo.World
vf.ApplyAtCenterOfMass = true
vf.Force = Vector3.zero
vf.Parent = root
-- stop the old weak debris force from fighting this one: mark every part of the
-- assembly so the main script skips it, and remove any force it already added
local markers = {}
local okc, connected = pcall(function() return root:GetConnectedParts(true) end)
for _, q in ipairs(okc and connected or {root}) do
local old = debrisTracked[q]
if old then
debrisTracked[q] = nil
debrisCount -= 1
if old.vf then old.vf:Destroy() end
if old.att and old.att.Parent then old.att:Destroy() end
end
if not q:FindFirstChild("TornadoForce") then
local mk = Instance.new("BoolValue")
mk.Name = "TornadoForce"
mk.Parent = q
markers[#markers + 1] = mk
end
end
local hold = SUCK.Hold[currentEF]
tracked[root] = {
att = att, vf = vf, markers = markers,
nextKick = timeElapsed + 1 + math.random() * 2,
ejectAt = timeElapsed + hold[1] + math.random() * (hold[2] - hold[1]),
}
count += 1
end
-- ================================================================
-- scan: find loose parts around the funnel
-- ================================================================
local function scan()
if count >= SUCK.MaxParts then return end
local skip = {funnelFolder}
for _, n in ipairs(SKIP_FOLDERS) do
local f = workspace:FindFirstChild(n)
if f then skip[#skip + 1] = f end
end
for _, plr in ipairs(Players:GetPlayers()) do
if plr.Character then skip[#skip + 1] = plr.Character end
end
params.FilterDescendantsInstances = skip
local H = math.max(sm.Height * descendProgress, 400)
local R = captureRadius()
local center = Vector3.new(liveStormPos.X, liveStormPos.Y + H / 2 - 40, liveStormPos.Z)
local parts = workspace:GetPartBoundsInBox(CFrame.new(center), Vector3.new(R * 2, H + 80, R * 2), params)
local now = timeElapsed
local maxMass = SUCK.MaxMass[currentEF]
local added = 0
for _, p in ipairs(parts) do
if count >= SUCK.MaxParts or added >= 40 then break end
if p:IsA("BasePart") and not p.Anchored and not p:IsA("Terrain") then
local root = p.AssemblyRootPart
if root and not root.Anchored and not tracked[root]
and (recent[root] or 0) <= now and not carTracked[root] then
local helper = (not root.CanCollide) and root.Transparency >= 0.95
if not helper then
local mass = root.AssemblyMass
if mass > 0 and mass <= maxMass and mass < CARS.HeavyMass
and not isCarAssembly(root) and not isCharPart(root) then
adopt(root)
added += 1
end
end
end
end
end
end
-- ================================================================
-- step: apply the forces
-- ================================================================
local function step()
if count == 0 then return end
local now = timeElapsed
local g = workspace.Gravity
local ef = currentEF
local peak = math.max(currentWindSpeedMPH * contact, 40)
local core = math.max(groundRadius() * 0.8, 60)
local maxD = captureRadius() * 1.7
local liftG = SUCK.Lift[ef]
local maxMass = SUCK.MaxMass[ef]
for root, st in pairs(tracked) do
if not root.Parent or root.Anchored or not st.vf.Parent or root.Position.Y < -500 then
drop(root, st)
continue
end
local pos = root.Position
local c = centerAt(pos)
local dx, dz = pos.X - c.X, pos.Z - c.Z
local dist = math.sqrt(dx * dx + dz * dz)
if dist > maxD then
drop(root, st)
continue
end
local mass = root.AssemblyMass
if mass <= 0 then continue end
local rad = dist > 0.5 and Vector3.new(dx / dist, 0, dz / dist) or Vector3.new(1, 0, 0)
local tan = Vector3.new(-rad.Z, 0, rad.X)
local accel
if st.ejectEnd then
if now < st.ejectEnd then
accel = st.ejectVec + Vector3.new(0, g * 0.6, 0)
else
drop(root, st, true)
continue
end
else
local vel = root.AssemblyLinearVelocity
local target = fieldAt(pos, c, peak, core)
local near = math.clamp(1.4 - dist / core, 0, 1)
local massK = 1 - 0.5 * math.clamp(mass / math.max(maxMass, 1), 0, 1)
local lift = liftG * (0.55 + 0.45 * near) * massK
accel = (target - vel) * SUCK.Drag + Vector3.new(0, g * lift, 0)
if now >= st.nextKick then
Tornado script doesn’t suck things it but houses that you spawn with the gui

Universal