0% found this document useful (0 votes)
9 views2 pages

Message

The document is a Lua script for a Roblox game that creates a GUI button called 'Super Fling' which toggles a fling feature on and off. When activated, it applies a strong velocity to a specific part in the game world, allowing it to be launched. The script also includes functionality to change the button's appearance and text based on the fling state.

Uploaded by

fayoza72012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Message

The document is a Lua script for a Roblox game that creates a GUI button called 'Super Fling' which toggles a fling feature on and off. When activated, it applies a strong velocity to a specific part in the game world, allowing it to be launched. The script also includes functionality to change the button's appearance and text based on the fling state.

Uploaded by

fayoza72012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

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)

You might also like