Advertisement
OFAS32_IL_IL

Super Ring

May 18th, 2025 (edited)
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.57 KB | Writing | 0 0
  1. local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
  2. local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
  3. local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
  4.  
  5. local Window = Fluent:CreateWindow({
  6.     Title = "yurnyxs " .. Fluent.Version,
  7.     SubTitle = "by yurnyxs",
  8.     TabWidth = 160,
  9.     Size = UDim2.fromOffset(580, 460),
  10.     Acrylic = true,
  11.     Theme = "Dark",
  12.     MinimizeKey = Enum.KeyCode.M
  13. })
  14.  
  15. local Tabs = {
  16.     Main = Window:AddTab({ Title = "Main", Icon = "" }),
  17.     Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
  18. }
  19.  
  20. local Options = Fluent.Options
  21.  
  22. -- เริ่มเขียนระบบหลัก
  23. do
  24.     local Players = game:GetService("Players")
  25.     local RunService = game:GetService("RunService")
  26.  
  27.     local LocalPlayer = Players.LocalPlayer
  28.  
  29.     local rotationSpeed = 200
  30.     local radius = 100
  31.  
  32.     local SETTINGS = {
  33.         height = 20,
  34.         attractionStrength = 500,
  35.         updateInterval = 0.05,
  36.         safeDistance = 5
  37.     }
  38.  
  39.     local function IsValidPart(part)
  40.         return part:IsA("BasePart")
  41.             and not part.Anchored
  42.             and not part:IsDescendantOf(LocalPlayer.Character)
  43.     end
  44.  
  45.     local function TornadoEffect()
  46.         if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return end
  47.  
  48.         local humanoidRootPart = LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  49.         local tornadoCenter = humanoidRootPart.Position
  50.  
  51.         local parts = {}
  52.         for _, part in ipairs(workspace:GetDescendants()) do
  53.             if IsValidPart(part) then
  54.                 table.insert(parts, part)
  55.             end
  56.         end
  57.  
  58.         for _, part in ipairs(parts) do
  59.             if part.Parent then
  60.                 local pos = part.Position
  61.                 local flatOffset = Vector3.new(pos.X, tornadoCenter.Y, pos.Z)
  62.                 local distance = (flatOffset - tornadoCenter).Magnitude
  63.                 local minDist = math.max(distance, SETTINGS.safeDistance)
  64.  
  65.                 local angle = math.atan2(pos.Z - tornadoCenter.Z, pos.X - tornadoCenter.X)
  66.                 local newAngle = angle + math.rad(rotationSpeed) * SETTINGS.updateInterval
  67.  
  68. local targetPos = Vector3.new(
  69.     tornadoCenter.X + math.cos(newAngle) * radius,
  70.     tornadoCenter.Y + (SETTINGS.height * math.abs(math.sin((pos.Y - tornadoCenter.Y) / SETTINGS.height))),
  71.     tornadoCenter.Z + math.sin(newAngle) * radius
  72. )
  73.                 local directionToTarget = (targetPos - part.Position).Unit
  74.                 part.Velocity = directionToTarget * SETTINGS.attractionStrength
  75.             end
  76.         end
  77.     end
  78.  
  79.     local TornadoRunning = false
  80.     local TornadoThread = nil
  81.  
  82.     local Toggle = Tabs.Main:AddToggle("MyToggle", { Title = "Tornado", Default = false })
  83.  
  84.     Toggle:OnChanged(function(Value)
  85.         if Value then
  86.             TornadoRunning = true
  87.             TornadoThread = task.spawn(function()
  88.                 while TornadoRunning do
  89.                     pcall(TornadoEffect)
  90.                     task.wait(SETTINGS.updateInterval)
  91.                 end
  92.             end)
  93.         else
  94.             TornadoRunning = false
  95.         end
  96.     end)
  97.  
  98.     Options.MyToggle:SetValue(false)
  99.  
  100.     local Slider1 = Tabs.Main:AddSlider("Slider1", {
  101.         Title = "RotationSpeed",
  102.         Description = "ความเร็วในการหมุน",
  103.         Default = 200,
  104.         Min = 0,
  105.         Max = 900,
  106.         Rounding = 1,
  107.         Callback = function(Value)
  108.             rotationSpeed = tonumber(Value)
  109.         end
  110.     })
  111.  
  112.     Slider1:SetValue(rotationSpeed)
  113.  
  114.     local Slider2 = Tabs.Main:AddSlider("Slider2", {
  115.         Title = "Radius",
  116.         Description = "รัศมีของพายุ",
  117.         Default = 100,
  118.         Min = 0,
  119.         Max = 900,
  120.         Rounding = 0,
  121.         Callback = function(Value)
  122.             radius = tonumber(Value)
  123.         end
  124.     })
  125.  
  126.     Slider2:SetValue(radius)
  127. end
  128.  
  129.  
  130. SaveManager:SetLibrary(Fluent)
  131. InterfaceManager:SetLibrary(Fluent)
  132. SaveManager:IgnoreThemeSettings()
  133. SaveManager:SetIgnoreIndexes({})
  134. InterfaceManager:SetFolder("FluentScriptHub")
  135. SaveManager:SetFolder("FluentScriptHub/specific-game")
  136. InterfaceManager:BuildInterfaceSection(Tabs.Settings)
  137. SaveManager:BuildConfigSection(Tabs.Settings)
  138. Window:SelectTab(1)
  139. SaveManager:LoadAutoloadConfig()
  140.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement
OSZAR »