· 6 years ago · Jan 02, 2020, 11:16 PM
1-- Originally made by Racist Dolphin / Racist Penguin on V3RM
2-- Edited and used by TechnicallyCode
3-- Heavy credits to Racist Dolphin for base code.
4
5--[[
6 API:
7 funcs:CreateLoop(name, function, wait (number or event)) Example below.
8 funcs:RunLoop(name, function(optional), wait(optional))
9 funcs:StopLoop(name)
10 funcs:DestroyLoop(name)
11 funcs:DestroyAllLoops(name)
12 funcs:CreateBackup(name, path, index, function)
13 funcs:RestoreBackups()
14]]
15
16if getgenv().pl_haxx then return end -- Prevent script being executed multiple times.
17
18local ps = game:GetService("Players")
19local i = game:GetService("UserInputService")
20local r = game:GetService("RunService")
21local cg = game:GetService("CoreGui")
22local sg = game:GetService("StarterGui")
23local ts = game:GetService("TweenService")
24local rs = game:GetService("ReplicatedStorage")
25local sc = game:GetService("ScriptContext")
26local ms = game:GetService("MarketplaceService")
27local tms = game:GetService("Teams")
28local http = game:GetService("HttpService")
29local light = game:GetService("Lighting")
30local pathservice = game:GetService("PathfindingService")
31local p = ps.LocalPlayer
32local c = p.Character
33local mo = p:GetMouse()
34local b = p:FindFirstChild("Backpack") or p:WaitForChild("Backpack")
35local g = p:FindFirstChild("PlayerGui") or p:WaitForChild("PlayerGui")
36local ca = workspace.CurrentCamera
37
38local loadtime = tick()
39
40local gamePlaceId = game.PlaceId
41if gamePlaceId ~= 155615604 then
42 p:Kick("PLHaxx does not work here.")
43end
44
45local hint = Instance.new("Hint", cg)
46hint.Text = "PLHaxx: Initializing GUI, please wait!"
47wait(1)
48
49local getupval = debug.getupvalue or getupval
50local getupvals = debug.getupvalues or getupvals
51local getreg = debug.getregistry or getreg
52local setupval = debug.setupvalue or setupval
53local getlocal = debug.getlocal or getlocal
54local getlocals = debug.getlocals or getlocals
55local setlocal = debug.setlocal or setlocal
56local getconst = debug.getconstant or getconst
57local getconsts = debug.getconstants or getconsts
58local setconst = debug.setconstant or setconst
59local setreadonly = make_writeable or setreadonly
60
61if syn == nil then
62 return p:Kick("PLHaxx does not support your exploit. Please use Synapse X.")
63end
64
65local allWorkspace = { }
66
67local client = { }
68local patterns = { }
69local funcs = { }
70local scripts = { }
71local backups = { }
72local main = { }
73
74local fullbrightStuff = { }
75local gunStuff = { }
76local charStuff = { }
77local miscStuff = { }
78local teleStuff = { }
79local gui = { }
80local loops = { }
81
82getgenv().services = { }
83
84local myVersion = "0.0.3"
85
86local creatorAccounts = { }
87
88do -- funcs
89 funcs = {
90 data = http:JSONDecode(game:HttpGet("https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji.json"))
91 }
92
93 -- IDK who the original creator of this is but credit to that dude
94 function funcs.parseEmoji(emoji)
95 for _, v in next, funcs.data do
96 if string.lower(emoji) == v["short_name"] then
97 return utf8.char(tonumber(v["unified"], 16))
98 end
99 end
100 end
101
102 function funcs.split(self, sep)
103 local sep, fields = sep or ":", {}
104 local pattern = string.format("([^%s]+)", sep)
105 string.gsub(self, pattern, function(c) fields[#fields+1] = c end)
106 return fields
107 end
108
109 function funcs.detectEmoji(str)
110 for i = 1, #str do
111 if string.sub(str, i, i) == ":" then
112 local substr = string.sub(str, i + 1, #str)
113 local pos = string.find(substr, ":")
114 if pos then
115 return pos
116 end
117 end
118 end
119
120 return nil
121 end
122
123 function funcs.parseSemicolon(rawStr)
124 local tbl = funcs.split(rawStr, " ")
125 local newtbl = { }
126
127 for i, v in next, tbl do
128 local pos = funcs.detectEmoji(v)
129 if pos then
130 v = string.sub(v, 2, pos)
131 v = funcs.parseEmoji(v)
132 end
133 newtbl[i] = v
134 end
135
136 return table.concat(newtbl, ' ')
137 end
138
139 function funcs:LoopRunning(name)
140 return loops[name].Running
141 end
142
143 function funcs:CreateLoop(name, func, waitt, ...)
144 if loops[name] ~= nil then return end
145
146 loops[name] = { }
147 loops[name].Running = false
148 loops[name].Destroy = false
149 loops[name].Loop = coroutine.create(function(...)
150 while true do
151 if loops[name].Running then
152 func(...)
153 end
154
155 if loops[name].Destroy then
156 break
157 end
158
159 if type(wait) == "userdata" then
160 waitt:wait()
161 else
162 wait(waitt)
163 end
164 end
165 end)
166 end
167
168 function funcs:RunLoop(name, waitt, func, ...)
169 if loops[name] == nil then
170 if func ~= nil then
171 self:CreateLoop(name, func, waitt, ...)
172 end
173 end
174
175 loops[name].Running = true
176 local succ, out = coroutine.resume(loops[name].Loop)
177 if not succ then
178 warn("Loop: " .. tostring(name) .. " ERROR: " .. tostring(out))
179 end
180 end
181
182 function funcs:StopLoop(name)
183 if loops[name] == nil then return end
184
185 loops[name].Running = false
186 end
187
188 function funcs:DestroyLoop(name)
189 if loops[name] == nil then return end
190
191 self:StopLoop(name)
192 loops[name].Destroy = true
193
194 loops[name] = nil
195 end
196
197 function funcs:AddComma(str) -- stole from Mining Simulator :)
198 local f, k = str, nil
199 while true do
200 f, k = string.gsub(f, "^(-?%d+)(%d%d%d)", "%1,%2")
201 if k == 0 then
202 break
203 end
204 end
205 return f
206 end
207
208 function funcs:deepcopy(orig) -- http://lua-users.org/wiki/CopyTable
209 local orig_type = type(orig)
210 local copy
211 if orig_type == 'table' then
212 copy = {}
213 for orig_key, orig_value in next, orig, nil do
214 copy[funcs:deepcopy(orig_key)] = funcs:deepcopy(orig_value)
215 end
216 setmetatable(copy, funcs:deepcopy(getmetatable(orig)))
217 else -- number, string, boolean, etc
218 copy = orig
219 end
220 return copy
221 end
222
223 function funcs:GetSizeOfObj(obj)
224 if obj:IsA("BasePart") then
225 return obj.Size
226 elseif obj:IsA("Model") then
227 return obj:GetExtentsSize()
228 end
229 end
230
231 function funcs:GetTeamColor(plr)
232 if p.Team == plr.Team then
233 return Color3.new(0, 1, 0)
234 end
235
236 return Color3.new(1, 0, 0)
237 end
238
239 function funcs:GetClosestPlayer()
240 local players = { }
241 local current_closest_player = nil
242 local selected_player = nil
243
244 for i, v in pairs(ps:GetPlayers()) do
245 if v ~= p and v.Team ~= p.Team then
246 local char = v.Character
247 if c and char then
248 local my_head, my_tor, my_hum = c:FindFirstChild("Head"), c:FindFirstChild("HumanoidRootPart"), c:FindFirstChild("Humanoid")
249 local their_head, their_tor, their_hum = char:FindFirstChild("Head"), char:FindFirstChild("HumanoidRootPart"), char:FindFirstChild("Humanoid")
250 if my_head and my_tor and my_hum and their_head and their_tor and their_hum then
251 if my_hum.Health > 1 and their_hum.Health > 1 then
252 --local ray = Ray.new(ca.CFrame.p, (their_head.Position - ca.CFrame.p).unit * 2048)
253 --local part = workspace:FindPartOnRayWithIgnoreList(ray, {c, ca})
254 --if part ~= nil then
255 --if part:IsDescendantOf(char) then
256 local dist = (mo.Hit.p - their_tor.Position).magnitude
257 players[v] = dist
258 --end
259 --end
260 end
261 end
262 end
263 end
264 end
265
266 for i, v in next, players do
267 if current_closest_player ~= nil then
268 if v <= current_closest_player then
269 current_closest_player = v
270 selected_player = i
271 end
272 else
273 current_closest_player = v
274 selected_player = i
275 end
276 end
277
278 return selected_player
279 end
280
281 function funcs:TypeWriter(label, speed)
282 local speed = speed or 2
283 local text = label.Text
284 label.Text = ""
285 spawn(function()
286 for i = 1, string.len(text) do
287 if i % 2 == 0 then
288 client.sound.play("ui_typeout", 0.2)
289 end
290 label.Text = string.sub(text, 1, speed * i)
291 wait(0.016666666666666666)
292 end
293 end)
294 end
295
296 function funcs:ModifyAllVarsInTable(t, var, val)
297 for i, v in pairs(t) do
298 if i == var then
299 t[i] = val
300 end
301
302 if type(v) == "table" then
303 funcs:ModifyAllVarsInTable(t[i], var, val)
304 end
305 end
306 end
307
308 function funcs:GetWeapon(weaponName)
309 if typeof(weaponName) == "string" then
310 workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver[weaponName].ITEMPICKUP)
311 end
312 end
313
314 function funcs:KillPlayer(plr)
315 local myBackpack = p.Backpack
316 self:GetWeapon("Remington 870")
317 if myBackpack:FindFirstChild("Remington 870") then
318 local A_1 = {
319 [1] =
320 {
321 ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-391.152252, 8.65560055, -83.2166901)),
322 ["Distance"] = 3.2524313926697,
323 ["Cframe"] = CFrame.new(840.310791, 101.334137, 2267.87988, 0.0636406094, 0.151434347, -0.986416459, 0, 0.988420188, 0.151741937, 0.997972965, -0.00965694897, 0.0629036576),
324 ["Hit"] = plr.Character.Head
325 },
326 [2] =
327 {
328 ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-392.481476, -8.44939327, -76.7261353)),
329 ["Distance"] = 3.2699294090271,
330 ["Cframe"] = CFrame.new(840.290466, 101.184189, 2267.93506, 0.0964837447, 0.0589403138, -0.993587971, 4.65661287e-10, 0.998245299, 0.0592165813, 0.995334625, -0.00571343815, 0.0963144377),
331 ["Hit"] = plr.Character.Head
332 },
333 [3] =
334 {
335 ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-389.21701, -2.50536323, -92.2163162)),
336 ["Distance"] = 3.1665518283844,
337 ["Cframe"] = CFrame.new(840.338867, 101.236496, 2267.80371, 0.0166504811, 0.0941716284, -0.995416701, 1.16415322e-10, 0.995554805, 0.0941846818, 0.999861419, -0.00156822044, 0.0165764652),
338 ["Hit"] = plr.Character.Head
339 },
340 [4] =
341 {
342 ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-393.353973, 3.13988972, -72.5452042)),
343 ["Distance"] = 3.3218522071838,
344 ["Cframe"] = CFrame.new(840.277222, 101.285957, 2267.9707, 0.117109694, 0.118740402, -0.985994935, -1.86264515e-09, 0.992826641, 0.119563118, 0.993119001, -0.0140019981, 0.116269611),
345 ["Hit"] = plr.Character.Head
346 },
347 [5] =
348 {
349 ["RayObject"] = Ray.new(Vector3.new(845.555908, 101.429337, 2269.43945), Vector3.new(-390.73172, 3.2097764, -85.5477524)),
350 ["Distance"] = 3.222757101059,
351 ["Cframe"] = CFrame.new(840.317993, 101.286423, 2267.86035, 0.0517584644, 0.123365127, -0.991010666, 0, 0.992340803, 0.123530701, 0.99865967, -0.00639375951, 0.0513620302),
352 ["Hit"] = plr.Character.Head
353 }
354 }
355 local A_2 = myBackpack["Remington 870"]
356 local Event = rs.ShootEvent
357 Event:FireServer(A_1, A_2)
358 Event:FireServer(A_1, A_2)
359 end
360 end
361
362 function funcs:ChangeTeam(team)
363 if typeof(team) == "string" then
364 local remotes = workspace:FindFirstChild("Remote")
365 if remotes then
366 local teamEvent = remotes:FindFirstChild("TeamEvent")
367 if teamEvent then
368 teamEvent:FireServer(team)
369 end
370 end
371 end
372 end
373
374 function funcs:TeleportTo(cframe)
375 local newc = p.Character
376 local myTor = newc:FindFirstChild("HumanoidRootPart")
377 if myTor then
378 myTor.CFrame = cframe
379 end
380 end
381
382 function funcs:ArrestPlayer(plr)
383 local newc = p.Character
384 local myTor = newc:FindFirstChild("HumanoidRootPart")
385 local oldc = myTor.CFrame
386 if plr:IsA("Player") then
387 local remotes = workspace:FindFirstChild("Remote")
388 if remotes then
389 local arrestEvent = remotes:FindFirstChild("arrest")
390 if arrestEvent then
391 local character = plr.Character
392 if character then
393 local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
394 if humanoidRootPart then
395 self:TeleportTo(humanoidRootPart.CFrame * CFrame.new(0, 0, 1))
396 arrestEvent:InvokeServer(humanoidRootPart)
397 wait(.25)
398 if myTor then
399 self:TeleportTo(oldc)
400 end
401 end
402 end
403 end
404 end
405 end
406 end
407
408 function funcs:SuperPunch()
409 local meleeRemote = rs['meleeEvent']
410 local punching = false
411 local cooldown = false
412
413 function punch()
414 cooldown = true
415 local part = Instance.new("Part", c)
416 local w1 = Instance.new("Weld", part)
417 part.Transparency = 1
418 part.Size = Vector3.new(5, 2, 3)
419 part.CanCollide = false
420 w1.Part0 = c.Torso
421 w1.Part1 = part
422 w1.C1 = CFrame.new(0,0,2)
423 part.Touched:connect(function(hit)
424 if ps:FindFirstChild(hit.Parent.Name) then
425 local plr = ps:FindFirstChild(hit.Parent.Name)
426 if plr ~= p then
427 part:Destroy()
428 for i = 1,100 do
429 meleeRemote:FireServer(plr)
430 end
431 end
432 end
433 end)
434
435 wait(1)
436 cooldown = false
437 part:Destroy()
438 end
439
440 i.InputBegan:connect(function(key, gameProcessedEvent)
441 if cooldown == false then
442 if key.KeyCode == Enum.KeyCode.F and not gameProcessedEvent then
443 punch()
444 end
445 end
446 end)
447 end
448
449 function funcs:FindPlayer(txt)
450 local Plr = { }
451 for _, v in pairs(ps:GetPlayers()) do
452 if string.lower(string.sub(v.Name, 1, string.len(txt))) == string.lower(txt) then
453 table.insert(Plr, v)
454 end
455 end
456 if #Plr == 1 then
457 return Plr[1]
458 else
459 return nil
460 end
461 end
462
463 function funcs:CreateBackup(name, path, index, f)
464 backups[name] = { }
465 backups[name].func = f
466 backups[name].path = path
467 backups[name].index = index
468
469 return backups[name]
470 end
471
472 function funcs:RestoreBackups()
473 for i, v in next, backups do
474 v.path[index] = v.func
475 end
476 end
477
478 function funcs:AddScript(scr)
479 scripts[scr] = decompile(scr, "new")
480 return scripts[scr]
481 end
482
483 function funcs:FindPattern(scr, pattern)
484 return string.match(scripts[scr], pattern)
485 end
486
487 function funcs:FindValInTable(index, t)
488 for i, v in pairs(t) do
489 if i == index then
490 return t[i]
491 else
492 if type(v) == "function" and not is_synapse_function(v) then
493 local check = getupval(v, index)
494 if check ~= nil then
495 if type(check) ~= "table" then
496 return v
497 end
498
499 return check
500 end
501 elseif type(v) == "table" then
502 return funcs:FindValInTable(index, v)
503 end
504 end
505 end
506 end
507
508 function funcs:FindVal(name, index)
509 print("Trying to find: " .. index)
510 for i, v in next, getreg() do
511 if type(v) == "function" and not is_synapse_function(v) then
512 local check = getupval(v, index)
513 if check ~= nil then
514 if type(check) ~= "table" then
515 client[name] = v
516 return
517 end
518
519 client[name] = check
520 return
521 end
522 end
523 end
524
525 for i, v in next, getgc() do
526 if type(v) == "function" and not is_synapse_function(v) then
527 local check = getupval(v, index)
528 if check ~= nil then
529 if type(check) ~= "table" then
530 client[name] = v
531 return
532 end
533
534 client[name] = check
535 return
536 end
537 end
538 end
539
540 for i in next, scripts do
541 for i2, v2 in next, getsenv(i) do
542 if i2 == index then
543 client[name] = v2
544 return
545 else
546 if type(v2) == "function" and not is_synapse_function(v2) then
547 local check = getupval(v2, index)
548 if check ~= nil then
549 if type(check) ~= "table" then
550 client[name] = v2
551 return
552 end
553
554 client[name] = check
555 return
556 end
557 elseif type(v2) == "table" then
558 client[name] = self:FindValInTable(index, v2)
559 end
560 end
561 end
562 end
563
564 if client[name] == nil then
565 for i, v in pairs(client) do
566 if type(v) == "table" then
567 client[name] = self:FindValInTable(index, v)
568 end
569 end
570 end
571 end
572end
573
574do -- gui
575 gui = {
576 name = "Base",
577 gui_objs = {
578 main = nil,
579 mainframes = { },
580 }
581 }
582 local t = 5
583 local fromHSV = Color3.fromHSV
584 local color
585 r.RenderStepped:connect(function()
586 local hue = tick() % t / t
587 color = fromHSV(hue, 1, 1)
588 end)
589
590 -- Other Functions
591 function gui:GiveWeapons()
592 if ms:PlayerOwnsAsset(p, 96651) then
593 for _,v in pairs(workspace.Prison_ITEMS.giver:GetChildren()) do
594 if v.Name ~= "nil" then
595 funcs:GetWeapon(v.Name)
596 end
597 end
598 else
599 for _,v in pairs(workspace.Prison_ITEMS.giver:GetChildren()) do
600 if v.Name ~= "nil" or v.Name ~= "M4A1" or v.Name ~= "Riot Shield" then
601 funcs:GetWeapon(v.Name)
602 end
603 end
604 end
605 end
606 -- GUI Functions
607 function gui:AddTextBox(mainframe, text)
608 self.gui_objs.mainframes[mainframe].buttons[text] = { }
609
610 self.gui_objs.mainframes[mainframe].buttons[text].main = Instance.new("Frame")
611 self.gui_objs.mainframes[mainframe].buttons[text].main.BackgroundTransparency = 1
612 self.gui_objs.mainframes[mainframe].buttons[text].main.Name = ""
613 self.gui_objs.mainframes[mainframe].buttons[text].main.Position = UDim2.new(0, 0, 0, 5 + self.gui_objs.mainframes[mainframe].buttonsnum)
614 self.gui_objs.mainframes[mainframe].buttons[text].main.Size = UDim2.new(1, 0, 0, 15)
615 self.gui_objs.mainframes[mainframe].buttons[text].main.Parent = self.gui_objs.mainframes[mainframe].buttonsframe
616
617 self.gui_objs.mainframes[mainframe].buttons[text].textbox = Instance.new("TextBox")
618 self.gui_objs.mainframes[mainframe].buttons[text].textbox.BackgroundColor3 = Color3.new(66 / 255, 66 / 255, 66 / 255)
619 self.gui_objs.mainframes[mainframe].buttons[text].textbox.BackgroundTransparency = 0.3
620 self.gui_objs.mainframes[mainframe].buttons[text].textbox.BorderSizePixel = 0
621 self.gui_objs.mainframes[mainframe].buttons[text].textbox.Position = UDim2.new(0, 5, 0, 0)
622 self.gui_objs.mainframes[mainframe].buttons[text].textbox.Size = UDim2.new(1, -10, 1, 0)
623 self.gui_objs.mainframes[mainframe].buttons[text].textbox.Font = Enum.Font.SourceSans
624 self.gui_objs.mainframes[mainframe].buttons[text].textbox.Text = text
625 self.gui_objs.mainframes[mainframe].buttons[text].textbox.TextScaled = true
626 self.gui_objs.mainframes[mainframe].buttons[text].textbox.TextColor3 = Color3.new(1, 1, 1)
627 self.gui_objs.mainframes[mainframe].buttons[text].textbox.TextXAlignment = Enum.TextXAlignment.Left
628 self.gui_objs.mainframes[mainframe].buttons[text].textbox.Parent = self.gui_objs.mainframes[mainframe].buttons[text].main
629
630 self.gui_objs.mainframes[mainframe].main.Size = UDim2.new(0, 200, 0, 25 + self.gui_objs.mainframes[mainframe].buttonsnum)
631
632 self.gui_objs.mainframes[mainframe].buttonsnum = self.gui_objs.mainframes[mainframe].buttonsnum + 20
633
634 return self.gui_objs.mainframes[mainframe].buttons[text].textbox
635 end
636
637 function gui:AddButton(mainframe, text)
638 self.gui_objs.mainframes[mainframe].buttons[text] = { }
639
640 self.gui_objs.mainframes[mainframe].buttons[text].main = Instance.new("Frame")
641 self.gui_objs.mainframes[mainframe].buttons[text].main.BackgroundTransparency = 1
642 self.gui_objs.mainframes[mainframe].buttons[text].main.Name = ""
643 self.gui_objs.mainframes[mainframe].buttons[text].main.Position = UDim2.new(0, 0, 0, 5 + self.gui_objs.mainframes[mainframe].buttonsnum)
644 self.gui_objs.mainframes[mainframe].buttons[text].main.Size = UDim2.new(1, 0, 0, 15)
645 self.gui_objs.mainframes[mainframe].buttons[text].main.Parent = self.gui_objs.mainframes[mainframe].buttonsframe
646
647 self.gui_objs.mainframes[mainframe].buttons[text].textbutton = Instance.new("TextButton")
648 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.BackgroundTransparency = 1
649 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Position = UDim2.new(0, 5, 0, 0)
650 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Size = UDim2.new(1, -5, 1, 0)
651 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.ZIndex = 2
652 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Font = Enum.Font.SourceSans
653 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Text = text
654 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextColor3 = Color3.new(1, 1, 1)
655 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextScaled = true
656 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextXAlignment = Enum.TextXAlignment.Left
657 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Modal = true
658 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Parent = self.gui_objs.mainframes[mainframe].buttons[text].main
659
660 self.gui_objs.mainframes[mainframe].main.Size = UDim2.new(0, 200, 0, 25 + self.gui_objs.mainframes[mainframe].buttonsnum)
661
662 self.gui_objs.mainframes[mainframe].buttonsnum = self.gui_objs.mainframes[mainframe].buttonsnum + 20
663
664 return self.gui_objs.mainframes[mainframe].buttons[text].textbutton
665 end
666
667 function gui:AddToggleButton(mainframe, text, status)
668 self.gui_objs.mainframes[mainframe].buttons[text] = { }
669
670 self.gui_objs.mainframes[mainframe].buttons[text].main = Instance.new("Frame")
671 self.gui_objs.mainframes[mainframe].buttons[text].main.BackgroundTransparency = 1
672 self.gui_objs.mainframes[mainframe].buttons[text].main.Name = ""
673 self.gui_objs.mainframes[mainframe].buttons[text].main.Position = UDim2.new(0, 0, 0, 5 + self.gui_objs.mainframes[mainframe].buttonsnum)
674 self.gui_objs.mainframes[mainframe].buttons[text].main.Size = UDim2.new(1, 0, 0, 15)
675 self.gui_objs.mainframes[mainframe].buttons[text].main.Parent = self.gui_objs.mainframes[mainframe].buttonsframe
676
677 self.gui_objs.mainframes[mainframe].buttons[text].textbutton = Instance.new("TextButton")
678 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.BackgroundTransparency = 1
679 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Position = UDim2.new(0, 5, 0, 0)
680 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Size = UDim2.new(1, -5, 1, 0)
681 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.ZIndex = 2
682 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Font = Enum.Font.SourceSans
683 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Text = text
684 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextColor3 = Color3.new(1, 1, 1)
685 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextScaled = true
686 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.TextXAlignment = Enum.TextXAlignment.Left
687 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Modal = true
688 self.gui_objs.mainframes[mainframe].buttons[text].textbutton.Parent = self.gui_objs.mainframes[mainframe].buttons[text].main
689
690 self.gui_objs.mainframes[mainframe].buttons[text].textlabel = Instance.new("TextLabel")
691 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.BackgroundTransparency = 1
692 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.Position = UDim2.new(1, -25, 0, 0)
693 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.Size = UDim2.new(0, 25, 1, 0)
694 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.Font = Enum.Font.Code
695 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.Text = status and "ON" or "OFF"
696 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.TextColor3 = status and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
697 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.TextScaled = true
698 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.TextXAlignment = Enum.TextXAlignment.Right
699 self.gui_objs.mainframes[mainframe].buttons[text].textlabel.Parent = self.gui_objs.mainframes[mainframe].buttons[text].main
700
701 self.gui_objs.mainframes[mainframe].main.Size = UDim2.new(0, 200, 0, 25 + self.gui_objs.mainframes[mainframe].buttonsnum)
702
703 self.gui_objs.mainframes[mainframe].buttonsnum = self.gui_objs.mainframes[mainframe].buttonsnum + 20
704
705 return self.gui_objs.mainframes[mainframe].buttons[text].textbutton, self.gui_objs.mainframes[mainframe].buttons[text].textlabel
706 end
707
708 function gui:AddMainFrame(name)
709 if self.gui_objs.mainframes.numX == nil then self.gui_objs.mainframes.numX = 0 end
710 if self.gui_objs.mainframes.numY == nil then self.gui_objs.mainframes.numY = 0 end
711
712 self.gui_objs.mainframes[name] = { }
713 self.gui_objs.mainframes[name].buttons = { }
714
715 self.gui_objs.mainframes[name].main = Instance.new("Frame")
716 self.gui_objs.mainframes[name].main.BackgroundColor3 = Color3.new(0, 0, 0)
717 self.gui_objs.mainframes[name].main.BackgroundTransparency = 0.3
718 self.gui_objs.mainframes[name].main.BorderSizePixel = 3
719 self.gui_objs.mainframes[name].main.Name = name
720 self.gui_objs.mainframes[name].main.Position = UDim2.new(0, 50 + self.gui_objs.mainframes.numX, 0, 50 + self.gui_objs.mainframes.numY)
721 self.gui_objs.mainframes[name].main.Size = UDim2.new(0, 200, 0, 350)
722 self.gui_objs.mainframes[name].main.Active = true
723 self.gui_objs.mainframes[name].main.Draggable = true
724
725 self.gui_objs.mainframes[name].titleframe = Instance.new("Frame")
726 self.gui_objs.mainframes[name].titleframe.BackgroundColor3 = Color3.new(0, 0, 0)
727 self.gui_objs.mainframes[name].titleframe.BackgroundTransparency = 0.3
728 self.gui_objs.mainframes[name].titleframe.BorderSizePixel = 3
729 self.gui_objs.mainframes[name].titleframe.Name = "titleframe"
730 self.gui_objs.mainframes[name].titleframe.Position = UDim2.new(0, 0, 0, -35)
731 self.gui_objs.mainframes[name].titleframe.Size = UDim2.new(1, 0, 0, 25)
732 self.gui_objs.mainframes[name].titleframe.Parent = self.gui_objs.mainframes[name].main
733
734 self.gui_objs.mainframes[name].title = Instance.new("TextLabel")
735 self.gui_objs.mainframes[name].title.BackgroundTransparency = 1
736 self.gui_objs.mainframes[name].title.Name = "title"
737 self.gui_objs.mainframes[name].title.Size = UDim2.new(1, 0, 1, 0)
738 self.gui_objs.mainframes[name].title.Font = Enum.Font.Code
739 self.gui_objs.mainframes[name].title.Text = name
740 self.gui_objs.mainframes[name].title.TextColor3 = Color3.new(1, 1, 1) -- 0, 0, 1
741 self.gui_objs.mainframes[name].title.TextSize = 20
742 self.gui_objs.mainframes[name].title.Parent = self.gui_objs.mainframes[name].titleframe
743
744 self.gui_objs.mainframes[name].buttonsframe = Instance.new("Frame")
745 self.gui_objs.mainframes[name].buttonsframe.BackgroundTransparency = 1
746 self.gui_objs.mainframes[name].buttonsframe.Name = "buttons"
747 self.gui_objs.mainframes[name].buttonsframe.Size = UDim2.new(1, 0, 1, 0)
748 self.gui_objs.mainframes[name].buttonsframe.Parent = self.gui_objs.mainframes[name].main
749
750 self.gui_objs.mainframes[name].infoframe = Instance.new("Frame")
751 self.gui_objs.mainframes[name].infoframe.BackgroundColor3 = Color3.new(0, 0, 0)
752 self.gui_objs.mainframes[name].infoframe.BackgroundTransparency = 0.3
753 self.gui_objs.mainframes[name].infoframe.BorderSizePixel = 3
754 self.gui_objs.mainframes[name].infoframe.Name = "infoframe"
755 self.gui_objs.mainframes[name].infoframe.Position = UDim2.new(0, 0, 1, 10)
756 self.gui_objs.mainframes[name].infoframe.Size = UDim2.new(1, 0, 0, 35)
757 self.gui_objs.mainframes[name].infoframe.Parent = self.gui_objs.mainframes[name].main
758
759 self.gui_objs.mainframes[name].infotitle = self.gui_objs.mainframes[name].title:clone()
760 self.gui_objs.mainframes[name].infotitle.Name = "infotitle"
761 self.gui_objs.mainframes[name].infotitle.Text = "Press [P] to toggle GUI\nGUI made by: @Racist Dolphin#8943\nEdited and used by: TechnicallyCode"
762 self.gui_objs.mainframes[name].infotitle.TextColor3 = Color3.new(1, 1, 1)
763 self.gui_objs.mainframes[name].infotitle.TextScaled = true
764 self.gui_objs.mainframes[name].infotitle.Parent = self.gui_objs.mainframes[name].infoframe
765
766 self.gui_objs.mainframes[name].buttonsnum = 0
767 self.gui_objs.mainframes.numX = self.gui_objs.mainframes.numX + 250
768
769 if (50 + (self.gui_objs.mainframes.numX + 200)) >= ca.ViewportSize.X then
770 self.gui_objs.mainframes.numX = 0
771 self.gui_objs.mainframes.numY = self.gui_objs.mainframes.numY + 450
772 end
773
774 self.gui_objs.mainframes[name].main.Parent = self.gui_objs.main
775 r.RenderStepped:connect(function()
776 if color then
777 self.gui_objs.mainframes[name].main.BorderColor3 = color
778 end
779 end)
780 r.RenderStepped:connect(function()
781 if color then
782 self.gui_objs.mainframes[name].titleframe.BorderColor3 = color
783 end
784 end)
785 r.RenderStepped:connect(function()
786 if color then
787 self.gui_objs.mainframes[name].infoframe.BorderColor3 = color
788 end
789 end)
790 end
791
792 function gui:Init()
793 self.gui_objs.main = Instance.new("ScreenGui")
794 self.gui_objs.main.Name = self.name
795 self.gui_objs.main.Parent = cg
796
797 do -- Visual Cheats
798 self:AddMainFrame("Visual Cheats")
799
800 local FullbrightToggle, FullbrightStatus = self:AddToggleButton("Visual Cheats", "Fullbright", fullbrightStuff.Enabled)
801
802 FullbrightToggle.MouseButton1Click:connect(function()
803 fullbrightStuff.enabled = not fullbrightStuff.enabled
804 FullbrightStatus.Text = fullbrightStuff.enabled and "ON" or "OFF"
805 FullbrightStatus.TextColor3 = fullbrightStuff.enabled and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
806
807 if fullbrightStuff.enabled then
808 fullbrightStuff:Enable()
809 else
810 fullbrightStuff:Disable()
811 end
812 end)
813 end
814
815 do -- Gun Cheats
816 self:AddMainFrame("Gun Cheats")
817
818 --local Aimbot, AStatus = self:AddToggleButton("Gun Cheats", "Aimbot")
819 local InfAmmo, IStatus = self:AddToggleButton("Gun Cheats", "Infinite Ammo")
820 local NoSpread, SStatus = self:AddToggleButton("Gun Cheats", "No Bullet Spread")
821 local RapidFire, FStatus = self:AddToggleButton("Gun Cheats", "Rapid Fire")
822 local IncreasedBPS, BStatus = self:AddToggleButton("Gun Cheats", "Increased Bullets Per Shot")
823 local NoReload, RStatus = self:AddToggleButton("Gun Cheats", "No Reload")
824 local IncreasedBR, NStatus = self:AddToggleButton("Gun Cheats", "Increased Bullet Range")
825 local AllGunsAuto, GStatus = self:AddToggleButton("Gun Cheats", "All Guns Automatic")
826 local IncreasedDamage, DStatus = self:AddToggleButton("Gun Cheats", "Increased Damage")
827 local GiveAllWeapons = self:AddButton("Gun Cheats", "Give All Weapons")
828
829 --Aimbot.MouseButton1Click:connect(function()
830 -- gunStuff.aimbot = not gunStuff.aimbot
831 -- AStatus.Text = gunStuff.infinite_ammo and "ON" or "OFF"
832 -- AStatus.TextColor3 = gunStuff.infinite_ammo and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
833 --end)
834
835 InfAmmo.MouseButton1Click:connect(function()
836 gunStuff.infinite_ammo = not gunStuff.infinite_ammo
837 IStatus.Text = gunStuff.infinite_ammo and "ON" or "OFF"
838 IStatus.TextColor3 = gunStuff.infinite_ammo and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
839 end)
840
841 NoSpread.MouseButton1Click:connect(function()
842 gunStuff.no_spread = not gunStuff.no_spread
843 SStatus.Text = gunStuff.no_spread and "ON" or "OFF"
844 SStatus.TextColor3 = gunStuff.no_spread and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
845 end)
846
847 RapidFire.MouseButton1Click:connect(function()
848 gunStuff.rapid_fire = not gunStuff.rapid_fire
849 FStatus.Text = gunStuff.rapid_fire and "ON" or "OFF"
850 FStatus.TextColor3 = gunStuff.rapid_fire and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
851 end)
852
853 IncreasedBPS.MouseButton1Click:connect(function()
854 gunStuff.bullets_shot = not gunStuff.bullets_shot
855 BStatus.Text = gunStuff.bullets_shot and "ON" or "OFF"
856 BStatus.TextColor3 = gunStuff.bullets_shot and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
857 end)
858
859 NoReload.MouseButton1Click:connect(function()
860 gunStuff.no_reload = not gunStuff.no_reload
861 RStatus.Text = gunStuff.no_reload and "ON" or "OFF"
862 RStatus.TextColor3 = gunStuff.no_reload and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
863 end)
864
865 IncreasedBR.MouseButton1Click:connect(function()
866 gunStuff.bullet_range = not gunStuff.bullet_range
867 NStatus.Text = gunStuff.bullet_range and "ON" or "OFF"
868 NStatus.TextColor3 = gunStuff.bullet_range and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
869 end)
870
871 IncreasedDamage.MouseButton1Click:connect(function()
872 gunStuff.damage = not gunStuff.damage
873 DStatus.Text = gunStuff.damage and "ON" or "OFF"
874 DStatus.TextColor3 = gunStuff.damage and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
875 end)
876
877 AllGunsAuto.MouseButton1Click:connect(function()
878 gunStuff.automatic = not gunStuff.automatic
879 GStatus.Text = gunStuff.automatic and "ON" or "OFF"
880 GStatus.TextColor3 = gunStuff.automatic and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
881 end)
882
883 GiveAllWeapons.MouseButton1Click:connect(function()
884 self:GiveWeapons()
885 end)
886 end
887
888 do -- Character Cheats
889 self:AddMainFrame("Character Cheats")
890
891 local NoClip, NStatus = self:AddToggleButton("Character Cheats", "NoClip")
892 local AntiTaze, TStatus = self:AddToggleButton("Character Cheats", "Anti-Taze")
893 local SuperSpeed, SStatus = self:AddToggleButton("Character Cheats", "Super Speed")
894 local SuperJump, JStatus = self:AddToggleButton("Character Cheats", "Super Jump")
895 local SuperPunch = self:AddButton("Character Cheats", "Super Punch")
896
897 NoClip.MouseButton1Click:connect(function()
898 charStuff.noclip = not charStuff.noclip
899 NStatus.Text = charStuff.noclip and "ON" or "OFF"
900 NStatus.TextColor3 = charStuff.noclip and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
901 end)
902
903 SuperPunch.MouseButton1Click:connect(function()
904 funcs:SuperPunch()
905 end)
906
907 AntiTaze.MouseButton1Click:connect(function()
908 charStuff.taze = not charStuff.taze
909 TStatus.Text = charStuff.taze and "ON" or "OFF"
910 TStatus.TextColor3 = charStuff.taze and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
911 end)
912
913 SuperSpeed.MouseButton1Click:connect(function()
914 charStuff.speed = not charStuff.speed
915 SStatus.Text = charStuff.speed and "ON" or "OFF"
916 SStatus.TextColor3 = charStuff.speed and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
917 end)
918
919 SuperJump.MouseButton1Click:connect(function()
920 charStuff.jump = not charStuff.jump
921 JStatus.Text = charStuff.jump and "ON" or "OFF"
922 JStatus.TextColor3 = charStuff.jump and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
923 end)
924 end
925
926 do -- Miscellaneous Cheats
927 self:AddMainFrame("Miscellaneous Cheats")
928
929 local KillAura, KStatus = self:AddToggleButton("Miscellaneous Cheats", "Kill Aura")
930 local KillAll = self:AddButton("Miscellaneous Cheats", "Kill All")
931 local ArrestAllCriminals = self:AddButton("Miscellaneous Cheats", "Arrest All Criminals")
932 local RemoveAllDoors = self:AddButton("Miscellaneous Cheats", "Remove All Doors")
933 local Team = self:AddTextBox("Miscellaneous Cheats", "Team")
934 local ChangeTeam = self:AddButton("Miscellaneous Cheats", "Change Team")
935 local RevizAdmin = self:AddButton("Miscellaneous Cheats", "Reviz Admin")
936 local InfiniteYield = self:AddButton("Miscellaneous Cheats", "Infinite Yield FE")
937 local TopK3K = self:AddButton("Miscellaneous Cheats", "TopK3K")
938
939 KillAura.MouseButton1Click:connect(function()
940 miscStuff.kill_aura = not miscStuff.kill_aura
941 KStatus.Text = miscStuff.kill_aura and "ON" or "OFF"
942 KStatus.TextColor3 = miscStuff.kill_aura and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
943 end)
944
945 KillAll.MouseButton1Click:connect(function()
946 funcs:ChangeTeam("Medium stone grey") -- Neutral
947 funcs:GetWeapon("Remington 870")
948 wait(0.5)
949
950 for _,v in pairs(ps:GetPlayers())do
951 if v ~= p then
952 funcs:KillPlayer(v)
953 end
954 end
955 funcs:ChangeTeam("Bright orange")
956 end)
957
958 ArrestAllCriminals.MouseButton1Click:connect(function()
959 local newc = p.Character
960 local humanoid = newc:FindFirstChild("Humanoid")
961 local cpos = newc.HumanoidRootPart.CFrame
962 local cteam = p.TeamColor
963 funcs:ChangeTeam("Bright blue")
964 for i,v in pairs(tms.Criminals:GetPlayers()) do
965 if v.Name ~= p.Name then
966 local i = 10
967 if humanoid then
968 repeat wait()
969 i = i-1
970 humanoid.Sit = false
971 humanoid.PlatformStand = false
972 funcs:ArrestPlayer(v)
973 until i == 0
974 end
975 end
976 end
977 funcs:ChangeTeam("Bright orange")
978 newc.HumanoidRootPart.CFrame = cpos
979 end)
980
981 RemoveAllDoors.MouseButton1Click:connect(function()
982 local doors = workspace:FindFirstChild("Doors")
983 if doors then
984 doors:Destroy()
985 else
986 warn("Stop trying to destroy the doors after they were already destroyed you dumbshit.")
987 end
988 end)
989
990 ChangeTeam.MouseButton1Click:connect(function()
991 if Team.Text ~= "" then
992 if string.lower(Team.Text) == "guards" or string.lower(Team.Text) == "guard" then
993 funcs:ChangeTeam("Bright blue") -- Guards
994 elseif string.lower(Team.Text) == "inmates" or string.lower(Team.Text) == "inmate" then
995 funcs:ChangeTeam("Bright orange") -- Inmates
996 elseif string.lower(Team.Text) == "criminals" or string.lower(Team.Text) == "criminal" then
997 funcs:ChangeTeam("Really red") -- Criminals
998 elseif string.lower(Team.Text) == "neutral" then
999 funcs:ChangeTeam("Medium stone grey") -- Neutral
1000 end
1001 end
1002 end)
1003
1004 RevizAdmin.MouseButton1Click:connect(function()
1005 loadstring(game:HttpGet("https://pastebin.com/raw/KNUzQPYS", true))()
1006 end)
1007
1008 InfiniteYield.MouseButton1Click:connect(function()
1009 loadstring(game:HttpGet("https://pastebin.com/raw/tzTXmYf2", true))()
1010 end)
1011
1012 TopK3K.MouseButton1Click:connect(function()
1013 loadstring(game:HttpGet("https://pastebin.com/raw/r2LqpfyV", true))()
1014 end)
1015 end
1016
1017 do -- Teleport Cheats
1018 self:AddMainFrame("Teleport Cheats")
1019
1020 local CriminalBase = self:AddButton("Teleport Cheats", "Criminal Base")
1021 local Yard = self:AddButton("Teleport Cheats", "Yard")
1022 local Cafeteria = self:AddButton("Teleport Cheats", "Cafeteria")
1023 local Cells = self:AddButton("Teleport Cheats", "Jail Cells")
1024 local PoliceHQ = self:AddButton("Teleport Cheats", "Police Headquarters")
1025 local Sewer = self:AddButton("Teleport Cheats", "Sewer")
1026 local Secret = self:AddButton("Teleport Cheats", "Secret Room")
1027
1028 CriminalBase.MouseButton1Click:connect(function()
1029 funcs:TeleportTo(teleStuff.criminal)
1030 end)
1031
1032 Yard.MouseButton1Click:connect(function()
1033 funcs:TeleportTo(teleStuff.yard)
1034 end)
1035
1036 Cafeteria.MouseButton1Click:connect(function()
1037 funcs:TeleportTo(teleStuff.cafeteria)
1038 end)
1039
1040 Cells.MouseButton1Click:connect(function()
1041 funcs:TeleportTo(teleStuff.cells)
1042 end)
1043
1044 PoliceHQ.MouseButton1Click:connect(function()
1045 funcs:TeleportTo(teleStuff.police)
1046 end)
1047
1048 Sewer.MouseButton1Click:connect(function()
1049 funcs:TeleportTo(teleStuff.sewer)
1050 end)
1051
1052 Secret.MouseButton1Click:connect(function()
1053 funcs:TeleportTo(teleStuff.secret)
1054 end)
1055 end
1056
1057 do -- Player Menu
1058 self:AddMainFrame("Player Menu")
1059
1060 local PlayerName = self:AddTextBox("Player Menu", "Enter Player Name")
1061 local TeleportPlayer = self:AddButton("Player Menu", "Teleport to Player")
1062 local KillPlayer = self:AddButton("Player Menu", "Kill Player")
1063 local ArrestPlayer = self:AddButton("Player Menu", "Arrest Player")
1064
1065 TeleportPlayer.MouseButton1Click:connect(function()
1066 local nc = p.Character
1067 if PlayerName.Text ~= "" then
1068 local plr = ps:FindFirstChild(tostring(PlayerName.Text))
1069 if plr then
1070 local plrTor = plr.Character:FindFirstChild("HumanoidRootPart")
1071 if plrTor then
1072 funcs:TeleportTo(plrTor.CFrame)
1073 end
1074 end
1075 end
1076 end)
1077
1078 KillPlayer.MouseButton1Click:connect(function()
1079 funcs:KillPlayer(ps[PlayerName.Text])
1080 end)
1081
1082 ArrestPlayer.MouseButton1Click:connect(function()
1083 funcs:ArrestPlayer(ps:FindFirstChild(PlayerName.Text))
1084 end)
1085 end
1086
1087 do -- ui toggle
1088 i.InputBegan:connect(function(input, ingui)
1089 if not ingui then
1090 if input.UserInputType == Enum.UserInputType.Keyboard then
1091 if input.KeyCode == Enum.KeyCode.P then
1092 self.gui_objs.main.Enabled = not self.gui_objs.main.Enabled
1093 end
1094 end
1095 end
1096 end)
1097 end
1098 end
1099end
1100
1101do -- main
1102 main = {
1103
1104 }
1105
1106 function main:Init()
1107 hint.Text = "PLHaxx: Initializing Main Service..."
1108 wait()
1109
1110 do -- connect character after character spawned
1111 p.CharacterAdded:connect(function(char)
1112 c = char
1113 end)
1114 end
1115 end
1116end
1117
1118do -- fullbrightStuff
1119 fullbrightStuff = {
1120 enabled = false,
1121 backup = { },
1122 }
1123
1124 function fullbrightStuff:Enable()
1125 light.Ambient = Color3.new(1, 1, 1)
1126 light.Brightness = 2
1127 light.ColorShift_Bottom = Color3.new(1, 1, 1)
1128 light.ColorShift_Top = Color3.new(1, 1, 1)
1129 light.OutdoorAmbient = Color3.new(1, 1, 1)
1130 end
1131
1132 function fullbrightStuff:Disable()
1133 for i, v in pairs(self.backup) do
1134 light[i] = v
1135 end
1136 end
1137
1138 function fullbrightStuff:Init()
1139 self.backup["Ambient"] = light.Ambient
1140 self.backup["Brightness"] = light.Brightness
1141 self.backup["ColorShift_Bottom"] = light.ColorShift_Bottom
1142 self.backup["ColorShift_Top"] = light.ColorShift_Top
1143 self.backup["OutdoorAmbient"] = light.OutdoorAmbient
1144
1145 light:GetPropertyChangedSignal("Ambient"):connect(function()
1146 if self.enabled then
1147 light.Ambient = Color3.new(1, 1, 1)
1148 end
1149 end)
1150
1151 light:GetPropertyChangedSignal("Brightness"):connect(function()
1152 if self.enabled then
1153 light.Brightness = 2
1154 end
1155 end)
1156
1157 light:GetPropertyChangedSignal("ColorShift_Bottom"):connect(function()
1158 if self.enabled then
1159 light.ColorShift_Bottom = Color3.new(1, 1, 1)
1160 end
1161 end)
1162
1163 light:GetPropertyChangedSignal("ColorShift_Top"):connect(function()
1164 if self.enabled then
1165 light.ColorShift_Top = Color3.new(1, 1, 1)
1166 end
1167 end)
1168
1169 light:GetPropertyChangedSignal("OutdoorAmbient"):connect(function()
1170 if self.enabled then
1171 light.OutdoorAmbient = Color3.new(1, 1, 1)
1172 end
1173 end)
1174 end
1175end
1176
1177do -- gunStuff
1178 gunStuff = {
1179 infinite_ammo = false,
1180 no_spread = false,
1181 rapid_fire = false,
1182 bullets_shot = false,
1183 no_reload = false,
1184 bullet_range = false,
1185 damage = false,
1186 automatic = false
1187 }
1188
1189 function gunStuff:SyncGuns()
1190 local myBackpack = p:FindFirstChild("Backpack")
1191 if myBackpack then
1192 for _,v in pairs(myBackpack:GetChildren()) do
1193 if v:FindFirstChild("GunStates") then
1194 if self.infinite_ammo then
1195 local module = v:FindFirstChild("GunStates")
1196 local gunStates = require(module)
1197 gunStates.MaxAmmo = math.huge
1198 gunStates.StoredAmmo = math.huge
1199 gunStates.CurrentAmmo = math.huge
1200 end
1201 if self.no_spread then
1202 local module = v:FindFirstChild("GunStates")
1203 local gunStates = require(module)
1204 gunStates.Spread = 0
1205 end
1206 if self.rapid_fire then
1207 local module = v:FindFirstChild("GunStates")
1208 local gunStates = require(module)
1209 gunStates.FireRate = 0
1210 end
1211 if self.bullets_shot then
1212 local module = v:FindFirstChild("GunStates")
1213 local gunStates = require(module)
1214 gunStates.Bullets = 50
1215 end
1216 if self.no_reload then
1217 local module = v:FindFirstChild("GunStates")
1218 local gunStates = require(module)
1219 gunStates.ReloadTime = 0
1220 end
1221 if self.bullet_range then
1222 local module = v:FindFirstChild("GunStates")
1223 local gunStates = require(module)
1224 gunStates.Range = math.huge
1225 end
1226 if self.damage then
1227 local module = v:FindFirstChild("GunStates")
1228 local gunStates = require(module)
1229 gunStates.Damage = math.huge
1230 end
1231 if self.automatic then
1232 local module = v:FindFirstChild("GunStates")
1233 local gunStates = require(module)
1234 gunStates.AutoFire = true
1235 end
1236 end
1237 end
1238 end
1239 end
1240
1241 function gunStuff:Init()
1242 funcs:RunLoop("GunSync", 1, function()
1243 self:SyncGuns()
1244 end, r.RenderStepped)
1245 end
1246end
1247
1248do -- charStuff
1249 charStuff = {
1250 noclip = false,
1251 punch = false,
1252 taze = false,
1253 speed = false,
1254 jump = false
1255 }
1256
1257 local punchScript = true
1258
1259 local dir = {w = 0, s = 0, a = 0, d = 0}
1260 local spd = 2
1261
1262 i.InputBegan:connect(function(input, gameProcessedEvent)
1263 local key = input.KeyCode
1264 if key == Enum.KeyCode.W then dir.w = 1
1265 elseif key == Enum.KeyCode.S then dir.s = 1
1266 elseif key == Enum.KeyCode.A then dir.a = 1
1267 elseif key == Enum.KeyCode.D then dir.d = 1
1268 elseif key == Enum.KeyCode.Q then spd = spd + 1
1269 elseif key == Enum.KeyCode.E then spd = spd - 1
1270 end
1271 end)
1272 i.InputEnded:connect(function(input, gameProcessedEvent)
1273 local key = input.KeyCode
1274 if key == Enum.KeyCode.W and not gameProcessedEvent then dir.w = 0
1275 elseif key == Enum.KeyCode.S and not gameProcessedEvent then dir.s = 0
1276 elseif key == Enum.KeyCode.A and not gameProcessedEvent then dir.a = 0
1277 elseif key == Enum.KeyCode.D and not gameProcessedEvent then dir.d = 0
1278 end
1279 end)
1280
1281 function charStuff:SyncCharacter()
1282 if self.noclip then
1283 local newc = p.Character
1284 local humanoid = newc:FindFirstChild("Humanoid")
1285 local torso = newc:FindFirstChild("Torso")
1286 local enabled = false
1287 local torso = newc.Torso
1288 if torso and humanoid then
1289 torso.Anchored = true
1290 humanoid.PlatformStand = true
1291 torso.CFrame = CFrame.new(torso.Position, ca.CoordinateFrame.p) * CFrame.Angles(0,math.rad(180),0) * CFrame.new((dir.d-dir.a)*spd,0,(dir.s-dir.w)*spd)
1292 end
1293 else
1294 local newc = p.Character
1295 local humanoid = newc:FindFirstChild("Humanoid")
1296 local torso = newc:FindFirstChild("Torso")
1297 local enabled = false
1298 if torso and humanoid then
1299 if enabled == false then
1300 enabled = true
1301 end
1302 if enabled == true then
1303 enabled = false
1304 humanoid.PlatformStand = false
1305 newc.Torso.Anchored = false
1306 end
1307 end
1308 end
1309 if self.taze then
1310 local newc = p.Character
1311 local inputHandler = newc:FindFirstChild("ClientInputHandler")
1312 if inputHandler then
1313 inputHandler.Disabled = true
1314 else
1315 inputHandler.Disabled = false
1316 end
1317 end
1318 if self.speed then
1319 local newc = p.Character
1320 local inputHandler = newc:FindFirstChild("ClientInputHandler")
1321 local humanoid = newc:FindFirstChild("Humanoid")
1322 if inputHandler and humanoid then
1323 inputHandler.Disabled = true
1324 humanoid.WalkSpeed = 200
1325 end
1326 else
1327 local inputHandler = c:FindFirstChild("ClientInputHandler")
1328 local humanoid = c:FindFirstChild("Humanoid")
1329 if inputHandler and humanoid then
1330 inputHandler.Disabled = false
1331 end
1332 end
1333 if self.jump then
1334 local newc = p.Character
1335 local humanoid = newc:FindFirstChild("Humanoid")
1336 if humanoid then
1337 humanoid.JumpPower = 200
1338 end
1339 end
1340 end
1341
1342 function charStuff:Init()
1343 funcs:RunLoop("CharacterSync", 0, function()
1344 self:SyncCharacter()
1345 end, r.RenderStepped)
1346 end
1347end
1348
1349do -- miscStuff
1350 miscStuff = {
1351 kill_aura = false,
1352 }
1353
1354 function miscStuff:KillAura()
1355 if self.kill_aura then
1356 local meleeRemote = rs['meleeEvent']
1357 for _,v in pairs(ps:GetPlayers()) do
1358 if v:IsA("Player") and v ~= p and v.Character then
1359 local character = v.Character
1360 local humanoid = character:FindFirstChild("Humanoid")
1361 if humanoid then
1362 if humanoid.Health >= 0 then
1363 meleeRemote:FireServer(v)
1364 end
1365 end
1366 end
1367 end
1368 end
1369 end
1370
1371 function miscStuff:Init()
1372 funcs:RunLoop("MiscStuff", 0, function()
1373 self:KillAura()
1374 end, r.RenderStepped)
1375 end
1376end
1377
1378do -- teleStuff
1379 teleStuff = {
1380 criminal = CFrame.new(-943.704, 91.632, 2056.925),
1381 police = CFrame.new(834.972, 99.989, 2275.318),
1382 yard = CFrame.new(779.092, 96.001, 2451.114),
1383 cafeteria = CFrame.new(930, 97.54, 2291),
1384 cells = CFrame.new(918, 97.73, 2447),
1385 sewer = CFrame.new(917.174, 76.406, 2426.199),
1386 secret = CFrame.new(697, 97.492, 2364)
1387 }
1388end
1389
1390table.insert(getgenv().services, gui)
1391table.insert(getgenv().services, fullbrightStuff)
1392table.insert(getgenv().services, gunStuff)
1393table.insert(getgenv().services, charStuff)
1394table.insert(getgenv().services, miscStuff)
1395
1396for _,v in pairs(getgenv().services) do
1397 if v then -- prevent erroring if v does not exist or is nil
1398 hint.Text = "PLHaxx: Initializing Service "..tostring(_)..""
1399 getgenv().services[_]:Init()
1400 end
1401end
1402
1403warn("PLHaxx has loaded successfully, thanks for using!")
1404hint.Text = "PLHaxx: Completed."
1405wait(3)
1406hint:Destroy()
1407hint = nil
1408
1409getgenv().pl_haxx = true