Carkzowk

Damb

Jan 9th, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. -- Instances:
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local Frame_2 = Instance.new("Frame")
  6. local TextLabel = Instance.new("TextLabel")
  7. local TextButton = Instance.new("TextButton")
  8. local CloseButton = Instance.new("TextButton") -- New Close Button
  9.  
  10. -- Properties:
  11.  
  12. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  13. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14. ScreenGui.ResetOnSpawn = false
  15. print("sub to DuplexScripts")
  16.  
  17. Frame.Parent = ScreenGui
  18. Frame.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
  19. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  20. Frame.BorderSizePixel = 0
  21. Frame.Position = UDim2.new(0.388539821, 0, 0.427821517, 0)
  22. Frame.Size = UDim2.new(0, 158, 0, 110)
  23.  
  24. Frame_2.Parent = Frame
  25. Frame_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  26. Frame_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  27. Frame_2.BorderSizePixel = 0
  28. Frame_2.Size = UDim2.new(0, 158, 0, 25)
  29.  
  30. TextLabel.Parent = Frame_2
  31. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  32. TextLabel.BackgroundTransparency = 1.000
  33. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  34. TextLabel.BorderSizePixel = 0
  35. TextLabel.Position = UDim2.new(0.112792775, 0, -0.0151660154, 0)
  36. TextLabel.Size = UDim2.new(0, 121, 0, 26)
  37. TextLabel.Font = Enum.Font.Sarpanch
  38. TextLabel.Text = "Touch Fling"
  39. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  40. TextLabel.TextSize = 25.000
  41.  
  42. TextButton.Parent = Frame
  43. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  44. TextButton.BorderColor3 = Color3.fromRGB(255, 255, 255)
  45. TextButton.BorderSizePixel = 0
  46. TextButton.Position = UDim2.new(0.113924049, 0, 0.418181807, 0)
  47. TextButton.Size = UDim2.new(0, 121, 0, 37)
  48. TextButton.Font = Enum.Font.SourceSansItalic
  49. TextButton.Text = "OFF"
  50. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  51. TextButton.TextSize = 20.000
  52.  
  53. CloseButton.Parent = Frame_2 -- Adding close button to the top bar
  54. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  55. CloseButton.BorderSizePixel = 0
  56. CloseButton.Position = UDim2.new(0.85, 0, 0.1, 0) -- Adjust position
  57. CloseButton.Size = UDim2.new(0, 20, 0, 20) -- Adjust size
  58. CloseButton.Font = Enum.Font.SourceSansBold
  59. CloseButton.Text = "X"
  60. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. CloseButton.TextSize = 16.000
  62.  
  63. -- Scripts:
  64.  
  65. local function CloseButtonScript() -- CloseButton LocalScript
  66. CloseButton.MouseButton1Click:Connect(function()
  67. ScreenGui:Destroy()
  68. end)
  69. end
  70. CloseButtonScript()
  71.  
  72. local function DragScript() -- Frame.LocalScript
  73. Frame.Active = true
  74. Frame.Draggable = true
  75. end
  76. DragScript()
  77.  
  78. local function FlingScript() -- TextButton LocalScript
  79. local script = Instance.new('LocalScript', TextButton)
  80.  
  81. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  82. local RunService = game:GetService("RunService")
  83. local Players = game:GetService("Players")
  84.  
  85. local toggleButton = script.Parent
  86. local hiddenfling = false
  87. local flingThread
  88.  
  89. if not ReplicatedStorage:FindFirstChild("juisdfj0i32i0eidsuf0iok") then
  90. local detection = Instance.new("Decal")
  91. detection.Name = "juisdfj0i32i0eidsuf0iok"
  92. detection.Parent = ReplicatedStorage
  93. end
  94.  
  95. local function fling()
  96. local lp = Players.LocalPlayer
  97. local c, hrp, vel, movel = nil, nil, nil, 0.1
  98.  
  99. while hiddenfling do
  100. RunService.Heartbeat:Wait()
  101. c = lp.Character
  102. hrp = c and c:FindFirstChild("HumanoidRootPart")
  103.  
  104. if hrp then
  105. vel = hrp.Velocity
  106. hrp.Velocity = vel * 10000 + Vector3.new(0, 10000, 0)
  107. RunService.RenderStepped:Wait()
  108. hrp.Velocity = vel
  109. RunService.Stepped:Wait()
  110. hrp.Velocity = vel + Vector3.new(0, movel, 0)
  111. movel = -movel
  112. end
  113. end
  114. end
  115.  
  116. toggleButton.MouseButton1Click:Connect(function()
  117. hiddenfling = not hiddenfling
  118. toggleButton.Text = hiddenfling and "ON" or "OFF"
  119.  
  120. if hiddenfling then
  121. flingThread = coroutine.create(fling)
  122. coroutine.resume(flingThread)
  123. else
  124. hiddenfling = false
  125. end
  126. end)
  127. end
  128. coroutine.wrap(FlingScript)()
Advertisement
Add Comment
Please, Sign In to add comment