Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Frame_2 = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local CloseButton = Instance.new("TextButton") -- New Close Button
- -- Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ScreenGui.ResetOnSpawn = false
- print("sub to DuplexScripts")
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0.388539821, 0, 0.427821517, 0)
- Frame.Size = UDim2.new(0, 158, 0, 110)
- Frame_2.Parent = Frame
- Frame_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Frame_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame_2.BorderSizePixel = 0
- Frame_2.Size = UDim2.new(0, 158, 0, 25)
- TextLabel.Parent = Frame_2
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.BorderSizePixel = 0
- TextLabel.Position = UDim2.new(0.112792775, 0, -0.0151660154, 0)
- TextLabel.Size = UDim2.new(0, 121, 0, 26)
- TextLabel.Font = Enum.Font.Sarpanch
- TextLabel.Text = "Touch Fling"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 25.000
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.BorderColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.113924049, 0, 0.418181807, 0)
- TextButton.Size = UDim2.new(0, 121, 0, 37)
- TextButton.Font = Enum.Font.SourceSansItalic
- TextButton.Text = "OFF"
- TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.TextSize = 20.000
- CloseButton.Parent = Frame_2 -- Adding close button to the top bar
- CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- CloseButton.BorderSizePixel = 0
- CloseButton.Position = UDim2.new(0.85, 0, 0.1, 0) -- Adjust position
- CloseButton.Size = UDim2.new(0, 20, 0, 20) -- Adjust size
- CloseButton.Font = Enum.Font.SourceSansBold
- CloseButton.Text = "X"
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.TextSize = 16.000
- -- Scripts:
- local function CloseButtonScript() -- CloseButton LocalScript
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- end
- CloseButtonScript()
- local function DragScript() -- Frame.LocalScript
- Frame.Active = true
- Frame.Draggable = true
- end
- DragScript()
- local function FlingScript() -- TextButton LocalScript
- local script = Instance.new('LocalScript', TextButton)
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local RunService = game:GetService("RunService")
- local Players = game:GetService("Players")
- local toggleButton = script.Parent
- local hiddenfling = false
- local flingThread
- if not ReplicatedStorage:FindFirstChild("juisdfj0i32i0eidsuf0iok") then
- local detection = Instance.new("Decal")
- detection.Name = "juisdfj0i32i0eidsuf0iok"
- detection.Parent = ReplicatedStorage
- end
- local function fling()
- local lp = Players.LocalPlayer
- local c, hrp, vel, movel = nil, nil, nil, 0.1
- while hiddenfling do
- RunService.Heartbeat:Wait()
- c = lp.Character
- hrp = c and c:FindFirstChild("HumanoidRootPart")
- if hrp then
- vel = hrp.Velocity
- hrp.Velocity = vel * 10000 + Vector3.new(0, 10000, 0)
- RunService.RenderStepped:Wait()
- hrp.Velocity = vel
- RunService.Stepped:Wait()
- hrp.Velocity = vel + Vector3.new(0, movel, 0)
- movel = -movel
- end
- end
- end
- toggleButton.MouseButton1Click:Connect(function()
- hiddenfling = not hiddenfling
- toggleButton.Text = hiddenfling and "ON" or "OFF"
- if hiddenfling then
- flingThread = coroutine.create(fling)
- coroutine.resume(flingThread)
- else
- hiddenfling = false
- end
- end)
- end
- coroutine.wrap(FlingScript)()
Advertisement
Add Comment
Please, Sign In to add comment