ADVERTISEMENTREMOVE ADS
Game icon

Roblox TORNADO gui

Script preview thumbnail
Script Preview

Description

When turned on, will give you a force and make parts fly to you and spin around you. Make sure to use any universal fly script, inf yield, nameless admin, etc.

Tested with

ADVERTISEMENTREMOVE ADS
130 Lines • 4.21 KiB
Raw
-- LocalScript
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "TornadoGui"
screenGui.Parent = player:WaitForChild("PlayerGui")
-- Create main frame
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 150, 0, 50)
frame.Position = UDim2.new(0, 100, 0, 100)
frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
frame.BorderSizePixel = 0
frame.Parent = screenGui
-- Make frame draggable
local dragging = false
local dragInput, dragStart, startPos
local function update(input)
local delta = input.Position - dragStart
frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
update(input)
end
end)
-- Create toggle button
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, -10, 1, -10)
button.Position = UDim2.new(0, 5, 0, 5)
button.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
button.BorderSizePixel = 0
button.TextColor3 = Color3.new(1, 1, 1)
button.Font = Enum.Font.SourceSansBold
button.TextSize = 20
button.Text = "Tornado: OFF"
button.Parent = frame
local tornadoOn = false
local tornadoConnection
-- Function to apply tornado forces
local function applyTornado()
-- Radius and strength parameters
local radius = 50
local pullStrength = 1000
local spinStrength = 200
tornadoConnection = RunService.Heartbeat:Connect(function(deltaTime)
-- Update character root part in case of respawn
if not rootPart or not rootPart.Parent then
character = player.Character
if character then
rootPart = character:FindFirstChild("HumanoidRootPart")
end
return
end
for _, part in pairs(workspace:GetDescendants()) do
if part:IsA("BasePart") and not part.Anchored and part.CanCollide and part.Transparency < 1 then
local direction = rootPart.Position - part.Position
local dist = direction.Magnitude
if dist < radius then
-- Normalize direction vector
local pullVector = direction.Unit * pullStrength * deltaTime
-- Spin vector perpendicular to direction (around Y axis)
local spinVector = Vector3.new(-direction.Z, 0, direction.X).Unit * spinStrength * deltaTime
-- Apply force by changing Velocity (simplified)
-- Use AssemblyLinearVelocity for smooth physics interaction
local currentVelocity = part.AssemblyLinearVelocity
local newVelocity = currentVelocity + pullVector + spinVector
part.AssemblyLinearVelocity = newVelocity
end
end
end
end)
end
local function stopTornado()
if tornadoConnection then
tornadoConnection:Disconnect()
tornadoConnection = nil
end
end
button.MouseButton1Click:Connect(function()
tornadoOn = not tornadoOn
if tornadoOn then
button.Text = "Tornado: ON"
applyTornado()
else
button.Text = "Tornado: OFF"
stopTornado()
end
end)
ADVERTISEMENTREMOVE ADS

Comments

2 comments
to add a comment
Lu

Mostly, this script can only pull small parts, does not lag like the other scripts and takes some time to start doing its job.

2
0
ze

Idk what is this script

0
1
ADVERTISEMENTREMOVE ADS