-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathventi-v2.lua
272 lines (225 loc) · 10.2 KB
/
venti-v2.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
-- player fling gui
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ScreenGui = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local TextBox = Instance.new("TextBox")
local TextButton = Instance.new("TextButton")
local SuggestedText = Instance.new("TextLabel") -- New suggested text label
ScreenGui.Parent = Player:WaitForChild("PlayerGui")
ScreenGui.ResetOnSpawn = false
Frame.Parent = ScreenGui
Frame.BackgroundColor3 = Color3.fromRGB(33, 33, 33)
Frame.Position = UDim2.new(0.5, -100, 0.5, -50)
Frame.Size = UDim2.new(0, 200, 0, 100)
Frame.Active = true
Frame.Draggable = true
TextBox.Parent = Frame
TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TextBox.Position = UDim2.new(0.1, 0, 0.2, 0)
TextBox.Size = UDim2.new(0.8, 0, 0.2, 0)
TextBox.Font = Enum.Font.SourceSans
TextBox.PlaceholderText = "Enter username"
TextBox.Text = ""
TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
TextBox.TextSize = 14
SuggestedText.Parent = Frame -- New suggested text label settings
SuggestedText.BackgroundTransparency = 1
SuggestedText.Position = TextBox.Position
SuggestedText.Size = TextBox.Size
SuggestedText.Font = Enum.Font.SourceSans
SuggestedText.Text = ""
SuggestedText.TextColor3 = Color3.fromRGB(169, 169, 169) -- Gray text
SuggestedText.TextSize = 14
SuggestedText.TextXAlignment = Enum.TextXAlignment.Left
TextButton.Parent = Frame
TextButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
TextButton.Position = UDim2.new(0.1, 0, 0.5, 0)
TextButton.Size = UDim2.new(0.8, 0, 0.4, 0)
TextButton.Font = Enum.Font.SourceSans
TextButton.Text = "FLING!"
TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
TextButton.TextSize = 20
-- Function to get a matching player
local function GetPlayer(Name)
Name = Name:lower()
for _, x in next, Players:GetPlayers() do
if x ~= Player then
if x.Name:lower():match("^" .. Name) or x.DisplayName:lower():match("^" .. Name) then
return x
end
end
end
return nil
end
local function AutoFillSuggestions(Name)
local lowerName = Name:lower()
for _, plr in ipairs(Players:GetPlayers()) do
if plr ~= Player and plr.Name:lower():match("^" .. lowerName) then
return plr.Name
end
end
return ""
end
-- Continuously check players every second
spawn(function()
while true do
-- Check current players
local playerList = Players:GetPlayers()
-- Any other actions needed for player list updates can be implemented here
task.wait(1) -- Check every second
end
end)
local function Message(_Title, _Text, Time)
game:GetService("StarterGui"):SetCore("SendNotification", {Title = _Title, Text = _Text, Duration = Time})
end
local function SkidFling(TargetPlayer)
local Character = Player.Character
local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
local RootPart = Humanoid and Humanoid.RootPart
local TCharacter = TargetPlayer.Character
local THumanoid = TCharacter and TCharacter:FindFirstChildOfClass("Humanoid")
local TRootPart = THumanoid and THumanoid.RootPart
local THead = TCharacter and TCharacter:FindFirstChild("Head")
local Accessory = TCharacter and TCharacter:FindFirstChildOfClass("Accessory")
local Handle = Accessory and Accessory:FindFirstChild("Handle")
if Character and Humanoid and RootPart then
if RootPart.Velocity.Magnitude < 50 then
getgenv().OldPos = RootPart.CFrame
end
if THumanoid and THumanoid.Sit then
return Message("Error Occurred", "Target is sitting", 5)
end
if THead then
workspace.CurrentCamera.CameraSubject = THead
elseif Handle then
workspace.CurrentCamera.CameraSubject = Handle
else
workspace.CurrentCamera.CameraSubject = THumanoid
end
if not TCharacter:FindFirstChildWhichIsA("BasePart") then
return
end
local function FPos(BasePart, Pos, Ang)
RootPart.CFrame = CFrame.new(BasePart.Position) * Pos * Ang
Character:SetPrimaryPartCFrame(CFrame.new(BasePart.Position) * Pos * Ang)
RootPart.Velocity = Vector3.new(9e7, 9e7 * 10, 9e7)
RootPart.RotVelocity = Vector3.new(9e8, 9e8, 9e8)
end
local function SFBasePart(BasePart)
local TimeToWait = 2
local Time = tick()
local Angle = 0
repeat
if RootPart and THumanoid then
if BasePart.Velocity.Magnitude < 50 then
Angle = Angle + 100
FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle),0 ,0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(2.25, 1.5, -2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(-2.25, -1.5, 2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
task.wait()
else
FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, -THumanoid.WalkSpeed), CFrame.Angles(0, 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, -TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(0, 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(math.rad(90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5 ,0), CFrame.Angles(math.rad(-90), 0, 0))
task.wait()
FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
task.wait()
end
else
break
end
until BasePart.Velocity.Magnitude > 500 or BasePart.Parent ~= TargetPlayer.Character or TargetPlayer.Parent ~= Players or not TargetPlayer.Character == TCharacter or THumanoid.Sit or Humanoid.Health <= 0 or tick() > Time + TimeToWait
end
workspace.FallenPartsDestroyHeight = 0/0
local BV = Instance.new("BodyVelocity")
BV.Name = "EpixVel"
BV.Parent = RootPart
BV.Velocity = Vector3.new(9e8, 9e8, 9e8)
BV.MaxForce = Vector3.new(1/0, 1/0, 1/0)
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
if TRootPart and THead then
if (TRootPart.CFrame.p - THead.CFrame.p).Magnitude > 5 then
SFBasePart(THead)
else
SFBasePart(TRootPart)
end
elseif TRootPart and not THead then
SFBasePart(TRootPart)
elseif not TRootPart and THead then
SFBasePart(THead)
elseif not TRootPart and not THead and Accessory and Handle then
SFBasePart(Handle)
else
return Message("Error Occurred", "Target is missing everything", 5)
end
BV:Destroy()
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, true)
workspace.CurrentCamera.CameraSubject = Humanoid
repeat
RootPart.CFrame = getgenv().OldPos * CFrame.new(0, .5, 0)
Character:SetPrimaryPartCFrame(getgenv().OldPos * CFrame.new(0, .5, 0))
Humanoid:ChangeState("GettingUp")
table.foreach(Character:GetChildren(), function(_, x)
if x:IsA("BasePart") then
x.Velocity, x.RotVelocity = Vector3.new(), Vector3.new()
end
end)
task.wait()
until (RootPart.Position - getgenv().OldPos.p).Magnitude < 25
workspace.FallenPartsDestroyHeight = getgenv().FPDH
else
return Message("Error Occurred", "Random error", 5)
end
end
TextButton.MouseButton1Click:Connect(function()
local targetName = TextBox.Text
local targetPlayer = GetPlayer(targetName)
if targetPlayer then
SkidFling(targetPlayer)
else
Message("Error Occurred", "Invalid username", 5)
end
end)
TextBox:GetPropertyChangedSignal("Text"):Connect(function()
local inputText = TextBox.Text
local suggestion = AutoFillSuggestions(inputText)
if suggestion ~= "" and #inputText > 0 then
SuggestedText.Text = suggestion -- Show suggestion
else
SuggestedText.Text = "" -- Clear suggestion if no match
end
end)
TextBox.FocusLost:Connect(function(enterPressed)
if enterPressed then
return -- Don't auto-complete if enter was pressed
end
local inputText = TextBox.Text
local suggestion = AutoFillSuggestions(inputText)
if suggestion ~= "" then
TextBox.Text = suggestion -- Auto-complete if text matches a suggestion
SuggestedText.Text = "" -- Clear suggestion
end
end)