something i vibecoded in a few hours, was trying to make the wheel fling the player but ended up making this instead. it's by no means good but when it works it's funny af.
only works outside the prison, but works at the prison walls and car park. that's the best place to use it.
No comments yet. Be the first to comment!
1local Players = game:GetService("Players")
2local RunService = game:GetService("RunService")
3local CoreGui = game:GetService("CoreGui")
4
5-- ========================================================
6-- CLEAN MINIMALIST INTERFACE DESIGN
7-- ========================================================
8local ScreenGui = Instance.new("ScreenGui")
9ScreenGui.Name = "FlingControllerUI"
10-- Safely parent to CoreGui so it persists and doesn't get wiped by game menus
11ScreenGui.Parent = CoreGui:FindFirstChild("RobloxGui") or CoreGui
12
13local MainFrame = Instance.new("Frame")
14MainFrame.Size = UDim2.new(0, 240, 0, 180)
15MainFrame.Position = UDim2.new(0.5, -120, 0.4, -90)
16MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
17MainFrame.BorderSizePixel = 0
18MainFrame.Active = true
19MainFrame.Draggable = true -- Allows you to drag the UI anywhere on your screen
20MainFrame.Parent = ScreenGui
21
22-- UI Corner Styling
23local Corner = Instance.new("UICorner")
24Corner.CornerRadius = UDim.new(0, 8)
25Corner.Parent = MainFrame
26
27local TitleLabel = Instance.new("TextLabel")
28TitleLabel.Size = UDim2.new(1, 0, 0, 30)
29TitleLabel.BackgroundTransparency = 1
30TitleLabel.Text = "🚗 VEHICLE FLING CONTROLLER"
31TitleLabel.TextColor3 = Color3.fromRGB(240, 240, 240)
32TitleLabel.Font = Enum.Font.SourceSansBold
33TitleLabel.TextSize = 14
34TitleLabel.Parent = MainFrame
35
36-- Username Entry Input Box
37local UserInput = Instance.new("TextBox")
38UserInput.Size = UDim2.new(0, 200, 0, 35)
39UserInput.Position = UDim2.new(0.5, -100, 0, 40)
40UserInput.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
41UserInput.BorderSizePixel = 0
42UserInput.Text = ""
43UserInput.PlaceholderText = "Enter target username..."
44UserInput.TextColor3 = Color3.fromRGB(255, 255, 255)
45UserInput.PlaceholderColor3 = Color3.fromRGB(150, 150, 150)
46UserInput.Font = Enum.Font.SourceSans
47UserInput.TextSize = 14
48UserInput.Parent = MainFrame
49
50local InputCorner = Instance.new("UICorner")
51InputCorner.CornerRadius = UDim.new(0, 5)
52InputCorner.Parent = UserInput
53
54-- Launch / Hunt Button
55local ActionButton = Instance.new("TextButton")
56ActionButton.Size = UDim2.new(0, 200, 0, 35)
57ActionButton.Position = UDim2.new(0.5, -100, 0, 85)
58ActionButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
59ActionButton.BorderSizePixel = 0
60ActionButton.Text = "HUNT & FLING"
61ActionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
62ActionButton.Font = Enum.Font.SourceSansBold
63ActionButton.TextSize = 14
64ActionButton.Parent = MainFrame
65
66local ButtonCorner = Instance.new("UICorner")
67ButtonCorner.CornerRadius = UDim.new(0, 5)
68ButtonCorner.Parent = ActionButton
69
70-- Reset / Panic Button
71local ResetButton = Instance.new("TextButton")
72ResetButton.Size = UDim2.new(0, 200, 0, 35)
73ResetButton.Position = UDim2.new(0.5, -100, 0, 130)
74ResetButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
75ResetButton.BorderSizePixel = 0
76ResetButton.Text = "PANIC RESET (RESET CHAR)"
77ResetButton.TextColor3 = Color3.fromRGB(255, 255, 255)
78ResetButton.Font = Enum.Font.SourceSansBold
79ResetButton.TextSize = 12
80ResetButton.Parent = MainFrame
81
82local ResetCorner = Instance.new("UICorner")
83ResetCorner.CornerRadius = UDim.new(0, 5)
84ResetCorner.Parent = ResetButton
85
86-- ========================================================
87-- MECHANICS EXECUTION LOGIC
88-- ========================================================
89local currentConnection = nil
90
91-- Helper function to find a partial or full matching name in server
92local function findPartialPlayer(name)
93 for _, p in pairs(Players:GetPlayers()) do
94 if p.Name:lower():sub(1, #name) == name:lower() or p.DisplayName:lower():sub(1, #name) == name:lower() then
95 return p
96 end
97 end
98 return nil
99end
100
101ActionButton.MouseButton1Click:Connect(function()
102 -- Stop any current hunt tracking loops running in background
103 if currentConnection then
104 currentConnection:Disconnect()
105 currentConnection = nil
106 ActionButton.Text = "HUNT & FLING"
107 ActionButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
108 print("Hunt tracking safely stopped.")
109 return
110 end
111
112 local localPlayer = Players.LocalPlayer
113 local localChar = localPlayer.Character
114 local localHumanoid = localChar and localChar:FindFirstChildOfClass("Humanoid")
115
116 -- 1. Check if YOU are sitting in a car seat
117 local car = nil
118 if localHumanoid and localHumanoid.SeatPart then
119 local obj = localHumanoid.SeatPart
120 while obj and obj.Parent ~= workspace:FindFirstChild("CarContainer") and obj.Parent ~= workspace do
121 obj = obj.Parent
122 end
123 if obj and obj.Parent == workspace:FindFirstChild("CarContainer") then
124 car = obj
125 end
126 else
127 ActionButton.Text = "SIT IN A CAR FIRST!"
128 task.wait(1.5)
129 ActionButton.Text = "HUNT & FLING"
130 return warn("Aborting: You must be sitting inside a car before running this script!")
131 end
132
133 if not car then
134 ActionButton.Text = "CAR LAYER DETECT FAILED"
135 task.wait(1.5)
136 ActionButton.Text = "HUNT & FLING"
137 return warn("Detection failed: Could not map your seat to a valid vehicle inside CarContainer.")
138 end
139
140 local wheelsFolder = car:FindFirstChild("Wheels")
141 local wheel = wheelsFolder and wheelsFolder:GetChildren()[4]
142
143 -- 2. Find and Validate Target
144 local targetPlayer = findPartialPlayer(UserInput.Text)
145 local targetChar = targetPlayer and targetPlayer.Character
146
147 if not targetChar or not targetChar:FindFirstChild("HumanoidRootPart") or not wheel then
148 ActionButton.Text = "TARGET NOT FOUND / NO PART"
149 task.wait(1.5)
150 ActionButton.Text = "HUNT & FLING"
151 return warn("Target player or their parts not found!")
152 end
153
154 local targetRoot = targetChar.HumanoidRootPart
155 local localRoot = localChar.HumanoidRootPart
156
157 -- Update UI state to show hunt loop is active
158 ActionButton.Text = "STOP HUNTING (ACTIVE)"
159 ActionButton.BackgroundColor3 = Color3.fromRGB(230, 140, 0)
160
161 -- 3. Run Your Custom Continuous Hunt Loop Mechanics
162 local targetIsSeatedInMyCar = false
163 local flingActive = false
164 local flingStartTime = 0
165
166 currentConnection = RunService.Heartbeat:Connect(function()
167 if not targetChar or not targetRoot or not wheel or not car or not localChar or not localRoot then
168 if currentConnection then currentConnection:Disconnect() end
169 currentConnection = nil
170 ActionButton.Text = "HUNT & FLING"
171 ActionButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
172 return
173 end
174
175 -- Turn off your local character's collision so you don't fling yourself
176 for _, part in pairs(localChar:GetDescendants()) do
177 if part:IsA("BasePart") then
178 part.CanCollide = false
179 end
180 end
181
182 -- STAGE 1: Check if the player has sat down in your car yet
183 if not targetIsSeatedInMyCar then
184 local targetHumanoid = targetChar:FindFirstChildOfClass("Humanoid")
185 if targetHumanoid and targetHumanoid.SeatPart and targetHumanoid.SeatPart:IsDescendantOf(car) then
186 targetIsSeatedInMyCar = true
187 flingActive = true
188 flingStartTime = os.clock()
189 print("Target successfully trapped in your car! Activating fling physics...")
190 end
191 end
192
193 -- STAGE 2: Execute fling forces
194 if flingActive then
195 if os.clock() - flingStartTime > 0.5 then
196 if currentConnection then currentConnection:Disconnect() end
197 currentConnection = nil
198 ActionButton.Text = "HUNT & FLING"
199 ActionButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
200 print("Fling complete.")
201 return
202 end
203
204 wheel.AssemblyAngularVelocity = Vector3.new(99999, 99999, 99999)
205 wheel.AssemblyLinearVelocity = Vector3.new(99999, 99999, 99999)
206 else
207 wheel.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
208 wheel.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
209 end
210
211 -- CONTINUOUS REPEAT TELEPORTATION
212 localRoot.CFrame = targetRoot.CFrame * CFrame.new(0, -2, 0)
213 localRoot.Velocity = Vector3.new(0, 0, 0)
214 wheel.CFrame = targetRoot.CFrame
215 end)
216end)
217
218-- Panic Button Action
219ResetButton.MouseButton1Click:Connect(function()
220 -- Disconnect hunt if it's active
221 if currentConnection then
222 currentConnection:Disconnect()
223 currentConnection = nil
224 ActionButton.Text = "HUNT & FLING"
225 ActionButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
226 end
227
228 -- Clear out your humanoid health to instantly respawn out of glitch coordinates
229 local localChar = Players.LocalPlayer.Character
230 local localHumanoid = localChar and localChar:FindFirstChildOfClass("Humanoid")
231 if localHumanoid then
232 localHumanoid.Health = 0
233 print("Panic reset executed.")
234 end
235end)