-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFreemodel - C4
780 lines (690 loc) · 23.6 KB
/
Freemodel - C4
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
-- Converted using Mokiros's Model to Script Version 3
-- Converted string size: 3892 characters
local ScriptFunctions = {
function(script,require)
local NEVER_BREAK_JOINTS = false
local function CallOnChildren(Instance, FunctionToCall)
FunctionToCall(Instance)
for _, Child in next, Instance:GetChildren() do
CallOnChildren(Child, FunctionToCall)
end
end
local function GetNearestParent(Instance, ClassName)
-- Returns the nearest parent of a certain class, or returns nil
local Ancestor = Instance
repeat
Ancestor = Ancestor.Parent
if Ancestor == nil then
return nil
end
until Ancestor:IsA(ClassName)
return Ancestor
end
local function GetBricks(StartInstance)
local List = {}
-- if StartInstance:IsA("BasePart") then
-- List[#List+1] = StartInstance
-- end
CallOnChildren(StartInstance, function(Item)
if Item:IsA("BasePart") then
List[#List+1] = Item;
end
end)
return List
end
local function Modify(Instance, Values)
-- Modifies an Instance by using a table.
assert(type(Values) == "table", "Values is not a table");
for Index, Value in next, Values do
if type(Index) == "number" then
Value.Parent = Instance
else
Instance[Index] = Value
end
end
return Instance
end
local function Make(ClassType, Properties)
-- Using a syntax hack to create a nice way to Make new items.
return Modify(Instance.new(ClassType), Properties)
end
local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
local function HasWheelJoint(Part)
for _, SurfaceName in pairs(Surfaces) do
for _, HingSurfaceName in pairs(HingSurfaces) do
if Part[SurfaceName].Name == HingSurfaceName then
return true
end
end
end
return false
end
local function ShouldBreakJoints(Part)
--- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
-- definitely some edge cases.
if NEVER_BREAK_JOINTS then
return false
end
if HasWheelJoint(Part) then
return false
end
local Connected = Part:GetConnectedParts()
if #Connected == 1 then
return false
end
for _, Item in pairs(Connected) do
if HasWheelJoint(Item) then
return false
elseif not Item:IsDescendantOf(script.Parent) then
return false
end
end
return true
end
local function WeldTogether(Part0, Part1, JointType, WeldParent)
JointType = JointType or "Weld"
local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
Modify(NewWeld, {
Name = "qCFrameWeldThingy";
Part0 = Part0;
Part1 = Part1;
C0 = CFrame.new();--Part0.CFrame:inverse();
C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
Parent = Part1;
})
if not RelativeValue then
RelativeValue = Make("CFrameValue", {
Parent = Part1;
Name = "qRelativeCFrameWeldValue";
Archivable = true;
Value = NewWeld.C1;
})
end
return NewWeld
end
local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
-- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
-- @param MainPart The part to weld the model to (can be in the model).
-- @param [JointType] The type of joint. Defaults to weld.
-- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
for _, Part in pairs(Parts) do
if ShouldBreakJoints(Part) then
Part:BreakJoints()
end
end
for _, Part in pairs(Parts) do
if Part ~= MainPart then
WeldTogether(MainPart, Part, JointType, MainPart)
end
end
if not DoNotUnanchor then
for _, Part in pairs(Parts) do
Part.Anchored = false
end
MainPart.Anchored = false
end
end
local function PerfectionWeld()
local Tool = GetNearestParent(script, "Tool")
local Parts = GetBricks(script.Parent)
local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
if PrimaryPart then
WeldParts(Parts, PrimaryPart, "Weld", false)
else
warn("qWeld - Unable to weld part")
end
return Tool
end
local Tool = PerfectionWeld()
if Tool and script.ClassName == "Script" then
--- Don't bother with local scripts
script.Parent.AncestryChanged:connect(function()
PerfectionWeld()
end)
end
-- Created by Quenty (@Quenty, follow me on twitter).
end,
function(script,require)
local Tool = script.Parent
local Remote = Tool:WaitForChild("Remote")
local Handle = Tool:WaitForChild("Handle")
local DamageScript = script:WaitForChild("Damage")
local Config = Tool:WaitForChild("Config")
local Heartbeat = game:GetService("RunService").Heartbeat
local FriendlyFire = Config.Teamkill.Value
local Object = Tool.Handle:Clone()
local Beps = Object.Union
local CScript = NLS([==[local Player = game:GetService("Players").LocalPlayer
local UIS = game:GetService("UserInputService")
local Mouse = Player:GetMouse()
local Tool = script.Parent
local Remote = Tool:WaitForChild("Remote")
local Tracks = {}
local InputType = Enum.UserInputType
local IsEquipped = false
local BeganConnection, EndedConnection
function playAnimation(animName)
if Tracks[animName] then
Tracks[animName]:Play()
else
local anim = Tool:FindFirstChild(animName)
if anim and Tool.Parent and Tool.Parent:FindFirstChild("Humanoid") then
Tracks[animName] = Tool.Parent.Humanoid:LoadAnimation(anim)
playAnimation(animName)
end
end
end
function stopAnimation(animName)
if Tracks[animName] then
Tracks[animName]:Stop()
end
end
function inputBegan(input)
if input.UserInputType == InputType.MouseButton1 then
playAnimation("Animation")
wait(.6)
local lp = game.Players.LocalPlayer
local ms = lp:GetMouse()
if not IsEquipped then return end
Remote:FireServer(ms.Hit)
end
end
function onEquip()
BeganConnection = UIS.InputBegan:connect(inputBegan)
IsEquipped = true
end
function onUnequip()
if BeganConnection then
BeganConnection:disconnect()
BeganConnection = nil
IsEquipped = false
end
end
Tool.Equipped:connect(onEquip)
Tool.Unequipped:connect(onUnequip)]==],script.Parent)
local LeftDown = false
local AttackAble = true
local AttackVelocity = Config.Velocity.Value
local AttackDamage = Config.Damage.Value
local Character = nil
local Humanoid = nil
--returns the wielding player of this tool
function getPlayer()
local char = Tool.Parent
return game:GetService("Players"):GetPlayerFromCharacter(Character)
end
function Toss(direction)
local OriginalWalkSpeed = Humanoid.WalkSpeed
OriginalWalkSpeed = OriginalWalkSpeed
Humanoid.WalkSpeed = 0
local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
local spawnPos = Character.Head.Position
spawnPos = spawnPos + (direction * 5)
Tool.Handle.Transparency = 1
Object.Parent = workspace
Object.Transparency = 1
Object.Swing.Pitch = math.random(90, 110)/100
Object.Swing:Play()
Object.CanCollide = true
Object.CFrame = Tool.Handle.CFrame
Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
Object.Fuse:Play()
Object.Sparks.Enabled = true
local rand = 11.25
Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand))
Object:SetNetworkOwner(getPlayer())
local ScriptClone = DamageScript:Clone()
ScriptClone.FriendlyFire.Value = FriendlyFire
ScriptClone.Damage.Value = AttackDamage
ScriptClone.Parent = Object
ScriptClone.Disabled = false
local tag = Instance.new("ObjectValue")
tag.Value = getPlayer()
tag.Name = "creator"
tag.Parent = Object
Humanoid.WalkSpeed = OriginalWalkSpeed
Tool:Destroy()
end
Remote.OnServerEvent:Connect(function(player, mousePosition)
if not AttackAble then return end
AttackAble = false
if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
Remote:FireClient(getPlayer(), "PlayAnimation", "Animation")
end
local targetPos = mousePosition.p
local lookAt = (targetPos - Character.Head.Position).unit
Toss(lookAt)
LeftDown = true
end)
function onLeftUp()
LeftDown = false
end
Tool.Equipped:Connect(function()
Character = Tool.Parent
Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)
Tool.Unequipped:Connect(function()
Character = nil
Humanoid = nil
end)
end,
function(script,require)
local Object = script.Parent
local Used = false
local SplashDamage = 230
local Transparency = script.parent.parent.Handle.Union.Transparency
local Radius = 20
local Damage = script:WaitForChild("Damage").Value
local FriendlyFire = script:WaitForChild("FriendlyFire").Value
local Tag = Object:WaitForChild("creator")
local Debris = game:GetService("Debris")
local Beps = Object.Union
function OnExplosionHit(Character, hitDistance, blastCenter)
local Humanoid = Character:FindFirstChild("Humanoid")
if hitDistance and blastCenter then
local DistanceFactor = hitDistance/Radius
DistanceFactor = 1-DistanceFactor
if Humanoid then
if Humanoid.Health > 0 then
local HitDamage = DistanceFactor*SplashDamage
print(HitDamage)
Humanoid:TakeDamage(HitDamage)
end
end
end
end
function Explode()
local Orange = Color3.fromRGB(255, 193, 105)
local Gray = Color3.fromRGB(193, 178, 172)
local Bibi = Color3.fromRGB(53, 46, 45)
Object.Explosion.LightEmission = 1
Object.Explosion.LightInfluence = 0
Object.Explosion.Color = ColorSequence.new(Orange,Orange)
local Light = Instance.new("PointLight")
Light.Color = Color3.fromRGB(255, 233, 187)
Light.Brightness = 1
Light.Range = 6
Light.Shadows = true
Light.Parent = Object
local Explosion = Instance.new("Explosion")
Explosion.BlastRadius = Radius*.875
Explosion.BlastPressure = 0
Explosion.Position = Object.Position
Explosion.Parent = Object
Explosion.Visible = false
Explosion.Hit:Connect(function(hit, distance)
if hit.Name == "HumanoidRootPart" and hit.Parent:FindFirstChild("Humanoid") then
OnExplosionHit(hit.Parent, distance, Object.Position)
end
end)
local Children = Object:GetChildren()
for i=1,#Children do
if Children[i]:IsA("ParticleEmitter") then
Children[i].Enabled = false
end
end
wait(0.1)
Object.Explosion.LightEmission = 0
Object.Explosion.LightInfluence = 1
Object.Explosion.Color = ColorSequence.new(Bibi,Bibi)
Light:Destroy()
Object.Transparency = 1
Beps.Transparency = 1
wait(7.5)
Object:Destroy()
Object:Destroy()
end
--helpfully checks a table for a specific value
function contains(t, v)
for _, val in pairs(t) do
if val == v then
return true
end
end
return false
end
--used by checkTeams
function sameTeam(otherHuman)
local player = Tag.Value
local otherPlayer = game:GetService("Players"):GetPlayerFromCharacter(otherHuman.Parent)
if player and otherPlayer then
if player == otherPlayer then
return true
end
if otherPlayer.Neutral then
return false
end
return player.TeamColor == otherPlayer.TeamColor
end
return false
end
function tagHuman(human)
local tag = Tag:Clone()
tag.Parent = human
game:GetService("Debris"):AddItem(tag)
end
--use this to determine if you want this human to be harmed or not, returns boolean
function checkTeams(otherHuman)
return not (sameTeam(otherHuman) and not FriendlyFire==true)
end
function boom()
wait(5)
Used = true
Object.Anchored = true
Object.CanCollide = false
Object.Sparks.Enabled = false
Object.Orientation = Vector3.new(0,0,0)
Object.Transparency = 1
Object.Fuse:Stop()
Object.Explode:Play()
Object.Dist:Play()
Object.Explosion:Emit(30)
Object.Smoke1:Emit(30)
Object.Smoke2:Emit(30)
Object.Debris:Emit(10)
Object.exlight:Emit(2)
Object.dust:Emit(50)
Beps.Transparency = 1
Explode()
end
Object.Touched:Connect(function(part)
if Used == true or part.Name == "Handle" then return end
if part:IsDescendantOf(Tag.Value.Character) then return end
if part.Parent then
if part.Parent:FindFirstChild("Humanoid") then
local human = part.Parent.Humanoid
if checkTeams(human) then
tagHuman(human)
human:TakeDamage(Damage)
end
end
Used = true
Object.Impact:Play()
Object.Velocity = Vector3.new(Object.Velocity.x/10,Object.Velocity.y/10,Object.Velocity.z/10)
Object.RotVelocity = Vector3.new(Object.RotVelocity.x/10,Object.RotVelocity.y/10,Object.RotVelocity.z/10)
game:GetService("Debris"):AddItem(Object, 10)
end
end)
boom()
end
}
local ScriptIndex = 0
local Scripts,ModuleScripts,ModuleCache = {},{},{}
local _require = require
function require(obj,...)
local index = ModuleScripts[obj]
if not index then
local a,b = pcall(_require,obj,...)
return not a and error(b,2) or b
end
local res = ModuleCache[index]
if res then return res end
res = ScriptFunctions[index](obj,require)
if res==nil then error("Module code did not return exactly one value",2) end
ModuleCache[index] = res
return res
end
local function Script(obj,ismodule)
ScriptIndex = ScriptIndex + 1
local t = ismodule and ModuleScripts or Scripts
t[obj] = ScriptIndex
end
function RunScripts()
for script, index in pairs(Scripts) do
coroutine.wrap(function()
ScriptFunctions[index](script, require)
end)()
end
end
local function Decode(str)
local StringLength = #str
-- Base64 decoding
do
local decoder = {}
for b64code, char in pairs(('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='):split('')) do
decoder[char:byte()] = b64code-1
end
local n = StringLength
local t,k = table.create(math.floor(n/4)+1),1
local padding = str:sub(-2) == '==' and 2 or str:sub(-1) == '=' and 1 or 0
for i = 1, padding > 0 and n-4 or n, 4 do
local a, b, c, d = str:byte(i,i+3)
local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d]
t[k] = string.char(bit32.extract(v,16,8),bit32.extract(v,8,8),bit32.extract(v,0,8))
k = k + 1
end
if padding == 1 then
local a, b, c = str:byte(n-3,n-1)
local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40
t[k] = string.char(bit32.extract(v,16,8),bit32.extract(v,8,8))
elseif padding == 2 then
local a, b = str:byte(n-3,n-2)
local v = decoder[a]*0x40000 + decoder[b]*0x1000
t[k] = string.char(bit32.extract(v,16,8))
end
str = table.concat(t)
end
local Position = 1
local function Parse(fmt)
local Values = {string.unpack(fmt,str,Position)}
Position = table.remove(Values)
return table.unpack(Values)
end
local Settings = Parse('B')
local Flags = Parse('B')
Flags = {
--[[ValueIndexByteLength]] bit32.extract(Flags,6,2)+1,
--[[InstanceIndexByteLength]] bit32.extract(Flags,4,2)+1,
--[[ConnectionsIndexByteLength]] bit32.extract(Flags,2,2)+1,
--[[MaxPropertiesLengthByteLength]] bit32.extract(Flags,0,2)+1,
--[[Use Double instead of Float]] bit32.band(Settings,0b1) > 0
}
local ValueFMT = ('I'..Flags[1])
local InstanceFMT = ('I'..Flags[2])
local ConnectionFMT = ('I'..Flags[3])
local PropertyLengthFMT = ('I'..Flags[4])
local ValuesLength = Parse(ValueFMT)
local Values = table.create(ValuesLength)
local CFrameIndexes = {}
local ValueDecoders = {
--!!Start
[1] = function(Modifier)
return Parse('s'..Modifier)
end,
--!!Split
[2] = function(Modifier)
return Modifier ~= 0
end,
--!!Split
[3] = function()
return Parse('d')
end,
--!!Split
[4] = function(_,Index)
table.insert(CFrameIndexes,{Index,Parse(('I'..Flags[1]):rep(3))})
end,
--!!Split
[5] = {CFrame.new,Flags[5] and 'dddddddddddd' or 'ffffffffffff'},
--!!Split
[6] = {Color3.fromRGB,'BBB'},
--!!Split
[7] = {BrickColor.new,'I2'},
--!!Split
[8] = function(Modifier)
local len = Parse('I'..Modifier)
local kpts = table.create(len)
for i = 1,len do
kpts[i] = ColorSequenceKeypoint.new(Parse('f'),Color3.fromRGB(Parse('BBB')))
end
return ColorSequence.new(kpts)
end,
--!!Split
[9] = function(Modifier)
local len = Parse('I'..Modifier)
local kpts = table.create(len)
for i = 1,len do
kpts[i] = NumberSequenceKeypoint.new(Parse(Flags[5] and 'ddd' or 'fff'))
end
return NumberSequence.new(kpts)
end,
--!!Split
[10] = {Vector3.new,Flags[5] and 'ddd' or 'fff'},
--!!Split
[11] = {Vector2.new,Flags[5] and 'dd' or 'ff'},
--!!Split
[12] = {UDim2.new,Flags[5] and 'di2di2' or 'fi2fi2'},
--!!Split
[13] = {Rect.new,Flags[5] and 'dddd' or 'ffff'},
--!!Split
[14] = function()
local flags = Parse('B')
local ids = {"Top","Bottom","Left","Right","Front","Back"}
local t = {}
for i = 0,5 do
if bit32.extract(flags,i,1)==1 then
table.insert(t,Enum.NormalId[ids[i+1]])
end
end
return Axes.new(unpack(t))
end,
--!!Split
[15] = function()
local flags = Parse('B')
local ids = {"Top","Bottom","Left","Right","Front","Back"}
local t = {}
for i = 0,5 do
if bit32.extract(flags,i,1)==1 then
table.insert(t,Enum.NormalId[ids[i+1]])
end
end
return Faces.new(unpack(t))
end,
--!!Split
[16] = {PhysicalProperties.new,Flags[5] and 'ddddd' or 'fffff'},
--!!Split
[17] = {NumberRange.new,Flags[5] and 'dd' or 'ff'},
--!!Split
[18] = {UDim.new,Flags[5] and 'di2' or 'fi2'},
--!!Split
[19] = function()
return Ray.new(Vector3.new(Parse(Flags[5] and 'ddd' or 'fff')),Vector3.new(Parse(Flags[5] and 'ddd' or 'fff')))
end
--!!End
}
for i = 1,ValuesLength do
local TypeAndModifier = Parse('B')
local Type = bit32.band(TypeAndModifier,0b11111)
local Modifier = (TypeAndModifier - Type) / 0b100000
local Decoder = ValueDecoders[Type]
if type(Decoder)=='function' then
Values[i] = Decoder(Modifier,i)
else
Values[i] = Decoder[1](Parse(Decoder[2]))
end
end
for i,t in pairs(CFrameIndexes) do
Values[t[1]] = CFrame.fromMatrix(Values[t[2]],Values[t[3]],Values[t[4]])
end
local InstancesLength = Parse(InstanceFMT)
local Instances = {}
local NoParent = {}
for i = 1,InstancesLength do
local ClassName = Values[Parse(ValueFMT)]
local obj
local MeshPartMesh,MeshPartScale
if ClassName == "UnionOperation" then
obj = DecodeUnion(Values,Flags,Parse)
obj.UsePartColor = true
elseif ClassName:find("Script") then
obj = Instance.new("Folder")
Script(obj,ClassName=='ModuleScript')
elseif ClassName == "MeshPart" then
obj = Instance.new("Part")
MeshPartMesh = Instance.new("SpecialMesh")
MeshPartMesh.MeshType = Enum.MeshType.FileMesh
MeshPartMesh.Parent = obj
else
obj = Instance.new(ClassName)
end
local Parent = Instances[Parse(InstanceFMT)]
local PropertiesLength = Parse(PropertyLengthFMT)
local AttributesLength = Parse(PropertyLengthFMT)
Instances[i] = obj
for i = 1,PropertiesLength do
local Prop,Value = Values[Parse(ValueFMT)],Values[Parse(ValueFMT)]
-- ok this looks awful
if MeshPartMesh then
if Prop == "MeshId" then
MeshPartMesh.MeshId = Value
continue
elseif Prop == "TextureID" then
MeshPartMesh.TextureId = Value
continue
elseif Prop == "Size" then
if not MeshPartScale then
MeshPartScale = Value
else
MeshPartMesh.Scale = Value / MeshPartScale
end
elseif Prop == "MeshSize" then
if not MeshPartScale then
MeshPartScale = Value
MeshPartMesh.Scale = obj.Size / Value
else
MeshPartMesh.Scale = MeshPartScale / Value
end
continue
end
end
obj[Prop] = Value
end
if MeshPartMesh then
if MeshPartMesh.MeshId=='' then
if MeshPartMesh.TextureId=='' then
MeshPartMesh.TextureId = 'rbxasset://textures/meshPartFallback.png'
end
MeshPartMesh.Scale = obj.Size
end
end
for i = 1,AttributesLength do
obj:SetAttribute(Values[Parse(ValueFMT)],Values[Parse(ValueFMT)])
end
if not Parent then
table.insert(NoParent,obj)
else
obj.Parent = Parent
end
end
local ConnectionsLength = Parse(ConnectionFMT)
for i = 1,ConnectionsLength do
local a,b,c = Parse(InstanceFMT),Parse(ValueFMT),Parse(InstanceFMT)
Instances[a][Values[b]] = Instances[c]
end
return NoParent
end
local Objects = Decode('AAC4IQRUb29sIQROYW1lIQJDNCEKV29ybGRQaXZvdAQltbYhC1JlbW90ZUV2ZW50IQZSZW1vdGUhCUFuaW1hdGlvbiELQW5pbWF0aW9uSWQhF3JieGFzc2V0aWQ6Ly8xMDUxNDAwMzY2IQ1Db25maWd1cmF0aW9uIQZDb25maWchC051bWJlclZhbHVlIQZEYW1hZ2Uh'
..'BVZhbHVlAwAAAACAh8NAIQhWZWxvY2l0eQMAAAAAAIBYQCEJQm9vbFZhbHVlIQhUZWFta2lsbCIhBFBhcnQhBkhhbmRsZSEIQW5jaG9yZWQhDUJvdHRvbVN1cmZhY2UDAAAAAAAAAAAhCkJyaWNrQ29sb3IHjQA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