-
Notifications
You must be signed in to change notification settings - Fork 0
/
MDTManagement_Local
1890 lines (1770 loc) · 65.7 KB
/
MDTManagement_Local
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
print("DEBUG: NAME HANDLER END")
-- Name Handler
local LocalPlayer = game.Players.LocalPlayer
local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local mouse = game.Players.LocalPlayer:GetMouse()
--[[
local fullname = nil
local lastname = nil
local officerName = ""
for i,v in pairs(game.ReplicatedStorage.PlayerData:GetChildren()) do
if v.Name == tostring(LocalPlayer.UserId) then
local letters = string.split(v.names.fname.Value,"")
fullname = (letters[1]..". "..v.names.lname.Value.."")
lastname = v.names.lname.Value
end
end
--]]
print("DEBUG: NAME HANDLER SKIPPED (TEST GAME, RETURNING NAME VALUE(S) AS LEO ROSENBERG)")
local fullname = "Leo Rosenberg"
local lastname = "Rosenberg"
print("DEBUG: NAME HANDLER END")
print("DEBUG: LOCAL START")
-- MDT Handler
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
local InformationEvents = Events:WaitForChild("InformationEvents")
local SendTicket = Events:WaitForChild("MoneyEvents"):WaitForChild("SendTicket")
print("DEBUG: LOCAL 32")
local viewportmodule = require(game.ReplicatedStorage.Modules.Components.ViewportModel)
local LoginFrame = script.Parent.Frame.LoginFrame
print("DEBUG: LOCAL 35")
local DesktopFrame = script.Parent.Frame:WaitForChild("DesktopFrame")
local AvatarImg = DesktopFrame:WaitForChild("AvatarImg")
local PlrName = DesktopFrame:WaitForChild("PlrName")
local RankName = DesktopFrame:WaitForChild("RankName")
local Bar = DesktopFrame:WaitForChild("Bar")
local MainFrame = DesktopFrame:WaitForChild("MainFrame")
local WeaponLookup = DesktopFrame:WaitForChild("WeaponLookup")
local BasicFrame = MainFrame.BasicFrame
local CurrentCallFrame = BasicFrame:WaitForChild("CurrentCallFrame")
local EmptyText = CurrentCallFrame:WaitForChild("EmptyText")
local CurrentCall = CurrentCallFrame:WaitForChild("CurrentCall")
local CallLocation = CurrentCall:WaitForChild("CallLocation")
local CallType = CurrentCall:WaitForChild("CallType")
local CallNum = CurrentCall:WaitForChild("CallNum")
local CallDesc = CurrentCall:WaitForChild("CallDesc")
local AttachedUnits = CurrentCall:WaitForChild("AttachedUnits")
local NewCallButton = CurrentCallFrame:WaitForChild("NewCallButton")
local StatusFrame = BasicFrame.StatusFrame
local BoloFrame = MainFrame.BoloFrame.Frame
local BOLO_EmptyText = BoloFrame.EmptyText
local BoloButton = BoloFrame.BoloButton
local Audios = script.Parent.Audios
local PersonLookup = DesktopFrame.PersonLookup
local PersonInfoFrame = PersonLookup.InfoFrame
local PersonSearchFrame = PersonLookup.SearchFrame
local VehLookup = DesktopFrame.VehLookup
local VehInfoFrame = VehLookup.InfoFrame
local VehSearchFrame = VehLookup.SearchFrame
local CarImg = VehInfoFrame.CarImg
local CarColor = VehInfoFrame.CarColor
local CarModel = VehInfoFrame.CarModel
local CarPlate = VehInfoFrame.CarPlate
local InsuranceStatus = VehInfoFrame.InsuranceStatus
local StolenStatus = VehInfoFrame.StolenStatus
local WarrantStatus = VehInfoFrame.WarrantStatus
local CitationFrame = VehInfoFrame.CitationFrame
local Reports = DesktopFrame.Reports
local ActiveCalls = Reports.ActiveCallsFrame.ActiveCalls
local v57 = Instance.new("Camera", script)
v57.CameraType = Enum.CameraType.Scriptable
local l__Viewport__58 = VehInfoFrame.ViewportFrame.Viewport
local v59 = Vector3.new(0, 0, 0)
l__Viewport__58.CurrentCamera = v57
local v60 = Instance.new("Camera", script)
v60.CameraType = Enum.CameraType.Scriptable
local l__Viewport__61 = WeaponLookup.InfoFrame.ViewportFrame.Viewport
local v62 = Vector3.new(0, 0, 0)
l__Viewport__61.CurrentCamera = v60
local CheckTeam = Events:WaitForChild("CheckTeam")
local StatusEvent = InformationEvents:WaitForChild("StatusEvent")
local LicenseEvent = InformationEvents:WaitForChild("LicenseEvent")
local NewCallEvent = InformationEvents:WaitForChild("NewCallEvent")
local ModifyCallEvent = InformationEvents:WaitForChild("ModifyCallEvent")
local ClearedCallEvent = InformationEvents:WaitForChild("ClearedCallEvent")
local BoloEvent = InformationEvents:WaitForChild("BoloEvent")
local CadLogEvent = InformationEvents:WaitForChild("CadLogEvent")
local RadioEvent = InformationEvents:WaitForChild("RadioEvent")
local SendLog = InformationEvents:WaitForChild("SendLog")
local UserInfoFunction = InformationEvents:WaitForChild("UserInfoFunction")
local GetInfo = InformationEvents:WaitForChild("GetInfo")
local playerData = ReplicatedStorage.PlayerData:WaitForChild(tostring(Players.LocalPlayer.UserId))
local Supervisor = false
script.Parent.Frame.DesktopFrame.PlrName.Text = string.upper(lastname)
local avatar = game.Players:GetUserThumbnailAsync(LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
script.Parent.Frame.DesktopFrame.AvatarImg.Image = avatar
StatusEvent:FireServer()
local supcheck = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
print("DEBUG: LOCAL END")
print("DEBUG: SCRIPT")
if supcheck ~= false then
Supervisor = true
DesktopFrame.RankName.Visible = true
DesktopFrame.RankName.Text = Events.PoliceEvents.CheckRank:InvokeServer("RankName")
else
PersonInfoFrame.RevokeCCW.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
PersonInfoFrame.RevokeHunting.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
PersonInfoFrame.RevokeLicense.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
PersonInfoFrame.SuspendLicense.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
PersonInfoFrame.SuspendHunting.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
PersonInfoFrame.SuspendCCW.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
end
print("DEBUG: SUPERVISOR CHECK OVER")
if LocalPlayer.Team.Name == "Civilian" then
script.Parent.Parent:Destroy()
return
end
print("DEBUG: CIVILIAN CHECK OVER")
script.Parent.Frame.DesktopFrame.MainFrame.refresh.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.MainFrame.BasicFrame.StatusFrame.Frame.TextLabel.Text = "Refeshing please wait..."
mouse.Icon = "http://www.roblox.com/asset?id=5018892087"
StatusEvent:FireServer("10-8")
ClearActiveCall()
ModifyCallEvent:FireServer("ALL", "Deattach")
_G.ActiveCall = nil
local l__Marker__80 = LocalPlayer.PlayerGui:FindFirstChild("Marker")
if l__Marker__80 then
l__Marker__80:Destroy()
end
script.Parent.Frame.DesktopFrame.MainFrame.BasicFrame.StatusFrame.Frame.TextLabel.Text = "Refesh completed succesfully!"
wait(1)
script.Parent.Frame.DesktopFrame.MainFrame.BasicFrame.StatusFrame.Frame.TextLabel.Text = "STATUS"
end)
print("DEBUG: REFRESH FUNC OVER")
LoginFrame.PlrName.Text = lastname .. "@" .. string.lower(LocalPlayer.Team.Name) .. ".gov"
LoginFrame.Login.MouseButton1Click:Connect(function()
Audios.Click:Play()
local v81 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
mouse.Icon = "http://www.roblox.com/asset?id=5018953955"
TweenService:Create(LoginFrame, v81, {
BackgroundTransparency = 1,
BorderSizePixel = 0
}):Play()
for v82, v83 in pairs(LoginFrame:GetDescendants()) do
if v83:IsA("Frame") then
TweenService:Create(v83, v81, {
BackgroundTransparency = 1,
BorderSizePixel = 0
}):Play()
elseif v83:IsA("TextLabel") then
TweenService:Create(v83, v81, {
BackgroundTransparency = 1,
BorderSizePixel = 0,
TextTransparency = 1,
TextStrokeTransparency = 1
}):Play()
elseif v83:IsA("TextButton") then
TweenService:Create(v83, v81, {
BackgroundTransparency = 1,
BorderSizePixel = 0,
TextTransparency = 1,
TextStrokeTransparency = 1
}):Play()
elseif v83:IsA("ImageLabel") then
TweenService:Create(v83, v81, {
ImageTransparency = 1
}):Play()
end
end
wait(1.3)
mouse.Icon = "http://www.roblox.com/asset?id=5018892087"
DesktopFrame.Visible = true
StatusEvent:FireServer("10-8")
end)
print("DEBUG: LOGIN FUNC OVER")
script.Parent.Drag.Disabled = false
script.Parent.Frame.DesktopFrame.MainFrame.DragBtn.MouseButton1Click:Connect(function()
script.Parent.Drag.Disabled = not script.Parent.Drag.Disabled
end)
print("DEBUG: DRAG ENABLED")
local function v84(p1)
if p1 == nil then
return
end
local v85 = DesktopFrame:FindFirstChild(p1)
if v85 then
for v86, v87 in pairs(DesktopFrame:GetChildren()) do
if v87:IsA("Frame") and v87.Name ~= "Bar" and v87.Name ~= "MenuBar" and v87.Name ~= "PanicButton" and v87.Name ~= "Additonial" then
v87.Visible = false
end
end
v85.Visible = true
end
end
for v88, v89 in pairs(Bar:GetDescendants()) do
if v89:IsA("TextButton") then
v89.MouseButton1Click:Connect(function()
Audios.Click:Play()
v84(v89.Parent.Name)
end)
end
end
print("DEBUG: IDK WHAT THIS IS MENUBAR SOEMTHING")
local u1 = false
DesktopFrame.Additonial.PanicButtonPrompt.Cancel.MouseButton1Click:Connect(function()
u1 = true
DesktopFrame.Additonial.PanicButtonPrompt.Visible = false
end)
local u2 = false
local u3 = false
DesktopFrame.Bar.PanicButton.TextButton.MouseButton1Click:Connect(function()
if u2 == false then
u2 = true
u1 = false
u3 = false
DesktopFrame.Additonial.PanicButtonPrompt.CountDown.Text = "3"
DesktopFrame.Additonial.PanicButtonPrompt.Visible = true
local u4 = 3
coroutine.resume((coroutine.create(function()
while true do
wait(1)
if u1 == true then
return
end
u4 = u4 - 1
DesktopFrame.Additonial.PanicButtonPrompt.CountDown.Text = tostring(u4)
if u4 == 0 then
break
end
if u3 == true then
break
end
end
StatusEvent:FireServer("Priority-1")
NewCallEvent:FireServer("PANIC BUTTON", "Police", "LOC. in call", LocalPlayer.Name .. " Actived their panic button [PRIORITY 1]", "PANIC")
RadioEvent:FireServer("Panic", "Please check your MDT")
u3 = false
u4 = 3
DesktopFrame.Additonial.PanicButtonPrompt.Visible = false
end)))
wait(10)
u2 = false
end
end)
print("DEBUG: PANIC FEATURE")
for v90, v91 in pairs(StatusFrame:GetChildren()) do
if v91:IsA("TextButton") then
v91.MouseButton1Click:Connect(function()
print(v91)
Audios.Click:Play()
StatusEvent:FireServer(v91.Name)
end)
end
end
local l__CurrentStatus__5 = StatusFrame.CurrentStatus
StatusEvent.OnClientEvent:Connect(function(p2, p3)
local v92 = tostring(LocalPlayer.UserId)
if p2[v92] then
l__CurrentStatus__5.Text = "CURRENT STATUS: " .. p2[v92].Status
if p2[v92].Status == "10-23" then
local l__Marker__93 = LocalPlayer.PlayerGui:FindFirstChild("Marker")
if l__Marker__93 then
l__Marker__93:Destroy()
end
end
end
end)
print("DEBUG: STATUS FEATURE")
-- Date
local date = os.date("!*t")
function CheckMonth()
if date.month == 1 then
return "January"
end
if date.month == 2 then
return "February"
end
if date.month == 3 then
return "March"
end
if date.month == 4 then
return "April"
end
if date.month == 5 then
return "May"
end
if date.month == 6 then
return "Juni"
end
if date.month == 7 then
return "July"
end
if date.month == 8 then
return "August"
end
if date.month == 9 then
return "September"
end
if date.month == 10 then
return "October"
end
if date.month == 11 then
return "November"
end
if date.month == 12 then
else
return
end
return "December"
end
print("DEBUG: MONTH STUFF")
local function gettime()
local curtime = os.time()
local curdate = os.date("!*t")
local v96
if curdate.hour > 12 then
v96 = "PM"
else
v96 = "AM"
end
return tostring(curdate.hour > 12 and curdate.hour % 12 or curdate.hour) .. ":" .. (curdate.min < 10 and "0" .. curdate.min or tostring(curdate.min)) .. ":" .. (curdate.sec < 10 and "0" .. curdate.sec or tostring(curdate.sec)) .. " " .. v96
end
print("DEBUG: TIME STUFF")
local TicketFrame = DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame.Frame
local u8 = false
local CheckRank = Events.PoliceEvents.CheckRank
PersonInfoFrame.NewCitation.MouseButton1Click:connect(function()
TicketFrame.OffensesFrame.AddNewOffense.Visible = true
DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame.CaseNum.TextLabel.Text = tostring(1)
DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame.Frame.SignButton.Visible = true
Audios.Click:Play()
u8 = true
TicketFrame.DateFrame.Frame.TextLabel.Text = tostring(date.day) .. " " .. CheckMonth() .. " " .. tostring(date.year)
TicketFrame.TimeFrame.Frame.TextLabel.Text = gettime()
TicketFrame.DriverFrame.Driver.Text = PersonInfoFrame.PlrName.Text
TicketFrame.DepartmentFrame.Frame.TextLabel.Text = CheckRank:InvokeServer("Department")
TicketFrame.RankFrame.Frame.TextLabel.Text = CheckRank:InvokeServer("RankName")
TicketFrame.OfficerNameFrame.Frame.TextLabel.Text = fullname
DesktopFrame.Additonial.Ticket.Visible = true
end)
print("DEBUG: NEW TICKET")
local maxoffenses = 0
local maxedout = false
local penalcode = require(game.ReplicatedStorage.Modules.Components.Crimesv2)
local amount = 0
TicketFrame.OffensesFrame.AddNewOffense.MouseButton1Click:Connect(function()
maxedout = maxoffenses ~= 3
if maxedout == true then
local ui = TicketFrame.OffensesFrame.Template.Frame:Clone()
for i, titles in pairs(penalcode.Titles) do
for i, offenses in pairs(titles.Offenses) do
if offenses.CrimeType == "Vehicle Offense" or offenses.Price then
local crimeui = ui.ScrollingFrame.Template:Clone()
crimeui.Name = offenses.Name
crimeui.Text = offenses.Name
crimeui.Visible = true
crimeui.Parent = ui.ScrollingFrame
end
end
end
ui.ScrollingFrame.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
ui.ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, ui.ScrollingFrame.UIListLayout.AbsoluteContentSize.Y)
end)
maxoffenses = maxoffenses + 1
ui.Name = "Offense" .. tostring(maxoffenses)
ui.Visible = true
ui.Parent = TicketFrame.OffensesFrame.ScrollFrame
ui.Clear.MouseButton1Click:Connect(function()
maxoffenses = maxoffenses - 1
ui:Destroy()
end)
ui.Charge.MouseButton1Click:Connect(function()
if ui.ScrollingFrame.Visible == false then
ui.ScrollingFrame.Visible = true
return
end
ui.ScrollingFrame.Visible = false
end)
for i, charges in pairs(ui.ScrollingFrame:GetChildren()) do
if charges:IsA("TextButton") then
charges.MouseButton1Click:Connect(function()
ui.Charge.Text = charges.Text
local crime = penalcode.GetCrime(ui.Charge.Text)
ui.Price.Text = "Price: $" .. tostring(crime.Price)
amount = amount + crime.Price
ui.ScrollingFrame.Visible = false
end)
end
end
end
end)
print("DEBUG: TICEKT NEW OFFENSE")
DesktopFrame.Additonial.Ticket.CloseFrame.close.MouseButton1Click:Connect(function()
DesktopFrame.Additonial.Ticket.Visible = false
DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame.CitationTxt.Visible = false
DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame.CaseNum.Visible = false
for v106, v107 in pairs(DesktopFrame.Additonial.Ticket.ScrollingFrame.Frame.TicketFrame:GetDescendants()) do
if v107:IsA("TextBox") then
v107.ClearTextOnFocus = false
v107.TextEditable = true
end
end
for v108, v109 in pairs(TicketFrame.OffensesFrame.ScrollFrame:GetChildren()) do
if v109:IsA("Frame") then
v109:Destroy()
end
end
for v110, v111 in pairs(TicketFrame:GetDescendants()) do
if v111:IsA("TextBox") then
v111.Text = ""
end
end
u8 = false
end)
print("DEBUG: TICKET CLOSE")
local PlayerName = PersonSearchFrame.PlayerName
function GetVehicles()
local plrdata = nil
if plrdata then
local carinfo = GetInfo:InvokeServer("Cars", PlayerName)
local v120 = 0
if carinfo then
local v121, v122, v123 = pairs(carinfo)
while true do
local v124, v125 = v121(v122, v123)
v123 = v124
v120 = v120 + 1
local v126 = PersonInfoFrame.OwnedVehicles.Template:Clone()
v126.Visible = true
v126.Name = v125.Model
v126.Text = v125.Model .. " - " .. v125.Plate
v126.Parent = PersonInfoFrame.OwnedVehicles
end
end
PersonInfoFrame.VehiclesText.Text = "VEHICLES (" .. v120 .. "):"
end
end
print("DEBUG: GETTING VEHICLES")
local l__Check__16 = game.ReplicatedStorage.Remotes.Check
PersonInfoFrame.Warrants.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function(p7)
PersonInfoFrame.Warrants.CanvasSize = UDim2.new(0, 0, 0, PersonInfoFrame.Warrants.UIListLayout.AbsoluteContentSize.Y)
end)
local function u17()
for v857, v858 in pairs(PersonInfoFrame.ArrestFrame.ScrollingFrame:GetChildren()) do
if v858.Name ~= "Template" and v858.Name ~= "UIListLayout" then
v858:Destroy()
end
end
for v859, v860 in pairs(PersonInfoFrame.Warrants:GetChildren()) do
if v860.Name ~= "Template" and v860.Name ~= "UIListLayout" then
v860:Destroy()
end
end
for v861, v862 in pairs(PersonInfoFrame.TicketFrame.ScrollingFrame:GetChildren()) do
if v862.Name ~= "Template" and v862.Name ~= "UIListLayout" then
v862:Destroy()
end
end
for v863, v864 in pairs(PersonInfoFrame.OwnedVehicles:GetChildren()) do
if v864.Name ~= "Template" and v864.Name ~= "UIListLayout" then
v864:Destroy()
end
end
end
print("DEBUG: 503")
local u18 = false
function UpdatePlayerInfo(action, user)
print(action, user)
local userinfo = UserInfoFunction:InvokeServer(user.Name)
local tickets = GetInfo:InvokeServer("Tickets", user.Name)
local arrests = GetInfo:InvokeServer("Arrests", user.Name)
local ticks = tick()
if userinfo == false then
PlayerName.Text = ""
return
end
-- Extracting relevant information and assigning to variables
local licenses = userinfo.Licenses
local characterInfo = userinfo.CharacterInfo
local criminalStats = userinfo.CriminalStats
local warrants = criminalStats.Warrants
-- Updating license status text and color
PersonInfoFrame.LicenseStatus.Text = licenses.DriversLicense
PersonInfoFrame.CCWStatus.Text = licenses.FirearmsLicense
PersonInfoFrame.HuntingStatus.Text = licenses.HuntingLicense
PersonInfoFrame.DOBText.Text = characterInfo.DOB
PersonInfoFrame.AddressText.Text = "N/A"
-- Checking if there is an active warrant
local hasActiveWarrant = #warrants > 0
-- Updating probation status text
local probationText = l__Check__16:InvokeServer("FelonTime", user) or "NONE"
PersonInfoFrame.Probation.Text = probationText
if hasActiveWarrant then
-- Displaying active warrant information
PersonInfoFrame.WarrantStatus.Visible = false
PersonInfoFrame.Warrants.Visible = true
Audios.ActiveStatus:Play()
PersonInfoFrame.Status.Text = "ACTIVE WARRANT"
PersonInfoFrame.Status.Visible = true
-- Adding warrant details to the UI
for _, warrant in ipairs(warrants) do
local warrantEntry = PersonInfoFrame.Warrants.Template:Clone()
warrantEntry.Visible = true
warrantEntry.Name = warrant.WarrantId
warrantEntry.Text = table.concat(warrant.Charges, " | ")
if string.len(table.concat(warrant.Charges, " | ")) >= 45 then
warrantEntry.TextWrapped = true
warrantEntry.Size = UDim2.new(0, 183, 0, 50)
end
warrantEntry.Parent = PersonInfoFrame.Warrants
end
else
-- No active warrants
PersonInfoFrame.Status.Text = ""
PersonInfoFrame.Status.Visible = false
PersonInfoFrame.WarrantStatus.Visible = true
PersonInfoFrame.Warrants.Visible = false
end
GetVehicles()
-- Sorting and displaying arrest records
local arrestRecords = {}
for arrestId, arrestData in pairs(arrests) do
arrestRecords[#arrestRecords + 1] = {
key = arrestId,
value = arrestData
}
end
table.sort(arrestRecords, function(a, b)
return b.value.UnixTime < a.value.UnixTime
end)
for _, arrestData in ipairs(arrestRecords) do
local arrestEntry = PersonInfoFrame.ArrestFrame.ScrollingFrame.Template:Clone()
arrestEntry.Name = arrestData.value.ArrestId
arrestEntry.Visible = true
arrestEntry.CaseNum.Text = arrestData.value.Date .. " | " .. arrestData.value.Time
if string.len(table.concat(arrestData.value.Charges, " | ")) >= 45 then
arrestEntry.Charges.TextWrapped = true
end
arrestEntry.Charges.Text = table.concat(arrestData.value.Charges, " | ")
arrestEntry.Parent = PersonInfoFrame.ArrestFrame.ScrollingFrame
wait()
end
-- Sorting and displaying ticket records
local ticketRecords = {}
for ticketNum, ticketData in pairs(tickets) do
ticketRecords[#ticketRecords + 1] = {
key = ticketNum,
value = ticketData
}
end
table.sort(ticketRecords, function(a, b)
return b.value.UnixTime < a.value.UnixTime
end)
for _, ticketData in ipairs(ticketRecords) do
local ticketEntry = PersonInfoFrame.TicketFrame.ScrollingFrame.Template:Clone()
ticketEntry.Visible = true
ticketEntry.Name = ticketData.value.TicketNum
ticketEntry.CaseNum.Text = ticketData.value.Date .. " | " .. ticketData.value.Time
if string.len(table.concat(ticketData.value.Charges, " | ")) >= 45 then
ticketEntry.Charges.TextWrapped = true
ticketEntry.Size = UDim2.new(0, 342, 0, 53)
ticketEntry.Charges.Size = UDim2.new(0, 289, 0, 45)
end
ticketEntry.Charges.Text = table.concat(ticketData.value.Charges, " | ")
ticketEntry.Parent = PersonInfoFrame.TicketFrame.ScrollingFrame
ticketEntry.Click.MouseButton1Click:Connect(function()
if DesktopFrame.Additonial.Ticket.Visible == false then
if u18 == false then
u18 = true
wait(0.5)
u18 = false
end
end
end)
end
local elapsedTime = tick() - ticks
end
print("DEBUG: GETTING PLAYER INFO")
PersonInfoFrame.Close.MouseButton1Click:Connect(function()
Audios.Click:Play()
u17()
PersonInfoFrame.Visible = false
PersonSearchFrame.Visible = true
end)
TicketFrame.SignButton.MouseButton1Click:Connect(function()
local v920 = nil
for v921, v922 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v922:IsA("Folder") and v922.FullName.Value:lower() == PersonInfoFrame.PlrName.Text:lower() then
v920 = game.Players:FindFirstChild(v922.Name)
break
end
end
if not v920 then
return
end
if (char.HumanoidRootPart.Position - v920.Character.HumanoidRootPart.Position).magnitude >= 250 then
return
end
local v923 = true
local v924 = {}
local v925 = {}
local v926 = {}
for v927, v928 in pairs(TicketFrame:GetDescendants()) do
if v928:IsA("TextBox") then
if v928.Text:gsub(" ", "") ~= "" then
v924[v928.Name] = v928.Text
else
local v929 = TweenInfo.new(0.4, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
TweenService:Create(v928, v929, {
PlaceholderColor3 = Color3.fromRGB(162, 0, 0)
}):Play()
wait(0.45)
TweenService:Create(v928, v929, {
PlaceholderColor3 = Color3.fromRGB(178, 178, 178)
}):Play()
v923 = false
end
end
end
if v923 == true and maxoffenses >= 1 then
for v930, v931 in pairs(TicketFrame.OffensesFrame.ScrollFrame:GetChildren()) do
if v931:IsA("Frame") then
table.insert(v925, v931.Charge.Text)
end
end
SendTicket:FireServer(PersonInfoFrame.PlrName.Text, v924, v925)
maxoffenses = 0
maxedout = false
amount = 0
for v932, v933 in pairs(TicketFrame:GetDescendants()) do
if v933:IsA("TextBox") and v933.Name ~= "Driver" then
v933.Text = ""
end
end
for v934, v935 in pairs(TicketFrame.OffensesFrame.ScrollFrame:GetChildren()) do
if v935:IsA("Frame") then
v935:Destroy()
end
end
end
local v936 = nil
for v937, v938 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v938:IsA("Folder") and v938.FullName.Value:lower() == PersonInfoFrame.PlrName.Text:lower() then
v936 = game.Players:FindFirstChild(v938.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v936)
end)
PlayerName.FocusLost:Connect(function(p14)
local v939 = nil
local v940 = nil
for v941, v942 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v942:IsA("Folder") and v942.FullName.Value:lower() == PlayerName.Text:lower() then
v940 = game.Players:FindFirstChild(v942.Name)
v939 = v942.FullName.Value
break
end
end
if not v939 then
Audios.Error:Play()
PlayerName.Text = ""
return
end
mouse.Icon = "http://www.roblox.com/asset?id=5018953955"
UpdatePlayerInfo(v939, v940)
wait(1)
mouse.Icon = "http://www.roblox.com/asset?id=5018892087"
PersonInfoFrame.Visible = true
PersonSearchFrame.Visible = false
PlayerName.Text = ""
end)
PersonInfoFrame.SuspendLicense.MouseButton1Click:Connect(function()
local v943, v944 = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
if Supervisor == true and v943 == true then
Audios.Click:Play()
if PersonInfoFrame.LicenseStatus.Text == "NONE" or PersonInfoFrame.LicenseStatus.Text == "REVOKED" or PersonInfoFrame.LicenseStatus.Text == "SUSPENDED" then
return
end
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = true
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Title.Text = "SUSPEND DRIVERS LICENSE"
local u19 = nil
local u20 = nil
u19 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Submit.MouseButton1Click:Connect(function()
LicenseEvent:FireServer("SuspendDriver", PersonInfoFrame.PlrName.Text, script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text, LocalPlayer.Name)
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.CallDescFrame.TextBox.Text = ""
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
wait(0.05)
local v945 = nil
for v946, v947 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v947:IsA("Folder") and v947.FullName.Value:lower() == PersonInfoFrame.PlrName.Text:lower() then
v945 = game.Players:FindFirstChild(v947.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v945)
u19:disconnect()
u20:disconnect()
end)
u20 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.MenuBar.Close.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.CallDescFrame.TextBox.Text = ""
u19:disconnect()
u20:disconnect()
end)
end
end)
print("DEBUG: SUSPEND DRIVERS LICENE")
PersonInfoFrame.SuspendCCW.MouseButton1Click:Connect(function()
local v948, v949 = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
if Supervisor == true and v948 == true then
Audios.Click:Play()
if PersonInfoFrame.CCWStatus.Text == "NONE" or PersonInfoFrame.CCWStatus.Text == "REVOKED" or PersonInfoFrame.CCWStatus.Text == "SUSPENDED" then
return
end
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = true
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Title.Text = "SUSPEND FIREARMS LICENSE"
local u21 = nil
local u22 = nil
u21 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Submit.MouseButton1Click:Connect(function()
LicenseEvent:FireServer("SuspendCCW", PersonInfoFrame.PlrName.Text, script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text, LocalPlayer.Name)
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.CallDescFrame.TextBox.Text = ""
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
wait(0.05)
local v950 = nil
for v951, v952 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v952:IsA("Folder") and v952.FullName.Value:lower() == PersonInfoFrame.PlrName.Text:lower() then
v950 = game.Players:FindFirstChild(v952.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v950)
u21:disconnect()
u22:disconnect()
end)
u22 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.MenuBar.Close.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.CallDescFrame.TextBox.Text = ""
u21:disconnect()
u22:disconnect()
end)
end
end)
print("DEBUG: SUSPEND FIREARMS LICENSE")
PersonInfoFrame.RevokeCCW.MouseButton1Click:Connect(function()
local v953, v954 = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
if Supervisor == true and v953 == true then
Audios.Click:Play()
if PersonInfoFrame.CCWStatus.Text == "NONE" or PersonInfoFrame.CCWStatus.Text == "REVOKED" then
return
end
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Title.Text = "SUSPEND FIREARMS LICENSE"
local u23 = nil
local u24 = nil
u24 = script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.MenuBar.Close.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = false
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text = ""
u23:disconnect()
u24:disconnect()
end)
u23 = script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Submit.MouseButton1Click:Connect(function()
LicenseEvent:FireServer("RevokeCCW", PersonInfoFrame.PlrName.Text, script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text, LocalPlayer.Name)
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text = ""
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = false
local v955 = nil
for v956, v957 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v957:IsA("Folder") and v957.FullName.Value:lower() == PlayerName.Text:lower() then
v955 = game.Players:FindFirstChild(v957.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v955)
u23:disconnect()
u24:disconnect()
end)
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = true
end
end)
print("DEBUG: REVOKE FIREARM LICENSE")
PersonInfoFrame.SuspendHunting.MouseButton1Click:Connect(function()
local v958, v959 = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
if Supervisor == true and v958 == true then
Audios.Click:Play()
if PersonInfoFrame.HuntingStatus.Text == "NONE" or PersonInfoFrame.HuntingStatus.Text == "REVOKED" or PersonInfoFrame.HuntingStatus.Text == "SUSPENDED" then
return
end
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Title.Text = "Are you sure you want to suspend their hunting license?"
local u25 = nil
local u26 = nil
u25 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Continue.MouseButton1Click:Connect(function()
LicenseEvent:FireServer("SuspendHunting", PersonInfoFrame.PlrName.Text)
wait(0.05)
local v960 = nil
for v961, v962 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v962:IsA("Folder") and v962.FullName.Value:lower() == PlayerName.Text:lower() then
v960 = game.Players:FindFirstChild(v962.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v960)
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
u25:disconnect()
u26:disconnect()
end)
u26 = script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Cancel.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = false
u25:disconnect()
u26:disconnect()
end)
script.Parent.Frame.DesktopFrame.Additonial.SuspendLicenseFrame.Visible = true
end
end)
print("DEBUG: SUSPEND HUNTING LICENSE")
PersonInfoFrame.RevokeHunting.MouseButton1Click:Connect(function()
local v963, v964 = Events.PoliceEvents.CheckRank:InvokeServer("SupCheck")
if Supervisor == true and v963 == true then
Audios.Click:Play()
if PersonInfoFrame.HuntingStatus.Text == "NONE" or PersonInfoFrame.HuntingStatus.Text == "REVOKED" then
return
end
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Title.Text = "SUSPEND HUNTING LICENSE"
local u27 = nil
local u28 = nil
u28 = script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.MenuBar.Close.MouseButton1Click:Connect(function()
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = false
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text = ""
u27:disconnect()
u28:disconnect()
end)
u27 = script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Submit.MouseButton1Click:Connect(function()
LicenseEvent:FireServer("RevokeHunting", PersonInfoFrame.PlrName.Text, script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text, LocalPlayer.Name)
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.CallDescFrame.TextBox.Text = ""
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = false
local v965 = nil
for v966, v967 in pairs(game.ReplicatedStorage.Players:GetChildren()) do
if v967:IsA("Folder") and v967.FullName.Value:lower() == PlayerName.Text:lower() then
v965 = game.Players:FindFirstChild(v967.Name)
break
end
end
UpdatePlayerInfo(PersonInfoFrame.PlrName.Text, v965)
u27:disconnect()
u28:disconnect()
end)
script.Parent.Frame.DesktopFrame.Additonial.RevokeLicenseFrame.Visible = true
end
end)
print("DEBUG: REVOKE HUNTING LICENE")
local l__Template__29 = ActiveCalls.Template
local u30 = false
local u31 = false
function UpdateCals()
local v968, v969, ui0 = pairs(ActiveCalls:GetChildren())
while true do
local ui1, ui2 = v968(v969, ui0)
if ui1 then
else
break
end
ui0 = ui1
if ui2.Name ~= "Template" then
if ui2.Name ~= "UIListLayout" then
ui2:Destroy()
end
end
end
local ui3 = false
local ui4 = GetInfo:InvokeServer("Calls")
if ui4 then
local ui5, ui6, ui7 = pairs(ui4)
while true do
local ui8, ui9 = ui5(ui6, ui7)
if ui8 then
else
break
end
ui7 = ui8
local v980 = ActiveCalls:FindFirstChild(ui9.ID)
if not v980 then
if _G.ActiveCall then
if _G.ActiveCall == ui9.ID then
ui3 = true
end
end
if not ui3 then
_G.ActiveCall = nil
ui3 = false
end
local v981 = l__Template__29:Clone()
v981.Name = ui9.ID
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(0, 129, 0)
if #ui9.Units == 0 then
v981.AttachCall.Text = "CLAIM CALL"
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(10, 129, 0)
elseif 25 <= #ui9.Units then
v981.AttachCall.Text = "CALL FULL"
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(129, 23, 25)
else
v981.AttachCall.Text = "ATTACH CALL"
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(10, 129, 0)
end
if ui9.Primary == LocalPlayer.Name then
v981.ClearCall.Visible = true
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(129, 23, 25)
v981.AttachCall.Text = "DEATTACH CALL"
elseif Supervisor then
v981.ClearCall.Visible = true
else
v981.ClearCall.Visible = false
end
local v982, v983, v984 = pairs(ui9.Units)
while true do
local v985, v986 = v982(v983, v984)
if v985 then
else
break
end
v984 = v985
if v986 == LocalPlayer.Name then
SetupCurrentCall(ui9.CallType, ui9.Player, ui9.CallNumber, ui9.Units, ui9.CallDesc, ui9.Primary, ui9.Location, ui9.ID)
_G.ActiveCall = ui9.ID
v981.AttachCall.BackgroundColor3 = Color3.fromRGB(129, 23, 25)
v981.AttachCall.Text = "DEATTACH CALL"
break