Advertisement
Thecodeeasar

FE fling v2

Feb 18th, 2025 (edited)
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.72 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local Workspace = game:GetService("Workspace")
  4. local UserInputService = game:GetService("UserInputService")
  5. local TweenService = game:GetService("TweenService")
  6. local LocalPlayer = Players.LocalPlayer
  7. local Camera = Workspace.CurrentCamera
  8.  
  9. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/jensonhirst/Orion/main/source')))()
  10.  
  11. -- Premium usernames list
  12. local premiumUsernames = {
  13.     "0Tripyxman0"
  14. }
  15.  
  16. -- Function to check if the local player is a premium user
  17. local function isPremiumUser()
  18.     local player = LocalPlayer
  19.     if player then
  20.         for _, username in ipairs(premiumUsernames) do
  21.             if player.Name == username then
  22.                 return true  -- Username matches, user is premium
  23.             end
  24.         end
  25.     end
  26.     return false  -- No match found
  27. end
  28.  
  29. -- Notify premium users
  30. if isPremiumUser() then
  31.     OrionLib:MakeNotification({
  32.         Name = "Premium Access",
  33.         Content = "Enjoy premium features, fellow teammate!",
  34.         Image = "rbxassetid://4483345998",
  35.         Time = 5
  36.     })
  37. end
  38.  
  39. local Window = OrionLib:MakeWindow({Name = "FE Fling v2", HidePremium = true, SaveConfig = true, ConfigFolder = "FEFlingV2"})
  40. local FlingTab = Window:MakeTab({Name = "Fling", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  41. local AntiVoidTab = Window:MakeTab({Name = "Anti Void", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  42. local AntiFlingTab = Window:MakeTab({Name = "Anti Fling", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  43. local MiscTab = Window:MakeTab({Name = "Misc", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  44.  
  45. local selectedPlayer
  46. local PlayerDropdown
  47. local isFlinging = false
  48. local originalCameraSubject
  49. local originalCharacterPos
  50. local isAntiFlingEnabled = false
  51. local flingPower = 9999
  52. local flingRadius = 1
  53. local invisFling = false
  54.  
  55. -- Function to get character and HumanoidRootPart
  56. local function getCharacter()
  57.     local character = LocalPlayer.Character
  58.     if not character then
  59.         repeat
  60.             character = LocalPlayer.Character
  61.             task.wait()
  62.         until character
  63.     end
  64.     return character
  65. end
  66.  
  67. local function getHumanoidRootPart()
  68.     local character = getCharacter()
  69.     return character:WaitForChild("HumanoidRootPart")
  70. end
  71.  
  72. -- Function to update player list
  73. local function updatePlayerList()
  74.     local playerList = {}
  75.     for _, player in ipairs(Players:GetPlayers()) do
  76.         if player ~= LocalPlayer then
  77.             table.insert(playerList, player.Name)
  78.         end
  79.     end
  80.     return playerList
  81. end
  82.  
  83. -- Function to perform continuous fling (existing code)
  84. local function performFling(targetPlayer)
  85.     if not targetPlayer or not targetPlayer.Character then return end
  86.     local targetHRP = targetPlayer.Character:FindFirstChild("HumanoidRootPart")
  87.     if not targetHRP then return end
  88.  
  89.     local character = getCharacter()
  90.     local humanoidRootPart = getHumanoidRootPart()
  91.  
  92.     originalCameraSubject = Camera.CameraSubject
  93.     originalCharacterPos = humanoidRootPart.CFrame
  94.  
  95.     if not invisFling then
  96.         Camera.CameraSubject = targetPlayer.Character:FindFirstChildOfClass("Humanoid")
  97.     end
  98.  
  99.     while isFlinging and targetPlayer and targetPlayer.Character do
  100.         character = getCharacter()
  101.         humanoidRootPart = getHumanoidRootPart()
  102.         targetHRP = targetPlayer.Character:FindFirstChild("HumanoidRootPart")
  103.         if targetHRP and humanoidRootPart then
  104.             local offsetPosition = targetHRP.Position + Vector3.new(math.random(-flingRadius, flingRadius), 0, math.random(-flingRadius, flingRadius))
  105.             humanoidRootPart.CFrame = CFrame.new(offsetPosition)
  106.             humanoidRootPart.Velocity = Vector3.new(flingPower, flingPower, flingPower)
  107.             humanoidRootPart.RotVelocity = Vector3.new(flingPower, flingPower, flingPower)
  108.         end
  109.         RunService.Heartbeat:Wait()
  110.     end
  111.  
  112.     Camera.CameraSubject = originalCameraSubject
  113.     if character and character:FindFirstChild("Humanoid") then
  114.         character.Humanoid.Health = character.Humanoid.MaxHealth
  115.     end
  116.    
  117.     humanoidRootPart = getHumanoidRootPart()
  118.     humanoidRootPart.CFrame = originalCharacterPos
  119.     humanoidRootPart.Velocity = Vector3.new(0, 0, 0)
  120.     humanoidRootPart.RotVelocity = Vector3.new(0, 0, 0)
  121. end
  122.  
  123. -- Create dropdown for player selection (existing code)
  124. PlayerDropdown = FlingTab:AddDropdown({
  125.     Name = "Select Player",
  126.     Default = "",
  127.     Options = updatePlayerList(),
  128.     Callback = function(Value)
  129.         selectedPlayer = Players:FindFirstChild(Value)
  130.     end    
  131. })
  132.  
  133. -- Create toggle for fling functionality (existing code)
  134. FlingTab:AddToggle({
  135.     Name = "Fling Player",
  136.     Default = false,
  137.     Callback = function(Value)
  138.         isFlinging = Value
  139.         if isFlinging then
  140.             if selectedPlayer then
  141.                 performFling(selectedPlayer)
  142.             else
  143.                 OrionLib:MakeNotification({
  144.                     Name = "Fling Error",
  145.                     Content = "Please select a player first!",
  146.                     Image = "rbxassetid://4483345998",
  147.                     Time = 3
  148.                 })
  149.                 FlingTab:GetToggle("Fling Player").Set(false)
  150.             end
  151.         end
  152.     end,
  153. })
  154.  
  155. -- Add textbox for fling power (existing code)
  156. FlingTab:AddTextbox({
  157.     Name = "Fling Power",
  158.     Default = "9999",
  159.     TextDisappear = false,
  160.     Callback = function(Value)
  161.         local newPower = tonumber(Value)
  162.         if newPower and newPower > 0 then
  163.             flingPower = newPower
  164.         else
  165.             OrionLib:MakeNotification({
  166.                 Name ="Invalid Input",
  167.                 Content ="Please enter a valid number greater than 0 for Fling Power.",
  168.                 Image ="rbxassetid://4483345998",
  169.                 Time=3,
  170.             })
  171.         end
  172.    end,
  173. })
  174.  
  175. -- Add textbox for fling radius (existing code)
  176. FlingTab:AddTextbox({
  177.    Name ="Fling Radius",
  178.    Default ="1",
  179.    TextDisappear=false,
  180.    Callback=function(Value)
  181.        local newRadius=tonumber(Value)
  182.        if newRadius and newRadius>0 then
  183.            flingRadius=newRadius
  184.        else
  185.            OrionLib:MakeNotification({
  186.                Name="Invalid Input",
  187.                Content="Please enter a valid number greater than 0 for Fling Radius.",
  188.                Image="rbxassetid://4483345998",
  189.                Time=3,
  190.            })
  191.        end
  192.    end,
  193. })
  194.  
  195. -- Add toggle for invisible fling (existing code)
  196. FlingTab:AddToggle({
  197.    Name="Invisible Fling",
  198.    Default=false,
  199.    Callback=function(Value)
  200.        invisFling=Value
  201.    end,
  202. })
  203.  
  204. -- Function to update dropdown when players join or leave (existing code)
  205. local function updateDropdown()
  206.    PlayerDropdown:Refresh(updatePlayerList(), true)
  207. end
  208.  
  209. Players.PlayerAdded:Connect(updateDropdown)
  210. Players.PlayerRemoving:Connect(updateDropdown)
  211.  
  212. spawn(function()
  213.    while true do
  214.        updateDropdown()
  215.        task.wait(1)
  216.    end
  217. end)
  218.  
  219. -- Anti Void functionality (existing code)
  220. local antiVoidPart
  221.  
  222. local function createAntiVoid()
  223.    if antiVoidPart then return end
  224.  
  225.    antiVoidPart=Instance.new("Part")
  226.    antiVoidPart.Name="AntiVoidPart"
  227.    antiVoidPart.Size=Vector3.new(2048, 1, 2048)
  228.    antiVoidPart.Anchored=true
  229.    antiVoidPart.Transparency=0.5
  230.    antiVoidPart.CanCollide=true  
  231.    antiVoidPart.BrickColor=BrickColor.new("Really blue")  
  232.  
  233.    local lowestY=math.huge  
  234.    for _, part in pairs(Workspace:GetDescendants()) do  
  235.        if part:IsA("BasePart") then  
  236.            lowestY=math.min(lowestY, part.Position.Y)  
  237.        end  
  238.    end  
  239.    antiVoidPart.Position=Vector3.new(0, lowestY - 5, 0)  
  240.  
  241.    antiVoidPart.Parent=Workspace  
  242. end
  243.  
  244. local function removeAntiVoid()
  245.    if antiVoidPart then  
  246.        antiVoidPart:Destroy()  
  247.        antiVoidPart=nil  
  248.    end  
  249. end
  250.  
  251. AntiVoidTab:AddToggle({
  252.    Name="Anti Void",
  253.    Default=false,
  254.    Callback=function(Value)  
  255.        if Value then  
  256.            createAntiVoid()  
  257.        else  
  258.            removeAntiVoid()  
  259.        end  
  260.    end  
  261. })
  262.  
  263. -- Anti Fling functionality (existing code)
  264. local function disableLocalPlayerCollisions()
  265.    local character=getCharacter()
  266.    for _, part in pairs(character:GetDescendants()) do  
  267.        if part:IsA("BasePart") then  
  268.            part.CanCollide=false  
  269.        end  
  270.    end  
  271. end
  272.  
  273. local function enableLocalPlayerCollisions()
  274.    local character=getCharacter()
  275.    for _, part in pairs(character:GetDescendants()) do  
  276.        if part:IsA("BasePart") then  
  277.            part.CanCollide=true  
  278.        end  
  279.    end  
  280. end
  281.  
  282. local function performAntiFling()
  283.    disableLocalPlayerCollisions()
  284.  
  285.    while isAntiFlingEnabled do  
  286.        RunService.Heartbeat:Wait()  
  287.    end  
  288.  
  289.    enableLocalPlayerCollisions()  
  290. end
  291.  
  292. AntiFlingTab:AddToggle({
  293.    Name="Enable Anti Fling",
  294.    Default=false,
  295.    Callback=function(Value)  
  296.        isAntiFlingEnabled=Value  
  297.        if isAntiFlingEnabled then  
  298.            performAntiFling()  
  299.        else  
  300.            enableLocalPlayerCollisions()  
  301.        end  
  302.    end  
  303. })
  304.  
  305. -- Misc features (existing code)
  306. local isSuperJumpEnabled=false
  307.  
  308. MiscTab:AddToggle({
  309.    Name="Super Jump",
  310.    Default=false,
  311.    Callback=function(Value)
  312.        isSuperJumpEnabled=Value
  313.        local character=getCharacter()
  314.        if character and character:FindFirstChild("Humanoid") then
  315.            character.Humanoid.JumpPower=isSuperJumpEnabled and 100 or 50
  316.        end
  317.    end  
  318. })
  319.  
  320. local isSpeedEnabled=false
  321.  
  322. MiscTab:AddToggle({
  323.    Name="Speed Boost",
  324.    Default=false,
  325.    Callback=function(Value)
  326.        isSpeedEnabled=Value
  327.        local character=getCharacter()
  328.        if character and character:FindFirstChild("Humanoid") then
  329.            character.Humanoid.WalkSpeed=isSpeedEnabled and 32 or 16
  330.        end  
  331.    end  
  332. })
  333.  
  334. MiscTab:AddButton({
  335.    Name="Teleport to Random Player",
  336.    Callback=function()
  337.        local players=Players:GetPlayers()
  338.        local randomPlayer=players[math.random(1, #players)]
  339.        if randomPlayer~=LocalPlayer and randomPlayer.Character then
  340.            local character=getCharacter()
  341.            character:SetPrimaryPartCFrame(randomPlayer.Character.PrimaryPart.CFrame)        
  342.        end    
  343.      end    
  344. })
  345.  
  346. local noclipEnabled=false
  347.  
  348. MiscTab:AddToggle({    
  349.      Name="Noclip",    
  350.      Default=false,    
  351.      Callback=function(Value)    
  352.          noclipEnabled=Value    
  353.          if noclipEnabled then    
  354.              RunService:BindToRenderStep("Noclip", 0, function()    
  355.                  local character=getCharacter()    
  356.                  if character and character:FindFirstChild("Humanoid") then    
  357.                      character.Humanoid:ChangeState(11)    
  358.                  end    
  359.              end)    
  360.          else    
  361.              RunService:UnbindFromRenderStep("Noclip")    
  362.          end    
  363.      end    
  364. })
  365.  
  366. -- Handle character respawn (existing code)
  367. LocalPlayer.CharacterAdded:Connect(function(newCharacter)
  368.      local humanoid=newCharacter:WaitForChild("Humanoid")
  369.      
  370.      -- Reapply settings after respawn (existing code)
  371.      if isSuperJumpEnabled then    
  372.          humanoid.JumpPower=100    
  373.      end    
  374.      
  375.      if isSpeedEnabled then    
  376.          humanoid.WalkSpeed=32    
  377.      end    
  378.      
  379.      if isAntiFlingEnabled then    
  380.          disableLocalPlayerCollisions()    
  381.      end    
  382. end)
  383.  
  384. -- Define the iPlayer table and the premium function at the end of your script.
  385. local iPlayer={}
  386.  
  387. function iPlayer:premium()
  388.      return isPremiumUser()  -- Use the existing premium check logic here.
  389. end
  390.  
  391. OrionLib:Init()
  392.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement