Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bodyvel_Name = "FlingVelocity"
- local userinputs = game:GetService("UserInputService")
- local w = game:GetService("Workspace")
- local r = game:GetService("RunService")
- local d = game:GetService("Debris")
- local strength = 850
- local fling = true
- local ScreenGui = Instance.new("ScreenGui")
- local SuperFling = Instance.new("TextButton")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- SuperFling.Name = "SuperFling"
- SuperFling.Parent = ScreenGui
- SuperFling.BackgroundColor3 = Color3.fromRGB(18, 255, 6)
- SuperFling.BorderColor3 = Color3.fromRGB(0, 0, 0)
- SuperFling.BorderSizePixel = 2
- SuperFling.Position = UDim2.new(0.918388188, 0, 0.529877484, 0)
- SuperFling.Size = UDim2.new(0.0603257343, 0, 0.085752748, 0)
- SuperFling.Font = Enum.Font.SciFi
- SuperFling.Text = "Super Fling: ON!"
- SuperFling.TextColor3 = Color3.fromRGB(0, 0, 0)
- SuperFling.TextSize = 7
- SuperFling.TextStrokeColor3 = Color3.fromRGB(18, 255, 6)
- SuperFling.TextStrokeTransparency = 0.000
- SuperFling.TextWrapped = true
- SuperFling.MouseButton1Up:Connect(function()
- if fling then
- fling = false
- SuperFling.Text = "Super Fling: OFF!"
- SuperFling.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- SuperFling.TextStrokeColor3 = Color3.fromRGB(255, 0, 0)
- else
- fling = true
- SuperFling.Text = "Super Fling: ON!"
- SuperFling.BackgroundColor3 = Color3.fromRGB(18, 255, 6)
- SuperFling.TextStrokeColor3 = Color3.fromRGB(18, 255, 6)
- end
- end)
- w.ChildAdded:Connect(function(model)
- if model.Name == "GrabParts" then
- local part_to_impulse = model["GrabPart"]["WeldConstraint"].Part1
- if part_to_impulse then
- print("Part found!")
- local inputObj
- local velocityObj = Instance.new("BodyVelocity", part_to_impulse)
- model:GetPropertyChangedSignal("Parent"):Connect(function()
- if not model.Parent then
- if fling then
- print("Launched!")
- velocityObj.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- velocityObj.Velocity = workspace.CurrentCamera.CFrame.lookVector * strength
- d:AddItem(velocityObj, 1)
- else
- velocityObj.MaxForce = Vector3.new(0,0,0)
- d:AddItem(velocityObj, 1)
- print("Cancel Launch!")
- end
- end
- end)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement