-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathftap
More file actions
1674 lines (1515 loc) · 61.9 KB
/
ftap
File metadata and controls
1674 lines (1515 loc) · 61.9 KB
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
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService("Debris")
local GrabEvents = ReplicatedStorage:WaitForChild("GrabEvents")
local MenuToys = ReplicatedStorage:WaitForChild("MenuToys")
local CharacterEvents = ReplicatedStorage:WaitForChild("CharacterEvents")
local SetNetworkOwner = GrabEvents:WaitForChild("SetNetworkOwner")
local Struggle = CharacterEvents:WaitForChild("Struggle")
local CreateLine = GrabEvents:WaitForChild("CreateGrabLine")
local DestroyLine = GrabEvents:WaitForChild("DestroyGrabLine")
local DestroyToy = MenuToys:WaitForChild("DestroyToy")
local localPlayer = Players.LocalPlayer
local playerCharacter = localPlayer.Character or localPlayer.CharacterAdded:Wait()
localPlayer.CharacterAdded:Connect(function(character)
playerCharacter = character
end)
local AutoRecoverDroppedPartsCoroutine
local connectionBombReload
local reloadBombCoroutine
local antiExplosionConnection
local poisonAuraCoroutine
local deathAuraCoroutine
local reloadBombCoroutine
local poisonCoroutines = {}
local strengthConnection
local coroutineRunning = false
local autoStruggleCoroutine
local autoDefendCoroutine
local auraCoroutine
local gravityCoroutine
local kickCoroutine
local kickGrabCoroutine
local hellSendGrabCoroutine
local anchoredParts = {}
local anchoredConnections = {}
local compiledGroups = {}
local compileConnections = {}
local compileCoroutine
local fireAllCoroutine
local connections = {}
local renderSteppedConnections = {}
local ragdollAllCoroutine
local crouchJumpCoroutine
local crouchSpeedCoroutine
local anchorGrabCoroutine
local poisonGrabCoroutine
local ufoGrabCoroutine
local burnPart
local fireGrabCoroutine
local noclipGrabCoroutine
local antiKickCoroutine
local kickGrabConnections = {}
local blobmanCoroutine
local lighBitSpeedCoroutine
local lightbitpos = {}
local lightbitparts = {}
local lightbitcon
local lightbitcon2
local lightorbitcon
local bodyPositions = {}
local alignOrientations = {}
local skolko = ""
local decoyOffset = 15
local stopDistance = 5
local circleRadius = 10
local circleSpeed = 2
local auraToggle = 1
local crouchWalkSpeed = 50
local crouchJumpPower = 50
local kickMode = 1
local auraRadius = 20
local lightbit = 0.3125
local lightbitoffset = 1
local lightbitradius = 20
local usingradius = lightbitradius
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
local Player = game.Players.LocalPlayer
local followMode = true
local toysFolder = workspace:FindFirstChild(localPlayer.Name.."SpawnedInToys")
local playerList = {}
local selection
local blobman
local platforms = {}
local ownedToys = {}
local bombList = {}
_G.ToyToLoad = "BombMissile"
_G.MaxMissiles = 9
_G.BlobmanDelay = 0.005
local function isDescendantOf(target, other)
local currentParent = target.Parent
while currentParent do
if currentParent == other then
return true
end
currentParent = currentParent.Parent
end
return false
end
local function DestroyT(toy)
local toy = toy or toysFolder:FindFirstChildWhichIsA("Model")
DestroyToy:FireServer(toy)
end
local function getDescendantParts(descendantName)
local parts = {}
for _, descendant in ipairs(workspace.Map:GetDescendants()) do
if descendant:IsA("Part") and descendant.Name == descendantName then
table.insert(parts, descendant)
end
end
return parts
end
local poisonHurtParts = getDescendantParts("PoisonHurtPart")
local paintPlayerParts = getDescendantParts("PaintPlayerPart")
local function updatePlayerList()
playerList = {}
for _, player in ipairs(Players:GetPlayers()) do
table.insert(playerList, player.Name)
end
end
local function onPlayerAdded(player)
table.insert(playerList, player.Name)
end
local function onPlayerRemoving(player)
for i, name in ipairs(playerList) do
if name == player.Name then
table.remove(playerList, i)
break
end
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(onPlayerRemoving)
for i, v in pairs(localPlayer:WaitForChild("PlayerGui"):WaitForChild("MenuGui"):WaitForChild("Menu"):WaitForChild("TabContents"):WaitForChild("Toys"):WaitForChild("Contents"):GetChildren()) do
if v.Name ~= "UIGridLayout" then
ownedToys[v.Name] = true
end
end
local function getNearestPlayer()
local nearestPlayer
local nearestDistance = math.huge
for _, player in pairs(Players:GetPlayers()) do
if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local distance = (playerCharacter.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
if distance < nearestDistance then
nearestDistance = distance
nearestPlayer = player
end
end
end
return nearestPlayer
end
local function cleanupConnections(connectionTable)
for _, connection in ipairs(connectionTable) do
connection:Disconnect()
end
connectionTable = {}
end
local function getVersion()
local url = "https://raw.githubusercontent.com/Undebolted/FTAP/main/VERSION.json"
local success, response = pcall(function()
return game:HttpGet(url)
end)
if success then
local data = HttpService:JSONDecode(response)
return data.version
else
warn("Failed to get version: " .. response)
return "Unknown"
end
end
local function spawnItem(itemName, position, orientation)
task.spawn(function()
local cframe = CFrame.new(position)
local rotation = Vector3.new(0, 90, 0)
ReplicatedStorage.MenuToys.SpawnToyRemoteFunction:InvokeServer(itemName, cframe, rotation)
end)
end
local function arson(part)
if not toysFolder:FindFirstChild("Campfire") then
spawnItem("Campfire", Vector3.new(-72.9304581, -5.96906614, -265.543732))
end
local campfire = toysFolder:FindFirstChild("Campfire")
burnPart = campfire:FindFirstChild("FirePlayerPart") or campfire.FirePlayerPart
burnPart.Size = Vector3.new(7, 7, 7)
burnPart.Position = part.Position
task.wait(0.3)
burnPart.Position = Vector3.new(0, -50, 0)
end
local function handleCharacterAdded(player)
local characterAddedConnection = player.CharacterAdded:Connect(function(character)
local hrp = character:WaitForChild("HumanoidRootPart")
local fpp = hrp:WaitForChild("FirePlayerPart")
fpp.Size = Vector3.new(4.5, 5, 4.5)
fpp.CollisionGroup = "1"
fpp.CanQuery = true
end)
table.insert(kickGrabConnections, characterAddedConnection)
end
local function kickGrab()
for _, player in pairs(Players:GetPlayers()) do
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local hrp = player.Character.HumanoidRootPart
if hrp:FindFirstChild("FirePlayerPart") then
local fpp = hrp.FirePlayerPart
fpp.Size = Vector3.new(4.5, 5.5, 4.5)
fpp.CollisionGroup = "1"
fpp.CanQuery = true
end
end
handleCharacterAdded(player)
end
local playerAddedConnection = Players.PlayerAdded:Connect(handleCharacterAdded)
table.insert(kickGrabConnections, playerAddedConnection)
end
local function grabHandler(grabType)
while true do
local success, err = pcall(function()
local child = workspace:FindFirstChild("GrabParts")
if child and child.Name == "GrabParts" then
local grabPart = child:FindFirstChild("GrabPart")
local grabbedPart = grabPart:FindFirstChild("WeldConstraint").Part1
local head = grabbedPart.Parent:FindFirstChild("Head")
if head then
while workspace:FindFirstChild("GrabParts") do
local partsTable = grabType == "poison" and poisonHurtParts or paintPlayerParts
for _, part in pairs(partsTable) do
part.Size = Vector3.new(2, 2, 2)
part.Transparency = 1
part.Position = head.Position
end
wait()
for _, part in pairs(partsTable) do
part.Position = Vector3.new(0, -200, 0)
end
end
for _, part in pairs(partsTable) do
part.Position = Vector3.new(0, -200, 0)
end
end
end
end)
wait()
end
end
local function fireGrab()
while true do
local success, err = pcall(function()
local child = workspace:FindFirstChild("GrabParts")
if child and child.Name == "GrabParts" then
local grabPart = child:FindFirstChild("GrabPart")
local grabbedPart = grabPart:FindFirstChild("WeldConstraint").Part1
local head = grabbedPart.Parent:FindFirstChild("Head")
if head then
arson(head)
end
end
end)
wait()
end
end
local function noclipGrab()
while true do
local success, err = pcall(function()
local child = workspace:FindFirstChild("GrabParts")
if child and child.Name == "GrabParts" then
local grabPart = child:FindFirstChild("GrabPart")
local grabbedPart = grabPart:FindFirstChild("WeldConstraint").Part1
local character = grabbedPart.Parent
if character.HumanoidRootPart then
while workspace:FindFirstChild("GrabParts") do
for _, part in pairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
wait()
end
for _, part in pairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.CanCollide = true
end
end
end
end
end)
wait()
end
end
local function spawnItemCf(itemName, cframe)
task.spawn(function()
local rotation = Vector3.new(0, 0, 0)
ReplicatedStorage.MenuToys.SpawnToyRemoteFunction:InvokeServer(itemName, cframe, rotation)
end)
end
local function fireAll()
while true do
local success, err = pcall(function()
if toysFolder:FindFirstChild("Campfire") then
DestroyT(toysFolder:FindFirstChild("Campfire"))
wait(0.5)
end
spawnItemCf("Campfire", playerCharacter.Head.CFrame)
local campfire = toysFolder:WaitForChild("Campfire")
local firePlayerPart
for _, part in pairs(campfire:GetChildren()) do
if part.Name == "FirePlayerPart" then
part.Size = Vector3.new(10, 10, 10)
firePlayerPart = part
break
end
end
local originalPosition = playerCharacter.Torso.Position
SetNetworkOwner:FireServer(firePlayerPart, firePlayerPart.CFrame)
playerCharacter:MoveTo(firePlayerPart.Position)
wait(0.3)
playerCharacter:MoveTo(originalPosition)
local bodyPosition = Instance.new("BodyPosition")
bodyPosition.P = 20000
bodyPosition.Position = playerCharacter.Head.Position + Vector3.new(0, 600, 0)
bodyPosition.Parent = campfire.Main
while true do
for _, player in pairs(Players:GetChildren()) do
pcall(function()
bodyPosition.Position = playerCharacter.Head.Position + Vector3.new(0, 600, 0)
if player.Character and player.Character.HumanoidRootPart and player.Character ~= playerCharacter then
firePlayerPart.Position = player.Character.HumanoidRootPart.Position or player.Character.Head.Position
wait()
end
end)
end
wait()
end
end)
if not success then
warn("Error in fireAll: " .. tostring(err))
end
wait()
end
end
local function createHighlight(parent)
local highlight = Instance.new("Highlight")
highlight.DepthMode = Enum.HighlightDepthMode.Occluded
highlight.FillTransparency = 1
highlight.Name = "Highlight"
highlight.OutlineColor = Color3.new(0, 0, 1)
highlight.OutlineTransparency = 0.5
highlight.Parent = parent
print("created highlight and set on "..parent.Name)
return highlight
end
local function onPartOwnerAdded(descendant, primaryPart)
if descendant.Name == "PartOwner" and descendant.Value ~= localPlayer.Name then
local highlight = primaryPart:FindFirstChild("Highlight") or U.GetDescendant(U.FindFirstAncestorOfType(primaryPart, "Model"), "Highlight", "Highlight")
if highlight then
if descendant.Value ~= localPlayer.Name then
highlight.OutlineColor = Color3.new(1, 0, 0)
else
highlight.OutlineColor = Color3.new(0, 0, 1)
end
end
end
end
local function createBodyMovers(part, position, rotation)
local bodyPosition = Instance.new("BodyPosition")
local bodyGyro = Instance.new("BodyGyro")
bodyPosition.P = 15000
bodyPosition.D = 200
bodyPosition.MaxForce = Vector3.new(5000000, 5000000, 5000000)
bodyPosition.Position = position
bodyPosition.Parent = part
bodyGyro.P = 15000
bodyGyro.D = 200
bodyGyro.MaxTorque = Vector3.new(5000000, 5000000, 5000000)
bodyGyro.CFrame = rotation
bodyGyro.Parent = part
end
local function anchorGrab()
while true do
pcall(function()
local grabParts = workspace:FindFirstChild("GrabParts")
if not grabParts then return end
local grabPart = grabParts:FindFirstChild("GrabPart")
if not grabPart then return end
local weldConstraint = grabPart:FindFirstChild("WeldConstraint")
if not weldConstraint or not weldConstraint.Part1 then return end
local primaryPart = weldConstraint.Part1.Name == "SoundPart" and weldConstraint.Part1 or weldConstraint.Part1.Parent.SoundPart or weldConstraint.Part1.Parent.PrimaryPart or weldConstraint.Part1
if not primaryPart then return end
if primaryPart.Anchored then return end
if isDescendantOf(primaryPart, workspace.Map) then return end
for _, player in pairs(Players:GetChildren()) do
if isDescendantOf(primaryPart, player.Character) then return end
end
local t = true
for _, v in pairs(primaryPart:GetDescendants()) do
if table.find(anchoredParts, v) then
t = false
end
end
if t and not table.find(anchoredParts, primaryPart) then
local target
if U.FindFirstAncestorOfType(primaryPart, "Model") and U.FindFirstAncestorOfType(primaryPart, "Model") ~= workspace then
target = U.FindFirstAncestorOfType(primaryPart, "Model")
else
target = primaryPart
end
local highlight = createHighlight(target)
table.insert(anchoredParts, primaryPart)
print(target)
local connection = target.DescendantAdded:Connect(function(descendant)
onPartOwnerAdded(descendant, primaryPart)
end)
table.insert(anchoredConnections, connection)
end
if U.FindFirstAncestorOfType(primaryPart, "Model") and U.FindFirstAncestorOfType(primaryPart, "Model") ~= workspace then
for _, child in ipairs(U.FindFirstAncestorOfType(primaryPart, "Model"):GetDescendants()) do
if child:IsA("BodyPosition") or child:IsA("BodyGyro") then
child:Destroy()
end
end
else
for _, child in ipairs(primaryPart:GetChildren()) do
if child:IsA("BodyPosition") or child:IsA("BodyGyro") then
child:Destroy()
end
end
end
while workspace:FindFirstChild("GrabParts") do
wait()
end
createBodyMovers(primaryPart, primaryPart.Position, primaryPart.CFrame)
end)
wait()
end
end
local function anchorKickGrab()
while true do
pcall(function()
local grabParts = workspace:FindFirstChild("GrabParts")
if not grabParts then return end
local grabPart = grabParts:FindFirstChild("GrabPart")
if not grabPart then return end
local weldConstraint = grabPart:FindFirstChild("WeldConstraint")
if not weldConstraint or not weldConstraint.Part1 then return end
local primaryPart = weldConstraint.Part1
if not primaryPart then return end
if isDescendantOf(primaryPart, workspace.Map) then return end
if primaryPart.Name ~= "FirePlayerPart" then return end
for _, child in ipairs(primaryPart:GetChildren()) do
if child:IsA("BodyPosition") or child:IsA("BodyGyro") then
child:Destroy()
end
end
while workspace:FindFirstChild("GrabParts") do
wait()
end
createBodyMovers(primaryPart, primaryPart.Position, primaryPart.CFrame)
end)
wait()
end
end
local function cleanupAnchoredParts()
for _, part in ipairs(anchoredParts) do
if part then
if part:FindFirstChild("BodyPosition") then
part.BodyPosition:Destroy()
end
if part:FindFirstChild("BodyGyro") then
part.BodyGyro:Destroy()
end
local highlight = part:FindFirstChild("Highlight") or part.Parent and part.Parent:FindFirstChild("Highlight")
if highlight then
highlight:Destroy()
end
end
end
cleanupConnections(anchoredConnections)
anchoredParts = {}
end
local function updateBodyMovers(primaryPart)
for _, group in ipairs(compiledGroups) do
if group.primaryPart and group.primaryPart == primaryPart then
for _, data in ipairs(group.group) do
local bodyPosition = data.part:FindFirstChild("BodyPosition")
local bodyGyro = data.part:FindFirstChild("BodyGyro")
if bodyPosition then
bodyPosition.Position = (primaryPart.CFrame * data.offset).Position
end
if bodyGyro then
bodyGyro.CFrame = primaryPart.CFrame * data.offset
end
end
end
end
end
local function compileGroup()
if #anchoredParts == 0 then
Rayfield:Notify({Title = "Error",Content = "No anchored parts found",Duration = 5,Image = 4483362458,})
else
Rayfield:Notify({Title = "Success",Content = "Compiled "..#anchoredParts.." Toys together",Duration = 5,Image = 4483362458,})
end
local primaryPart = anchoredParts[1]
if not primaryPart then return end
local highlight = primaryPart:FindFirstChild("Highlight") or primaryPart.Parent:FindFirstChild("Highlight")
if not highlight then
highlight = createHighlight(primaryPart.Parent:IsA("Model") and primaryPart.Parent or primaryPart)
end
highlight.OutlineColor = Color3.new(0, 1, 0)
local group = {}
for _, part in ipairs(anchoredParts) do
if part ~= primaryPart then
local offset = primaryPart.CFrame:toObjectSpace(part.CFrame)
table.insert(group, {part = part, offset = offset})
end
end
table.insert(compiledGroups, {primaryPart = primaryPart, group = group})
local connection = primaryPart:GetPropertyChangedSignal("CFrame"):Connect(function()
updateBodyMovers(primaryPart)
end)
table.insert(compileConnections, connection)
local renderSteppedConnection = RunService.Heartbeat:Connect(function()
updateBodyMovers(primaryPart)
end)
table.insert(renderSteppedConnections, renderSteppedConnection)
end
local function cleanupCompiledGroups()
for _, groupData in ipairs(compiledGroups) do
for _, data in ipairs(groupData.group) do
if data.part then
if data.part:FindFirstChild("BodyPosition") then
data.part.BodyPosition:Destroy()
end
if data.part:FindFirstChild("BodyGyro") then
data.part.BodyGyro:Destroy()
end
end
end
if groupData.primaryPart and groupData.primaryPart.Parent then
local highlight = groupData.primaryPart:FindFirstChild("Highlight") or groupData.primaryPart.Parent:FindFirstChild("Highlight")
if highlight then
highlight:Destroy()
end
end
end
cleanupConnections(compileConnections)
cleanupConnections(renderSteppedConnections)
compiledGroups = {}
end
local function compileCoroutineFunc()
while true do
pcall(function()
for _, groupData in ipairs(compiledGroups) do
updateBodyMovers(groupData.primaryPart)
end
end)
wait()
end
end
local function unanchorPrimaryPart()
local primaryPart = anchoredParts[1]
if not primaryPart then return end
if primaryPart:FindFirstChild("BodyPosition") then
primaryPart.BodyPosition:Destroy()
end
if primaryPart:FindFirstChild("BodyGyro") then
primaryPart.BodyGyro:Destroy()
end
local highlight = primaryPart.Parent:FindFirstChild("Highlight") or primaryPart:FindFirstChild("Highlight")
if highlight then
highlight:Destroy()
end
end
local function recoverParts()
while true do
local success, err = pcall(function()
local character = localPlayer.Character
if character and character:FindFirstChild("Head") and character:FindFirstChild("HumanoidRootPart") then
local head = character.Head
local humanoidRootPart = character.HumanoidRootPart
for _, partModel in pairs(anchoredParts) do
coroutine.wrap(function()
if partModel then
local distance = (partModel.Position - humanoidRootPart.Position).Magnitude
if distance <= 30 then
local highlight = partModel:FindFirstChild("Highlight") or partModel.Parent:FindFirstChild("Highlight")
if highlight and highlight.OutlineColor == Color3.new(1, 0, 0) then
SetNetworkOwner:FireServer(partModel, partModel.CFrame)
if partModel:WaitForChild("PartOwner") and partModel.PartOwner.Value == localPlayer.Name then
highlight.OutlineColor = Color3.new(0, 0, 1)
print("yoyoyo set and r eady")
end
end
end
end
end)()
end
end
end)
wait(0.02)
end
end
local function ragdollAll()
while true do
local success, err = pcall(function()
if not toysFolder:FindFirstChild("FoodBanana") then
spawnItem("FoodBanana", Vector3.new(-72.9304581, -5.96906614, -265.543732))
end
local banana = toysFolder:WaitForChild("FoodBanana")
local bananaPeel
for _, part in pairs(banana:GetChildren()) do
if part.Name == "BananaPeel" and part:FindFirstChild("TouchInterest") then
part.Size = Vector3.new(10, 10, 10)
part.Transparency = 1
bananaPeel = part
break
end
end
local bodyPosition = Instance.new("BodyPosition")
bodyPosition.P = 20000
bodyPosition.Parent = banana.Main
while true do
for _, player in pairs(Players:GetChildren()) do
pcall(function()
if player.Character and player.Character ~= playerCharacter then
bananaPeel.Position = player.Character.HumanoidRootPart.Position or player.Character.Head.Position
bodyPosition.Position = playerCharacter.Head.Position + Vector3.new(0, 600, 0)
wait()
end
end)
end
wait()
end
end)
if not success then
warn("Error in ragdollAll: " .. tostring(err))
end
wait()
end
end
local function reloadMissile(bool)
if bool then
if not ownedToys[_G.ToyToLoad] then
Rayfield:Notify({
Title = "Missing toy",
Content = "You do not own the ".._G.ToyToLoad.." toy.",
Duration = 3,
Image = 4483362458,
})
return
end
if not reloadBombCoroutine then
reloadBombCoroutine = coroutine.create(function()
connectionBombReload = toysFolder.ChildAdded:Connect(function(child)
if child.Name == _G.ToyToLoad and child:WaitForChild("ThisToysNumber", 1) then
if child.ThisToysNumber.Value == (toysFolder.ToyNumber.Value - 1) then
local connection2
connection2 = toysFolder.ChildRemoved:Connect(function(child2)
if child2 == child then
connection2:Disconnect()
end
end)
SetNetworkOwner:FireServer(child.Body, child.Body.CFrame)
local waiting = child.Body:WaitForChild("PartOwner", 0.5)
local connection = child.DescendantAdded:Connect(function(descendant)
if descendant.Name == "PartOwner" then
if descendant.Value ~= localPlayer.Name then
DestroyT(child)
connection:Disconnect()
end
end
end)
Debris:AddItem(connectio, 60)
if waiting and waiting.Value == localPlayer.Name then
for _, v in pairs(child:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide = false
end
end
child:SetPrimaryPartCFrame(CFrame.new(-72.9304581, -3.96906614, -265.543732))
wait(0.2)
for _, v in pairs(child:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
table.insert(bombList, child)
child.AncestryChanged:Connect(function()
if not child.Parent then
for i, bomb in ipairs(bombList) do
if bomb == child then
table.remove(bombList, i)
break
end
end
end
end)
connection2:Disconnect()
else
DestroyT(child)
end
end
end
end)
while true do
if localPlayer.CanSpawnToy and localPlayer.CanSpawnToy.Value and #bombList < _G.MaxMissiles and playerCharacter:FindFirstChild("Head") then
spawnItemCf(_G.ToyToLoad, playerCharacter.Head.CFrame or playerCharacter.HumanoidRootPart.CFrame)
end
RunService.Heartbeat:Wait()
end
end)
coroutine.resume(reloadBombCoroutine)
end
else
if reloadBombCoroutine then
coroutine.close(reloadBombCoroutine)
reloadBombCoroutine = nil
end
if connectionBombReload then
connectionBombReload:Disconnect()
end
end
end
local function setupAntiExplosion(character)
local partOwner = character:WaitForChild("Humanoid"):FindFirstChild("Ragdolled")
if partOwner then
local partOwnerChangedConn
partOwnerChangedConn = partOwner:GetPropertyChangedSignal("Value"):Connect(function()
if partOwner.Value then
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = true
end
end
else
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = false
end
end
end
end)
antiExplosionConnection = partOwnerChangedConn
end
end
local blobalter = 1
local function blobGrabPlayer(player, blobman)
if blobalter == 1 then
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local args = {
[1] = blobman:FindFirstChild("LeftDetector"),
[2] = player.Character:FindFirstChild("HumanoidRootPart"),
[3] = blobman:FindFirstChild("LeftDetector"):FindFirstChild("LeftWeld")
}
blobman:WaitForChild("BlobmanSeatAndOwnerScript"):WaitForChild("CreatureGrab"):FireServer(unpack(args))
blobalter = 2
end
else
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local args = {
[1] = blobman:FindFirstChild("RightDetector"),
[2] = player.Character:FindFirstChild("HumanoidRootPart"),
[3] = blobman:FindFirstChild("RightDetector"):FindFirstChild("RightWeld")
}
blobman:WaitForChild("BlobmanSeatAndOwnerScript"):WaitForChild("CreatureGrab"):FireServer(unpack(args))
blobalter = 1
end
end
end
local version = getVersion()
local whitelistIdsStr = game:HttpGet("https://raw.githubusercontent.com/Undebolted/FTAP/main/WhitelistedUserId.txt")
local whitelistIdsTbl = HttpService:JSONDecode(whitelistIdsStr)
local whitelistIds = {}
for id, _ in pairs(whitelistIdsTbl) do
if tonumber(id) then
table.insert(whitelistIds, tonumber(id))
print(id)
end
end
local isWhitelisted = false
for _, v in pairs(whitelistIds) do
if v == localPlayer.UserId then
isWhitelisted = true
break
end
end
local localVersion = "8.2-stable"
if localVersion ~= version then
Rayfield:Notify({Title = "Cosmic Hub",Content = "Script.Ftap",Duration = 6.5,Image = 4483362458,})
setclipboard('loadstring(game:HttpGet("https://raw.githubusercontent.com/Undebolted/FTAP/main/Script.lua",true))()')
wait(12)
Rayfield:Destroy()
wait(9e9)
end
local Window = Rayfield:CreateWindow({
Name = "Cosmic Hub Keyless",
Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
LoadingTitle = "Cosmic Hub Keyless",
LoadingSubtitle = "Deobfuscated By Flashh",
Theme = "Amethyst", -- Check https://docs.sirius.menu/rayfield/configuration/themes
DisableRayfieldPrompts = false,
DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface
ConfigurationSaving = {
Enabled = true,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Cosmic Hub"
},
Discord = {
Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every time they load it up
},
KeySystem = false, -- Set this to true to use our key system
KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
}
})
local homeTab = Window:CreateTab("Home", 10723407389)
local GrabTab = Window:CreateTab("Combat", 10723404472)
local PlayerTab = Window:CreateTab("Local Player", 10747373176)
local ObjectGrabTab = Window:CreateTab("Object Grab", 10709782497)
local DefanseTab = Window:CreateTab("Anti Grab", 10734951847)
local BlobmanTab = Window:CreateTab("Blob Man", 10709782230)
local FunTab = Window:CreateTab("Fun / Troll", 10734964441)
local Paragraph = homeTab:CreateParagraph({Title = "UI / Rayfield", Content = "Rayfield library by sirius"})
local Divider = homeTab:CreateDivider()
local Paragraph = homeTab:CreateParagraph({Title = "Home!", Content = "Welcome to Cosmic Hub! "..Player.Name.." Thanks for useing script!"})
local Label = homeTab:CreateLabel("Chill Server / Discord", 10709797725, Color3.fromRGB(10, 10, 10), false) -- Title, Icon, Color, IgnoreTheme
local Button = homeTab:CreateButton({
Name = "Chill Server",
Callback = function()
setclipboard("https://discord.gg/ttbHpTVBtt")
end,
})
local Paragraph = homeTab:CreateParagraph({Title = "Info Log", Content = "Script Update log and Discord Update log"})
local Divider = homeTab:CreateDivider()
local Paragraph = homeTab:CreateParagraph({Title = "[Script Update]", Content = "[2025/02/19] | Added Get Coin"})
local Paragraph = homeTab:CreateParagraph({Title = "[Script Update]", Content = "[2025/02/20] | Added Key System"})
_G.strength = 400
local Paragraph = GrabTab:CreateParagraph({Title = "Combat Tab", Content = "Adjust the throwing force along the slider"})
local Slider = GrabTab:CreateSlider({
Name = "Strength Power",
Range = {300, 10000},
Increment = 1,
Suffix = "",
CurrentValue = 300,
Flag = "StrengthSlider",
Callback = function(Value)
_G.strength = 400
end,
})
local Toggle = GrabTab:CreateToggle({
Name = "Strength",
CurrentValue = false,
Flag = "StrengthToggle",
Callback = function(enabled)
if enabled then
strengthConnection = workspace.ChildAdded:Connect(function(model)
if model.Name == "GrabParts" then
local partToImpulse = model.GrabPart.WeldConstraint.Part1
if partToImpulse then
local velocityObj = Instance.new("BodyVelocity", partToImpulse)
model:GetPropertyChangedSignal("Parent"):Connect(function()
if not model.Parent then
if UserInputService:GetLastInputType() == Enum.UserInputType.MouseButton2 then
velocityObj.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
velocityObj.Velocity = workspace.CurrentCamera.CFrame.LookVector * _G.strength
Debris:AddItem(velocityObj, 1)
else
velocityObj:Destroy()
end
end
end)
end
end
end)
elseif strengthConnection then
strengthConnection:Disconnect()
end
end
})
local Paragraph = GrabTab:CreateParagraph({Title = "Grab stuff", Content = "These effects apply when you grab someone"})
local Toggle = GrabTab:CreateToggle({
Name = "Poison Grab",
CurrentValue = false,
Flag = "",
Callback = function(enabled)
if enabled then
poisonGrabCoroutine = coroutine.create(function() grabHandler("poison") end)
coroutine.resume(poisonGrabCoroutine)