Advertisement
theaquamarinegod

Fling GUI v1.0.4

Feb 4th, 2021 (edited)
587,863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.06 KB | None | 0 0
  1. --[[Fling GUI]]--
  2. --[[Made by topit for the Jeff GUI]]--
  3.  
  4. --[[v1.0.4 HOTFIX 4/21/2021]]--
  5. --Fixed the close button color being wrong
  6. --Added smooth dragging
  7. --Removed unused variables
  8.  
  9. --[[v1.0.3 UPDATE 4/19/2021]]--
  10. --Updated themes to be blockify's themes
  11. --Removed unused / deprecated features such as qfling, theme box, etc.
  12. --Made fix character compatible with both rig types (it had two different versions for each type)
  13. --Added velocity breaking after fixing character and stopping fling
  14. --Added novertgain module that might help
  15. --Made number grabbing in the speedbox better
  16. --Probably some performance improvements
  17.  
  18. --[[v1.0.2.3 HOTFIX 3/13/2021]]--
  19. --Updated fix player so the teleportation works outside of your client
  20. --Updated fix player to have a platform incase anchoring does not work
  21. --Added a suggestion for Survive the disasters
  22.  
  23. --[[v1.0.2.2 HOTFIX 3/11/2021]]--
  24. --Fixed R15 not being compatible with fix player
  25. --Updated fix player to hopefully work every time + send you to a safe location while fixing
  26. --Added a suggestion for Build a Boat for Treasure
  27.  
  28. --[[v1.0.2.1 HOTFIX 2/25/2021]]--
  29. --Fixed a variable issue
  30. --Added a few more suggestions for games
  31.  
  32. --[[v1.0.2 UPDATE 2/22/2021]]--
  33. --Updated the themes to make them look better
  34. --Updated FixPlayer to work more often
  35. --Fixed the textlabels having a visible box when not using the jeff standard theme
  36. --Fixed ServerKek to not break
  37. --Fixed ServerKek enable text appearing after the disable text
  38. --Fixed the suggestiontext not displaying properly if you arent playing on a supported game
  39.  
  40.  
  41. --[[variables:]]--
  42. local PlayerService = game:GetService("Players")--:GetPlayers()
  43. local TweenService = game:GetService("TweenService")
  44. local RunService = game:GetService("RunService")
  45. local UserInputService = game:GetService("UserInputService")
  46.  
  47. local plr = PlayerService.LocalPlayer
  48. local mouse = plr:GetMouse()
  49. local BodyThrust = nil
  50. local Dragging = {}
  51.  
  52. local Suggestions = {
  53.     2298830673, 300, 365, --gamier (test game)
  54.     1537690962, 250, 350, --bee swarm sim
  55.     5580097107, 300, 400, --frappe
  56.     2202352383, 275, 350, --super power training sim
  57.     142823291, 350, 425,  --murder mystery 2
  58.     155615604, 273, 462,  --prison life
  59.     1990228024, 200, 235, --bloxton hotels
  60.     189707, 250, 325,     --natural disaster survival
  61.     230362888, 265, 415,  --the normal elevator       (may not work)
  62.     5293755937, 335, 435, --speedrun sim
  63.     537413528, 300, 350,  --build a boat              (may not work)
  64.     18540115, 300, 425,   --survive the disasters
  65.     2041312716, 350, 465  --Ragdoll engine
  66. }
  67.  
  68.  
  69. local version = "v1.0.4"
  70. local font = Enum.Font.FredokaOne
  71.  
  72. local AxisPositionX = {
  73.     0.05,
  74.     0.35,
  75.     0.65
  76. }
  77.  
  78. local AxisPositionY = {
  79.     40, --edit fling speed
  80.     90, --toggle fling types (normal, qfling, serverkek)
  81.     140, --extra (respawn)
  82.     190, --edit gui settings (hotkey, theme)
  83.     240
  84. }
  85.  
  86. local Fling = {
  87.     false, --toggle
  88.     "", --hotkey
  89.     300, --speed
  90.     false, --server
  91.     false --stop vertfling
  92. }
  93.  
  94.  
  95. --[[themes:]]--
  96.  
  97. local Theme_JeffStandard = {
  98.     Color3.fromRGB(15, 25, 35),  
  99.     Color3.fromRGB(10, 20, 30),  
  100.     Color3.fromRGB(27, 42, 53),  
  101.     Color3.fromRGB(25, 35, 45),  
  102.     Color3.fromRGB(20, 30, 40),  
  103.     Color3.fromRGB(25, 65, 45),  
  104.     Color3.fromRGB(255, 255, 255),
  105.     Color3.fromRGB(245, 245, 255),
  106.     Color3.fromRGB(155, 155, 255)
  107. }
  108. local Theme_Dark = {
  109.     Color3.fromRGB(25, 25, 25),   --Top bar
  110.     Color3.fromRGB(10, 10, 10),   --Background
  111.     Color3.fromRGB(40, 40, 40),   --Border color
  112.     Color3.fromRGB(35, 35, 35),   --Button background
  113.     Color3.fromRGB(20, 20, 20),   --Unused
  114.     Color3.fromRGB(25, 100, 45),  --Button highlight
  115.     Color3.fromRGB(255, 255, 255),--Text title
  116.     Color3.fromRGB(245, 245, 255),--Text generic
  117.     Color3.fromRGB(155, 155, 255) --Text highlight
  118. }
  119. local Theme_Steel = {
  120.     Color3.fromRGB(25, 25, 35),   --Top bar
  121.     Color3.fromRGB(10, 10, 20),   --Background
  122.     Color3.fromRGB(40, 40, 50),   --Border color
  123.     Color3.fromRGB(35, 35, 45),   --Button background
  124.     Color3.fromRGB(20, 20, 25),   --Unused
  125.     Color3.fromRGB(25, 100, 55),  --Button highlight
  126.     Color3.fromRGB(255, 255, 255),--Text title
  127.     Color3.fromRGB(245, 245, 255),--Text generic
  128.     Color3.fromRGB(155, 155, 255) --Text highlight
  129. }
  130. local Theme_Rust = {
  131.     Color3.fromRGB(45, 25, 25),  
  132.     Color3.fromRGB(30, 10, 10),  
  133.     Color3.fromRGB(60, 40, 40),  
  134.     Color3.fromRGB(55, 35, 35),  
  135.     Color3.fromRGB(40, 20, 20),  
  136.     Color3.fromRGB(45, 100, 45),  
  137.     Color3.fromRGB(255, 255, 255),
  138.     Color3.fromRGB(255, 245, 255),
  139.     Color3.fromRGB(175, 155, 255)
  140. }
  141. local Theme_Violet = {
  142.     Color3.fromRGB(35, 25, 45),   --Top bar
  143.     Color3.fromRGB(20, 10, 30),   --Background
  144.     Color3.fromRGB(50, 40, 60),   --Border color
  145.     Color3.fromRGB(45, 35, 55),   --Button background
  146.     Color3.fromRGB(30, 20, 40),   --Unused
  147.     Color3.fromRGB(35, 100, 65),  --Button highlight
  148.     Color3.fromRGB(255, 255, 255),--Text title
  149.     Color3.fromRGB(245, 245, 255),--Text generic
  150.     Color3.fromRGB(155, 155, 255) --Text highlight
  151. }
  152. local Theme_Space = {
  153.     Color3.fromRGB(10, 10, 10),   --Top bar
  154.     Color3.fromRGB(0, 0, 0),   --Background
  155.     Color3.fromRGB(20, 20, 20),   --Border color
  156.     Color3.fromRGB(15, 15, 15),   --Button background
  157.     Color3.fromRGB(5, 5, 5),   --Unused
  158.     Color3.fromRGB(20, 25, 50),  --Button highlight
  159.     Color3.fromRGB(255, 255, 255),--Text title
  160.     Color3.fromRGB(245, 245, 255),--Text generic
  161.     Color3.fromRGB(155, 155, 255) --Text highlight
  162. }
  163. local Theme_SynX = {
  164.     Color3.fromRGB(75, 75, 75),   --Top bar
  165.     Color3.fromRGB(45, 45, 45),   --Background
  166.     Color3.fromRGB(45, 45, 45),   --Border color
  167.     Color3.fromRGB(75, 75, 75),   --Button background
  168.     Color3.fromRGB(0, 0, 5),   --Unused
  169.     Color3.fromRGB(150, 75, 20),  --Button highlight
  170.     Color3.fromRGB(255, 255, 255),--Text title
  171.     Color3.fromRGB(245, 245, 255),--Text generic
  172.     Color3.fromRGB(155, 155, 255) --Text highlight
  173. }
  174.  
  175.  
  176. local SelectedTheme = math.random(1,6)
  177. if SelectedTheme == 1 then
  178.     SelectedTheme = Theme_Steel
  179. elseif SelectedTheme == 2 then
  180.     SelectedTheme = Theme_Dark
  181. elseif SelectedTheme == 3 then
  182.     SelectedTheme = Theme_Rust
  183. elseif SelectedTheme == 4 then
  184.     SelectedTheme = Theme_Violet
  185. elseif SelectedTheme == 5 then
  186.     SelectedTheme = Theme_Space
  187. elseif SelectedTheme == 6 then
  188.     if syn then
  189.         SelectedTheme = Theme_SynX
  190.     else
  191.         SelectedTheme = Theme_JeffStandard
  192.     end
  193. end
  194.  
  195.  
  196. --[[instances:]]--
  197. local ScreenGui = Instance.new("ScreenGui")
  198. local TitleBar = Instance.new("Frame")
  199. local Shadow = Instance.new("Frame")
  200. local Menu = Instance.new("ScrollingFrame")
  201.  
  202. local TitleText = Instance.new("TextLabel")
  203. local TitleTextShadow = Instance.new("TextLabel")
  204. local CreditText = Instance.new("TextLabel")
  205. local SuggestionText = Instance.new("TextLabel")
  206.  
  207. local SpeedBox = Instance.new("TextBox")
  208. local Hotkey = Instance.new("TextBox")
  209.  
  210. local SpeedUp = Instance.new("TextButton")
  211. local SpeedDown = Instance.new("TextButton")
  212. local ToggleFling = Instance.new("TextButton")
  213. local ToggleServerKill = Instance.new("TextButton")
  214. local NoVertGain = Instance.new("TextButton")
  215. local Respawn = Instance.new("TextButton")
  216. local CloseButton = Instance.new("TextButton")
  217.  
  218. --local BodyThrust = Instance.new("BodyThrust")
  219.  
  220. ScreenGui.Name = "JeffFling"
  221. ScreenGui.Parent = game.CoreGui
  222. ScreenGui.Enabled = true
  223.  
  224. TitleBar.Name = "Title Bar"
  225. TitleBar.Parent = ScreenGui
  226. TitleBar.BackgroundColor3 = SelectedTheme[1]
  227. TitleBar.BorderColor3 = SelectedTheme[3]
  228. TitleBar.Position = UDim2.new(-0.3, 0, 0.7, 0)
  229. TitleBar.Size = UDim2.new(0, 400, 0, 250)
  230. TitleBar.Draggable = true
  231. TitleBar.Active = true
  232. TitleBar.Selectable = true
  233. TitleBar.ZIndex = 100
  234.  
  235. Shadow.Name = "Shadow"
  236. Shadow.Parent = TitleBar
  237. Shadow.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  238. Shadow.BackgroundTransparency = 0.5
  239. Shadow.BorderSizePixel = 0
  240. Shadow.Position = UDim2.new(0, 5, 0, 5)
  241. Shadow.Size = TitleBar.Size
  242. Shadow.ZIndex = 50
  243.  
  244. Menu.Name = "Menu"
  245. Menu.Parent = TitleBar
  246. Menu.BackgroundColor3 = SelectedTheme[2]
  247. Menu.BorderColor3 = SelectedTheme[3]
  248. Menu.AnchorPoint = Vector2.new(0,0)
  249. Menu.Position = UDim2.new(0, 0, 0, 50)
  250. Menu.Size = UDim2.new(0, 400, 0, 200)
  251. Menu.CanvasSize = UDim2.new(0, TitleBar.Size.X, 0, 325)
  252. Menu.ScrollBarImageTransparency = 0.5
  253. Menu.ZIndex = 200
  254.  
  255. TitleText.Name = "Title Text"
  256. TitleText.Parent = TitleBar
  257. TitleText.AnchorPoint = Vector2.new(0, 0)
  258. TitleText.Position = UDim2.new(0, 100, 0, 25)
  259. TitleText.Font = font
  260. TitleText.Text = "Fling GUI "..version
  261. TitleText.TextColor3 = SelectedTheme[8]
  262. TitleText.TextSize = 28
  263. TitleText.ZIndex = 300
  264. TitleText.BackgroundTransparency = 1
  265.  
  266. TitleTextShadow.Name = "Shadow"
  267. TitleTextShadow.Parent = TitleText
  268. TitleTextShadow.Font = font
  269. TitleTextShadow.Text = "Fling GUI "..version
  270. TitleTextShadow.TextSize = 28
  271. TitleTextShadow.TextColor3 = Color3.fromRGB(0, 0, 0)
  272. TitleTextShadow.TextTransparency = 0.5
  273. TitleTextShadow.Position = UDim2.new(0, 5, 0, 5)
  274. TitleTextShadow.ZIndex = 250
  275. TitleTextShadow.BackgroundTransparency = 1
  276.  
  277. SuggestionText.Name = "Suggestion Text"
  278. SuggestionText.Parent = Menu
  279. SuggestionText.Position = UDim2.new(0, 20, 0, 250)
  280. SuggestionText.Font = font
  281. SuggestionText.Text = "e"
  282. SuggestionText.TextColor3 = SelectedTheme[7]
  283. SuggestionText.TextSize = 24
  284. SuggestionText.TextXAlignment = Enum.TextXAlignment.Left
  285. SuggestionText.ZIndex = 300
  286. SuggestionText.BackgroundTransparency = 1
  287.  
  288. CreditText.Name = "Credit Text"
  289. CreditText.Parent = Menu
  290. CreditText.Position = UDim2.new(0, 20, 0, 300)
  291. CreditText.Font = font
  292. CreditText.Text = "Made by topit"
  293. CreditText.TextColor3 = SelectedTheme[7]
  294. CreditText.TextSize = 20
  295. CreditText.TextXAlignment = Enum.TextXAlignment.Left
  296. CreditText.ZIndex = 300
  297. CreditText.BackgroundTransparency = 1
  298.  
  299. SpeedBox.Name = "Speed setting"
  300. SpeedBox.Parent = Menu
  301. SpeedBox.BackgroundColor3 = SelectedTheme[4]
  302. SpeedBox.BorderColor3 = SelectedTheme[3]
  303. SpeedBox.TextColor3 = SelectedTheme[7]
  304. SpeedBox.Position = UDim2.new(AxisPositionX[1], 0, 0, AxisPositionY[1])
  305. SpeedBox.Size = UDim2.new(0, 100, 0, 25)
  306. SpeedBox.Font = Enum.Font.FredokaOne
  307. SpeedBox.Text = "Speed: "..Fling[3]
  308. SpeedBox.PlaceholderText = "Enter custom speed"
  309. SpeedBox.TextScaled = true
  310. SpeedBox.ZIndex = 300
  311.  
  312. Hotkey.Name = "Custom Hotkey"
  313. Hotkey.Parent = Menu
  314. Hotkey.BackgroundColor3 = SelectedTheme[4]
  315. Hotkey.BorderColor3 = SelectedTheme[3]
  316. Hotkey.TextColor3 = SelectedTheme[7]
  317. Hotkey.Position = UDim2.new(AxisPositionX[2], 0, 0, AxisPositionY[3])
  318. Hotkey.Size = UDim2.new(0, 100, 0, 25)
  319. Hotkey.Font = Enum.Font.FredokaOne
  320. Hotkey.Text = "Enter new hotkey"
  321. Hotkey.PlaceholderText = "Enter new hotkey"
  322. Hotkey.TextScaled = true
  323. Hotkey.ZIndex = 300
  324.  
  325. SpeedUp.Name = "Speed Up"
  326. SpeedUp.Parent = Menu
  327. SpeedUp.BackgroundColor3 = SelectedTheme[4]
  328. SpeedUp.BorderColor3 = SelectedTheme[3]
  329. SpeedUp.TextColor3 = SelectedTheme[7]
  330. SpeedUp.Position = UDim2.new((AxisPositionX[2]), 0, 0, (AxisPositionY[1]))
  331. SpeedUp.Size = UDim2.new(0, 100, 0, 25)
  332. SpeedUp.Font = Enum.Font.FredokaOne
  333. SpeedUp.Text = "↑"
  334. SpeedUp.TextScaled = true
  335. SpeedUp.ZIndex = 300
  336.  
  337. SpeedDown.Name = "Speed Down"
  338. SpeedDown.Parent = Menu
  339. SpeedDown.BackgroundColor3 = SelectedTheme[4]
  340. SpeedDown.BorderColor3 = SelectedTheme[3]
  341. SpeedDown.TextColor3 = SelectedTheme[7]
  342. SpeedDown.Position = UDim2.new((AxisPositionX[3]), 0, 0, (AxisPositionY[1]))
  343. SpeedDown.Size = UDim2.new(0, 100, 0, 25)
  344. SpeedDown.Font = Enum.Font.FredokaOne
  345. SpeedDown.Text = "↓"
  346. SpeedDown.TextScaled = true
  347. SpeedDown.ZIndex = 300
  348.  
  349. ToggleFling.Name = "Fling toggle"
  350. ToggleFling.Parent = Menu
  351. ToggleFling.BackgroundColor3 = SelectedTheme[4]
  352. ToggleFling.BorderColor3 = SelectedTheme[3]
  353. ToggleFling.TextColor3 = SelectedTheme[7]
  354. ToggleFling.Position = UDim2.new((AxisPositionX[1]), 0, 0, (AxisPositionY[2]))
  355. ToggleFling.Size = UDim2.new(0, 100, 0, 25)
  356. ToggleFling.Font = Enum.Font.FredokaOne
  357. ToggleFling.Text = "Toggle fling"
  358. ToggleFling.TextScaled = true
  359. ToggleFling.ZIndex = 300
  360.  
  361. Respawn.Name = "Respawn"
  362. Respawn.Parent = Menu
  363. Respawn.BackgroundColor3 = SelectedTheme[4]
  364. Respawn.BorderColor3 = SelectedTheme[3]
  365. Respawn.TextColor3 = SelectedTheme[7]
  366. Respawn.Position = UDim2.new((AxisPositionX[1]), 0, 0, (AxisPositionY[3]))
  367. Respawn.Size = UDim2.new(0, 100, 0, 25)
  368. Respawn.Font = Enum.Font.FredokaOne
  369. Respawn.Text = "Fix player"
  370. Respawn.TextScaled = true
  371. Respawn.ZIndex = 300
  372.  
  373. NoVertGain.Name = "NoVertGain"
  374. NoVertGain.Parent = Menu
  375. NoVertGain.BackgroundColor3 = SelectedTheme[4]
  376. NoVertGain.BorderColor3 = SelectedTheme[3]
  377. NoVertGain.TextColor3 = SelectedTheme[7]
  378. NoVertGain.Position = UDim2.new((AxisPositionX[2]), 0, 0, (AxisPositionY[2]))
  379. NoVertGain.Size = UDim2.new(0, 100, 0, 25)
  380. NoVertGain.Font = Enum.Font.FredokaOne
  381. NoVertGain.Text = "Soften vertical fling"
  382. NoVertGain.TextScaled = true
  383. NoVertGain.ZIndex = 300
  384.  
  385. ToggleServerKill.Name = ""
  386. ToggleServerKill.Parent = Menu
  387. ToggleServerKill.BackgroundColor3 = SelectedTheme[4]
  388. ToggleServerKill.BorderColor3 = SelectedTheme[3]
  389. ToggleServerKill.TextColor3 = SelectedTheme[7]
  390. ToggleServerKill.Position = UDim2.new((AxisPositionX[3]), 0, 0, (AxisPositionY[2]))
  391. ToggleServerKill.Size = UDim2.new(0, 100, 0, 25)
  392. ToggleServerKill.Font = Enum.Font.FredokaOne
  393. ToggleServerKill.Text = "Kek server"
  394. ToggleServerKill.TextScaled = true
  395. ToggleServerKill.ZIndex = 300
  396.  
  397. CloseButton.Name = "Close Button"
  398. CloseButton.AnchorPoint = Vector2.new(1, 0)
  399. CloseButton.Parent = TitleBar
  400. CloseButton.BackgroundColor3 = SelectedTheme[4]
  401. CloseButton.BorderColor3 = SelectedTheme[3]
  402. CloseButton.TextColor3 = SelectedTheme[7]
  403. CloseButton.Position = UDim2.new(1, 0, 0, 0)
  404. CloseButton.Size = UDim2.new(0, 25, 0, 25)
  405. CloseButton.Font = Enum.Font.FredokaOne
  406. CloseButton.Text = "X"
  407. CloseButton.ZIndex = 300
  408. CloseButton.TextSize = 14
  409.  
  410. --BodyThrust.Name = "Power"
  411. --BodyThrust.Parent = plr.Character.Torso
  412. --BodyThrust.Force = Vector3.new(0, 0, 0)
  413. --BodyThrust.Location = Vector3.new(0, 0, 0)
  414.  
  415. --[[functions:]]--
  416. local function DisplayText(title, text, duration)
  417.     duration = duration or 1
  418.     game.StarterGui:SetCore("SendNotification",
  419.         {
  420.             Title = title;
  421.             Text = text;
  422.             Icon = "";
  423.             Duration = duration;
  424.         }
  425.     )
  426. end
  427.  
  428. local function DisplaySuggestion()
  429.     for i,v in pairs(Suggestions) do
  430.         if v >= 9999 and v == game.PlaceId then
  431.             DisplayText("Detected current game!","Suggested speed: "..Suggestions[i+1].." - "..Suggestions[i+2])
  432.             SuggestionText.Text = "Suggested speed: "..Suggestions[i+1].." - "..Suggestions[i+2]
  433.         end
  434.     end
  435.     if SuggestionText.Text == "e" then
  436.         SuggestionText.Text = "No suggestion for this game"
  437.     end
  438. end
  439.  
  440.  
  441. local function GetRigType()
  442.    
  443.     if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  444.         return Enum.HumanoidRigType.R15
  445.     elseif plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  446.         return Enum.HumanoidRigType.R6
  447.     else
  448.         return nil
  449.     end
  450. end
  451.  
  452. local function GetDeadState(player)
  453.     if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Dead then
  454.         return true
  455.     else
  456.         return false
  457.     end
  458. end
  459.  
  460.  
  461. local function EnableNoClip()
  462.    
  463.     if GetDeadState(plr) == false then
  464.         if GetRigType() == Enum.HumanoidRigType.R6 then
  465.             plr.Character:FindFirstChild("Torso").CanCollide            = false
  466.             plr.Character:FindFirstChild("Head").CanCollide             = false
  467.             plr.Character:FindFirstChild("HumanoidRootPart").CanCollide = false
  468.         elseif GetRigType() == Enum.HumanoidRigType.R15 then
  469.             plr.Character:FindFirstChild("UpperTorso").CanCollide       = false
  470.             plr.Character:FindFirstChild("LowerTorso").CanCollide       = false
  471.             plr.Character:FindFirstChild("Head").CanCollide             = false
  472.             plr.Character:FindFirstChild("HumanoidRootPart").CanCollide = false
  473.         end
  474.     end
  475. end
  476.  
  477. local function DisableNoClip()
  478.    
  479.     if GetDeadState(plr) == false then
  480.         if GetRigType() == Enum.HumanoidRigType.R6 then
  481.             plr.Character:FindFirstChild("Torso").CanCollide            = true
  482.             plr.Character:FindFirstChild("Head").CanCollide             = true
  483.             plr.Character:FindFirstChild("HumanoidRootPart").CanCollide = true
  484.         elseif GetRigType() == Enum.HumanoidRigType.R15 then
  485.             plr.Character:FindFirstChild("UpperTorso").CanCollide       = true
  486.             plr.Character:FindFirstChild("LowerTorso").CanCollide       = true
  487.             plr.Character:FindFirstChild("Head").CanCollide             = true
  488.             plr.Character:FindFirstChild("HumanoidRootPart").CanCollide = true
  489.         end
  490.     end
  491. end
  492.  
  493. local function OpenObject(object)
  494.     local OpenAnim = TweenService:Create(
  495.         object,
  496.         TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), --Enum.EasingStyle.Linear, Enum.EasingDirection.In
  497.         {Size = UDim2.new(0, 110, 0, 35), BackgroundColor3 = SelectedTheme[6] }
  498.     )
  499.    
  500.     OpenAnim:Play()
  501. end
  502.  
  503. local function CloseObject(object)
  504.     local CloseAnim = TweenService:Create(
  505.         object,
  506.         TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out),
  507.         {Size = UDim2.new(0, 100, 0, 25), BackgroundColor3 = SelectedTheme[4] }
  508.     )
  509.    
  510.     CloseAnim:Play()
  511. end
  512.  
  513.    
  514. local function TToggleFling()
  515.     Fling[1] = not Fling[1]
  516.     if Fling[1] then
  517.         OpenObject(ToggleFling)
  518.        
  519.         BodyThrust = Instance.new("BodyThrust")
  520.         if GetRigType() == Enum.HumanoidRigType.R6 then
  521.             BodyThrust.Parent = plr.Character.Torso
  522.         elseif GetRigType() == Enum.HumanoidRigType.R15 then
  523.             BodyThrust.Parent = plr.Character.UpperTorso
  524.         end
  525.        
  526.         EnableNoClip()
  527.         BodyThrust.Force = Vector3.new(Fling[3], 0, 0)
  528.         BodyThrust.Location = Vector3.new(0, 0, Fling[3])
  529.        
  530.        
  531.         print("Enabled fling")
  532.     else
  533.         CloseObject(ToggleFling)
  534.        
  535.         DisableNoClip()
  536.         for i, v in pairs(plr.Character:GetDescendants()) do
  537.             if v:IsA("BasePart") then
  538.             v.Velocity, v.RotVelocity = Vector3.new(0, 0, 0), Vector3.new(0, 0, 0)
  539.             end
  540.         end
  541.         BodyThrust:Destroy()
  542.        
  543.         print("Disabled fling")
  544.        
  545.     end
  546. end
  547.  
  548. local function GetIfPlayerInGame(PlayerToFind)
  549.     if PlayerService:FindFirstChild(PlayerToFind) then
  550.         return true
  551.     else
  552.         return false
  553.     end
  554. end
  555.  
  556. local function ServerKek()
  557.     local TargetList = {}
  558.     local index = 1
  559.     local playercount = 0
  560.    
  561.     if Fling[1] == true then
  562.         TToggleFling()
  563.     end
  564.    
  565.     for i,v in pairs(PlayerService:GetPlayers()) do
  566.         if v ~= plr then
  567.             playercount = playercount + 1
  568.             table.insert(TargetList, v)
  569.         end
  570.     end
  571.    
  572.     for i,v in pairs(TargetList) do
  573.        print(i,v.Name)
  574.     end
  575.    
  576.    
  577.     while Fling[4] do
  578.         if index > playercount then
  579.             CloseObject(ToggleServerKill)
  580.             DisplayText("Disabled ServerKek","Finished")
  581.             Fling[4] = false
  582.             break
  583.         else
  584.             local InGame = GetIfPlayerInGame(TargetList[index].Name)
  585.             local Dead = GetDeadState(TargetList[index])
  586.             if InGame == true and Dead == false then
  587.                 plr.Character.HumanoidRootPart.CFrame = TargetList[index].Character.HumanoidRootPart.CFrame --tp to them
  588.                
  589.                 TToggleFling() --enable fling
  590.                
  591.                 for i = 0,2,1 do
  592.                     plr.Character.HumanoidRootPart.CFrame = TargetList[index].Character.HumanoidRootPart.CFrame
  593.                     wait(0.15)
  594.                 end
  595.                
  596.                 TToggleFling() --disable fling
  597.                
  598.                 wait(0.1) --wait until disabled
  599.                
  600.                 if plr.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then --check if seated
  601.                     plr.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Running) --get out if you are
  602.                 end
  603.                
  604.                 index = index + 1 --go to next victim
  605.                
  606.                 if Fling[4] == false then
  607.                     break
  608.                 end
  609.             else
  610.                 index = index + 1
  611.             end
  612.         end
  613.     end
  614. end
  615.  
  616. --[[events:]]--
  617. CloseButton.MouseButton1Down:Connect(function()
  618.     TitleBar:TweenPosition(UDim2.new(-0.3, 0, 0.7, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 0.75)
  619.     DisplayText("Goodbye!","")
  620.     wait(0.8)
  621.     ScreenGui.Enabled = false
  622.     ScreenGui:Destroy()
  623.     script:Destroy()
  624. end)
  625.  
  626. SpeedUp.MouseButton1Down:Connect(function()
  627.     Fling[3] = Fling[3] + 50
  628.     SpeedBox.Text = "Speed: "..Fling[3]
  629.    
  630.     if Fling[1] then
  631.         BodyThrust.Force = Vector3.new(Fling[3], 0, 0)
  632.         BodyThrust.Location = Vector3.new(0, 0, Fling[3])
  633.     end
  634. end)
  635.  
  636. SpeedDown.MouseButton1Down:Connect(function()
  637.     Fling[3] = Fling[3] - 50
  638.     SpeedBox.Text = "Speed: "..Fling[3]
  639.    
  640.     if Fling[1] then
  641.         BodyThrust.Force = Vector3.new(Fling[3], 0, 0)
  642.         BodyThrust.Location = Vector3.new(0, 0, Fling[3])
  643.     end
  644. end)
  645.  
  646. SpeedBox.FocusLost:Connect(function()
  647.     Fling[3] = SpeedBox.Text:gsub("%D",""):sub(0,5)
  648.     if Fling[3] ~= nil then
  649.         SpeedBox.Text = "Speed: "..Fling[3]
  650.         if Fling[1] then
  651.             BodyThrust.Force = Vector3.new(Fling[3], 0, 0)
  652.             BodyThrust.Location = Vector3.new(0, 0, Fling[3])
  653.         end
  654.     end
  655.    
  656. end)
  657.  
  658. Hotkey.FocusLost:Connect(function()
  659.     Fling[2] = Hotkey.Text:split(" ")[1]:sub(1,1)
  660.     if Fling[2] ~= nil then
  661.         Hotkey.Text = "Hotkey: "..Fling[2]
  662.     end
  663. end)
  664.  
  665.  
  666. ToggleFling.MouseButton1Down:Connect(function()
  667.     TToggleFling()
  668. end)
  669.  
  670. Respawn.MouseButton1Down:Connect(function()
  671.        
  672.     if Fling[1] then --disable fling if its enabled
  673.         TToggleFling()
  674.     end
  675.    
  676.     wait(0.4) --wait for fling to stop
  677.    
  678.     for i=0,10,1 do
  679.         plr.Character.Humanoid:ChangeState(2) --make player recover from falling
  680.     end
  681.    
  682.     for i, v in pairs(plr.Character:GetDescendants()) do
  683.         if v:IsA("BasePart") then
  684.             v.Velocity, v.RotVelocity = Vector3.new(0, 0, 0), Vector3.new(0, 0, 0)
  685.         end
  686.     end
  687. end)
  688.  
  689. ToggleServerKill.MouseButton1Down:Connect(function()
  690.     Fling[4] = not Fling[4]
  691.     if Fling[4] then
  692.         OpenObject(ToggleServerKill)
  693.         DisplayText("Enabled ServerKek","")
  694.         ServerKek()
  695.     else
  696.         CloseObject(ToggleServerKill)
  697.         DisplayText("Disabled ServerKek","There might be a delay!")
  698.     end
  699.    
  700. end)
  701.  
  702. NoVertGain.MouseButton1Down:Connect(function()
  703.     Fling[5] = not Fling[5]
  704.     if Fling[5] then
  705.         OpenObject(NoVertGain)
  706.     else
  707.         CloseObject(NoVertGain)
  708.     end
  709. end)
  710.  
  711. RunService.Stepped:Connect(function()
  712.     if Fling[1] then
  713.         EnableNoClip()
  714.     elseif Fling[5] then
  715.         for i, v in pairs(plr.Character:GetDescendants()) do
  716.             if v:IsA("BasePart") then
  717.                 v.Velocity, v.RotVelocity = Vector3.new(0, 0, 0), Vector3.new(0, 0, 0)
  718.             end
  719.         end
  720.     end
  721. end)
  722.  
  723. TitleBar.InputBegan:Connect(function(input)
  724.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  725.         Dragging[1] = true
  726.         Dragging[2] = input.Position
  727.         Dragging[3] = TitleBar.Position
  728.     end
  729. end)
  730.  
  731. TitleBar.InputEnded:Connect(function(input)
  732.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  733.         Dragging[1] = false
  734.     end
  735. end)
  736.  
  737. UserInputService.InputChanged:Connect(function(input)
  738.     if input.UserInputType == Enum.UserInputType.MouseMovement then
  739.         if Dragging[1] then
  740.             local delta = input.Position - Dragging[2]
  741.             TitleBar:TweenPosition(UDim2.new(Dragging[3].X.Scale, Dragging[3].X.Offset + delta.X, Dragging[3].Y.Scale, Dragging[3].Y.Offset + delta.Y), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.035)
  742.             wait()
  743.         end
  744.     end
  745. end)
  746.  
  747. mouse.KeyDown:Connect(function(key)
  748.     if key == Fling[2] then
  749.         TToggleFling()
  750.     end
  751. end)
  752.  
  753.  
  754. DisplaySuggestion()
  755. TitleBar:TweenPosition(UDim2.new(0.25, 0, 0.7, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 0.75)
  756. DisplayText("Loaded Fling GUI "..version, "Made by topit", 3)
  757. return nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement