@kunosyn/shatterbox 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/package.json +36 -0
- package/src/Effects.d.ts +134 -0
- package/src/Effects.luau +114 -0
- package/src/Settings.luau +75 -0
- package/src/index.d.ts +617 -0
- package/src/init.luau +2580 -0
- package/src/lib/Client.luau +4020 -0
- package/src/lib/InitializeShatterboxClients.client.luau +10 -0
- package/src/lib/ObjectCache.luau +198 -0
- package/src/lib/PartOperations.luau +673 -0
- package/src/lib/Server.luau +4425 -0
- package/src/lib/VertexMath.luau +403 -0
- package/src/types.ts +504 -0
- package/src/util/HitboxVisualizer.luau +101 -0
- package/src/util/TaggedArray.luau +66 -0
|
@@ -0,0 +1,4020 @@
|
|
|
1
|
+
--!strict
|
|
2
|
+
--!native
|
|
3
|
+
--!optimize 2
|
|
4
|
+
--!nolint LocalShadow
|
|
5
|
+
--#selene: allow(shadowing)
|
|
6
|
+
-- File generated by Blink v0.17.4 (https://github.com/1Axen/Blink)
|
|
7
|
+
-- This file is not meant to be edited
|
|
8
|
+
|
|
9
|
+
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
10
|
+
local RunService = game:GetService("RunService")
|
|
11
|
+
|
|
12
|
+
local BASE_EVENT_NAME = "BLINK"
|
|
13
|
+
local Invocations = 0
|
|
14
|
+
|
|
15
|
+
local SendSize = 64
|
|
16
|
+
local SendOffset = 0
|
|
17
|
+
local SendCursor = 0
|
|
18
|
+
local SendBuffer = buffer.create(64)
|
|
19
|
+
local SendInstances = {}
|
|
20
|
+
|
|
21
|
+
local RecieveCursor = 0
|
|
22
|
+
local RecieveBuffer = buffer.create(64)
|
|
23
|
+
|
|
24
|
+
local RecieveInstances = {}
|
|
25
|
+
local RecieveInstanceCursor = 0
|
|
26
|
+
|
|
27
|
+
local Null = newproxy()
|
|
28
|
+
|
|
29
|
+
type Entry = {
|
|
30
|
+
value: any,
|
|
31
|
+
next: Entry?
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type Queue = {
|
|
35
|
+
head: Entry?,
|
|
36
|
+
tail: Entry?
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type BufferSave = {
|
|
40
|
+
Size: number,
|
|
41
|
+
Cursor: number,
|
|
42
|
+
Buffer: buffer,
|
|
43
|
+
Instances: {Instance}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
local function Read(Bytes: number)
|
|
47
|
+
local Offset = RecieveCursor
|
|
48
|
+
RecieveCursor += Bytes
|
|
49
|
+
return Offset
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
local function Save(): BufferSave
|
|
53
|
+
return {
|
|
54
|
+
Size = SendSize,
|
|
55
|
+
Cursor = SendCursor,
|
|
56
|
+
Buffer = SendBuffer,
|
|
57
|
+
Instances = SendInstances
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
local function Load(Save: BufferSave?)
|
|
62
|
+
if Save then
|
|
63
|
+
SendSize = Save.Size
|
|
64
|
+
SendCursor = Save.Cursor
|
|
65
|
+
SendOffset = Save.Cursor
|
|
66
|
+
SendBuffer = Save.Buffer
|
|
67
|
+
SendInstances = Save.Instances
|
|
68
|
+
return
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
SendSize = 64
|
|
72
|
+
SendCursor = 0
|
|
73
|
+
SendOffset = 0
|
|
74
|
+
SendBuffer = buffer.create(64)
|
|
75
|
+
SendInstances = {}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
local function Invoke()
|
|
79
|
+
if Invocations == 255 then
|
|
80
|
+
Invocations = 0
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
local Invocation = Invocations
|
|
84
|
+
Invocations += 1
|
|
85
|
+
return Invocation
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
local function Allocate(Bytes: number)
|
|
89
|
+
local InUse = (SendCursor + Bytes)
|
|
90
|
+
if InUse > SendSize then
|
|
91
|
+
--> Avoid resizing the buffer for every write
|
|
92
|
+
while InUse > SendSize do
|
|
93
|
+
SendSize *= 1.5
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
local Buffer = buffer.create(SendSize)
|
|
97
|
+
buffer.copy(Buffer, 0, SendBuffer, 0, SendCursor)
|
|
98
|
+
SendBuffer = Buffer
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
SendOffset = SendCursor
|
|
102
|
+
SendCursor += Bytes
|
|
103
|
+
|
|
104
|
+
return SendOffset
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
local function CreateQueue(): Queue
|
|
108
|
+
return {
|
|
109
|
+
head = nil,
|
|
110
|
+
tail = nil
|
|
111
|
+
}
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
local function Pop(queue: Queue): any
|
|
115
|
+
local head = queue.head
|
|
116
|
+
if head == nil then
|
|
117
|
+
return
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
queue.head = head.next
|
|
121
|
+
return head.value
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
local function Push(queue: Queue, value: any)
|
|
125
|
+
local entry: Entry = {
|
|
126
|
+
value = value,
|
|
127
|
+
next = nil
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if queue.tail ~= nil then
|
|
131
|
+
queue.tail.next = entry
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
queue.tail = entry
|
|
135
|
+
|
|
136
|
+
if queue.head == nil then
|
|
137
|
+
queue.head = entry
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
local Calls = table.create(256)
|
|
142
|
+
|
|
143
|
+
local Events: any = {
|
|
144
|
+
Reliable = table.create(256),
|
|
145
|
+
Unreliable = table.create(256)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
local Queue: any = {
|
|
149
|
+
Reliable = table.create(256),
|
|
150
|
+
Unreliable = table.create(256)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
Events.Reliable[0] = {}
|
|
154
|
+
Queue.Reliable[0] = table.create(256)
|
|
155
|
+
Events.Reliable[1] = {}
|
|
156
|
+
Queue.Reliable[1] = table.create(256)
|
|
157
|
+
Events.Reliable[2] = {}
|
|
158
|
+
Queue.Reliable[2] = table.create(256)
|
|
159
|
+
Events.Reliable[3] = {}
|
|
160
|
+
Queue.Reliable[3] = table.create(256)
|
|
161
|
+
Events.Unreliable[0] = {}
|
|
162
|
+
Queue.Unreliable[0] = table.create(256)
|
|
163
|
+
Events.Reliable[4] = {}
|
|
164
|
+
Queue.Reliable[4] = table.create(256)
|
|
165
|
+
Events.Reliable[6] = {}
|
|
166
|
+
Queue.Reliable[6] = table.create(256)
|
|
167
|
+
Events.Reliable[7] = {}
|
|
168
|
+
Queue.Reliable[7] = table.create(256)
|
|
169
|
+
Events.Reliable[8] = {}
|
|
170
|
+
Queue.Reliable[8] = table.create(256)
|
|
171
|
+
Events.Reliable[10] = {}
|
|
172
|
+
Queue.Reliable[10] = table.create(256)
|
|
173
|
+
export type Shatterbox_Vec2 = { number }
|
|
174
|
+
export type Shatterbox_Decal = { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? }
|
|
175
|
+
export type Shatterbox_Texture = { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? }
|
|
176
|
+
export type Shatterbox_Light = { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? }
|
|
177
|
+
export type Shatterbox_PartProperties = { Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }
|
|
178
|
+
export type Shatterbox_Box = { CFrame: CFrame, Size: Vector3 }
|
|
179
|
+
export type Shatterbox_Hitbox = { CFrame: CFrame, Size: Vector3, Shape: number }
|
|
180
|
+
export type Shatterbox_PartInstance = { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }
|
|
181
|
+
export type Shatterbox_Puppet = { GUID: string, CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }
|
|
182
|
+
export type Shatterbox_DestructionParamsType = { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? }
|
|
183
|
+
export type Shatterbox_PuppetState = { GUID: string, CFrame: CFrame }
|
|
184
|
+
local function Shatterbox_ReadEVENT_SignalClearQueue(): (nil)
|
|
185
|
+
return nil
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
local function Shatterbox_ReadEVENT_SignalReset(): (boolean)
|
|
189
|
+
-- Read BLOCK: 1 bytes
|
|
190
|
+
local BLOCK_START = Read(1)
|
|
191
|
+
local Value = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
192
|
+
return Value
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
local function Shatterbox_ReadEVENT_SignalResetArea(): (CFrame, Vector3)
|
|
196
|
+
-- Read BLOCK: 36 bytes
|
|
197
|
+
local BLOCK_START = Read(36)
|
|
198
|
+
local X = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
199
|
+
local Y = buffer.readf32(RecieveBuffer, BLOCK_START + 4)
|
|
200
|
+
local Z = buffer.readf32(RecieveBuffer, BLOCK_START + 8)
|
|
201
|
+
local Position = Vector3.new(X, Y, Z)
|
|
202
|
+
local rX = buffer.readf32(RecieveBuffer, BLOCK_START + 12)
|
|
203
|
+
local rY = buffer.readf32(RecieveBuffer, BLOCK_START + 16)
|
|
204
|
+
local rZ = buffer.readf32(RecieveBuffer, BLOCK_START + 20)
|
|
205
|
+
local Value1 = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
206
|
+
X = buffer.readf32(RecieveBuffer, BLOCK_START + 24)
|
|
207
|
+
Y = buffer.readf32(RecieveBuffer, BLOCK_START + 28)
|
|
208
|
+
Z = buffer.readf32(RecieveBuffer, BLOCK_START + 32)
|
|
209
|
+
local Value2 = Vector3.new(X, Y, Z)
|
|
210
|
+
return Value1, Value2
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
local function Shatterbox_ReadEVENT_CreatePuppets(): ({ { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } })
|
|
214
|
+
-- Read BLOCK: 2 bytes
|
|
215
|
+
local BLOCK_START = Read(2)
|
|
216
|
+
-- START ARRAY
|
|
217
|
+
local Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
218
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
219
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
220
|
+
local Value = table.create(Length)
|
|
221
|
+
-- Read BLOCK: 56 bytes
|
|
222
|
+
local ARRAY_START_1 = Read(56 * Length)
|
|
223
|
+
for Index = 1, Length do
|
|
224
|
+
local Item_1 = {} :: any
|
|
225
|
+
-- Read 4
|
|
226
|
+
local OPERATION_OFFSET_0 = ARRAY_START_1
|
|
227
|
+
ARRAY_START_1 += 4
|
|
228
|
+
local X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
229
|
+
-- Read 4
|
|
230
|
+
local OPERATION_OFFSET_1 = ARRAY_START_1
|
|
231
|
+
ARRAY_START_1 += 4
|
|
232
|
+
local Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_1)
|
|
233
|
+
-- Read 4
|
|
234
|
+
local OPERATION_OFFSET_2 = ARRAY_START_1
|
|
235
|
+
ARRAY_START_1 += 4
|
|
236
|
+
local Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_2)
|
|
237
|
+
local Position = Vector3.new(X, Y, Z)
|
|
238
|
+
-- Read 4
|
|
239
|
+
local OPERATION_OFFSET_3 = ARRAY_START_1
|
|
240
|
+
ARRAY_START_1 += 4
|
|
241
|
+
local rX = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_3)
|
|
242
|
+
-- Read 4
|
|
243
|
+
local OPERATION_OFFSET_4 = ARRAY_START_1
|
|
244
|
+
ARRAY_START_1 += 4
|
|
245
|
+
local rY = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_4)
|
|
246
|
+
-- Read 4
|
|
247
|
+
local OPERATION_OFFSET_5 = ARRAY_START_1
|
|
248
|
+
ARRAY_START_1 += 4
|
|
249
|
+
local rZ = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_5)
|
|
250
|
+
Item_1.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
251
|
+
-- Read 4
|
|
252
|
+
local OPERATION_OFFSET_6 = ARRAY_START_1
|
|
253
|
+
ARRAY_START_1 += 4
|
|
254
|
+
X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_6)
|
|
255
|
+
-- Read 4
|
|
256
|
+
local OPERATION_OFFSET_7 = ARRAY_START_1
|
|
257
|
+
ARRAY_START_1 += 4
|
|
258
|
+
Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_7)
|
|
259
|
+
-- Read 4
|
|
260
|
+
local OPERATION_OFFSET_8 = ARRAY_START_1
|
|
261
|
+
ARRAY_START_1 += 4
|
|
262
|
+
Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_8)
|
|
263
|
+
Item_1.Size = Vector3.new(X, Y, Z)
|
|
264
|
+
-- Read 1
|
|
265
|
+
local OPERATION_OFFSET_9 = ARRAY_START_1
|
|
266
|
+
ARRAY_START_1 += 1
|
|
267
|
+
Item_1.Anchored = (buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1)
|
|
268
|
+
-- Read 1
|
|
269
|
+
local OPERATION_OFFSET_10 = ARRAY_START_1
|
|
270
|
+
ARRAY_START_1 += 1
|
|
271
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
272
|
+
-- Read BLOCK: 3 bytes
|
|
273
|
+
local BLOCK_START = Read(3)
|
|
274
|
+
Item_1.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
275
|
+
end
|
|
276
|
+
-- Read 1
|
|
277
|
+
local OPERATION_OFFSET_11 = ARRAY_START_1
|
|
278
|
+
ARRAY_START_1 += 1
|
|
279
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_11) == 1 then
|
|
280
|
+
-- Read BLOCK: 2 bytes
|
|
281
|
+
local BLOCK_START = Read(2)
|
|
282
|
+
Item_1.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
283
|
+
if Item_1.Material < 256 then error(`Expected "Item_1.Material" to be larger than 256, got {Item_1.Material} instead.`) end
|
|
284
|
+
if Item_1.Material > 2311 then error(`Expected "Item_1.Material" to be smaller than 2311, got {Item_1.Material} instead.`) end
|
|
285
|
+
end
|
|
286
|
+
-- Read 1
|
|
287
|
+
local OPERATION_OFFSET_12 = ARRAY_START_1
|
|
288
|
+
ARRAY_START_1 += 1
|
|
289
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_12) == 1 then
|
|
290
|
+
-- Read BLOCK: 2 bytes
|
|
291
|
+
local BLOCK_START = Read(2)
|
|
292
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
293
|
+
local MantissaExponent = Encoded % 0x8000
|
|
294
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
295
|
+
if Encoded // 0x8000 == 1 then
|
|
296
|
+
Item_1.Transparency = -math.huge
|
|
297
|
+
else
|
|
298
|
+
Item_1.Transparency = math.huge
|
|
299
|
+
end
|
|
300
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
301
|
+
Item_1.Transparency = 0 / 0
|
|
302
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
303
|
+
Item_1.Transparency = 0
|
|
304
|
+
else
|
|
305
|
+
local Mantissa = MantissaExponent % 0x400
|
|
306
|
+
local Exponent = MantissaExponent // 0x400
|
|
307
|
+
local Fraction;
|
|
308
|
+
if Exponent == 0 then
|
|
309
|
+
Fraction = Mantissa / 0x400
|
|
310
|
+
else
|
|
311
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
312
|
+
end
|
|
313
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
314
|
+
Item_1.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
-- Read 1
|
|
318
|
+
local OPERATION_OFFSET_13 = ARRAY_START_1
|
|
319
|
+
ARRAY_START_1 += 1
|
|
320
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_13) == 1 then
|
|
321
|
+
-- Read BLOCK: 2 bytes
|
|
322
|
+
local BLOCK_START = Read(2)
|
|
323
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
324
|
+
local MantissaExponent = Encoded % 0x8000
|
|
325
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
326
|
+
if Encoded // 0x8000 == 1 then
|
|
327
|
+
Item_1.Reflectance = -math.huge
|
|
328
|
+
else
|
|
329
|
+
Item_1.Reflectance = math.huge
|
|
330
|
+
end
|
|
331
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
332
|
+
Item_1.Reflectance = 0 / 0
|
|
333
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
334
|
+
Item_1.Reflectance = 0
|
|
335
|
+
else
|
|
336
|
+
local Mantissa = MantissaExponent % 0x400
|
|
337
|
+
local Exponent = MantissaExponent // 0x400
|
|
338
|
+
local Fraction;
|
|
339
|
+
if Exponent == 0 then
|
|
340
|
+
Fraction = Mantissa / 0x400
|
|
341
|
+
else
|
|
342
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
343
|
+
end
|
|
344
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
345
|
+
Item_1.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
-- Read 1
|
|
349
|
+
local OPERATION_OFFSET_14 = ARRAY_START_1
|
|
350
|
+
ARRAY_START_1 += 1
|
|
351
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_14) == 1 then
|
|
352
|
+
-- Read BLOCK: 2 bytes
|
|
353
|
+
local BLOCK_START = Read(2)
|
|
354
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
355
|
+
Item_1.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
356
|
+
end
|
|
357
|
+
-- Read 1
|
|
358
|
+
local OPERATION_OFFSET_15 = ARRAY_START_1
|
|
359
|
+
ARRAY_START_1 += 1
|
|
360
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_15) == 1 then
|
|
361
|
+
-- Read BLOCK: 2 bytes
|
|
362
|
+
local BLOCK_START = Read(2)
|
|
363
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
364
|
+
Item_1.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
365
|
+
end
|
|
366
|
+
-- Read 1
|
|
367
|
+
local OPERATION_OFFSET_16 = ARRAY_START_1
|
|
368
|
+
ARRAY_START_1 += 1
|
|
369
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_16) == 1 then
|
|
370
|
+
-- Read BLOCK: 1 bytes
|
|
371
|
+
local BLOCK_START = Read(1)
|
|
372
|
+
Item_1.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
373
|
+
if Item_1.LeftSurface < 0 then error(`Expected "Item_1.LeftSurface" to be larger than 0, got {Item_1.LeftSurface} instead.`) end
|
|
374
|
+
if Item_1.LeftSurface > 10 then error(`Expected "Item_1.LeftSurface" to be smaller than 10, got {Item_1.LeftSurface} instead.`) end
|
|
375
|
+
end
|
|
376
|
+
-- Read 1
|
|
377
|
+
local OPERATION_OFFSET_17 = ARRAY_START_1
|
|
378
|
+
ARRAY_START_1 += 1
|
|
379
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_17) == 1 then
|
|
380
|
+
-- Read BLOCK: 1 bytes
|
|
381
|
+
local BLOCK_START = Read(1)
|
|
382
|
+
Item_1.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
383
|
+
if Item_1.RightSurface < 0 then error(`Expected "Item_1.RightSurface" to be larger than 0, got {Item_1.RightSurface} instead.`) end
|
|
384
|
+
if Item_1.RightSurface > 10 then error(`Expected "Item_1.RightSurface" to be smaller than 10, got {Item_1.RightSurface} instead.`) end
|
|
385
|
+
end
|
|
386
|
+
-- Read 1
|
|
387
|
+
local OPERATION_OFFSET_18 = ARRAY_START_1
|
|
388
|
+
ARRAY_START_1 += 1
|
|
389
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_18) == 1 then
|
|
390
|
+
-- Read BLOCK: 1 bytes
|
|
391
|
+
local BLOCK_START = Read(1)
|
|
392
|
+
Item_1.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
393
|
+
if Item_1.FrontSurface < 0 then error(`Expected "Item_1.FrontSurface" to be larger than 0, got {Item_1.FrontSurface} instead.`) end
|
|
394
|
+
if Item_1.FrontSurface > 10 then error(`Expected "Item_1.FrontSurface" to be smaller than 10, got {Item_1.FrontSurface} instead.`) end
|
|
395
|
+
end
|
|
396
|
+
-- Read 1
|
|
397
|
+
local OPERATION_OFFSET_19 = ARRAY_START_1
|
|
398
|
+
ARRAY_START_1 += 1
|
|
399
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_19) == 1 then
|
|
400
|
+
-- Read BLOCK: 1 bytes
|
|
401
|
+
local BLOCK_START = Read(1)
|
|
402
|
+
Item_1.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
403
|
+
if Item_1.BackSurface < 0 then error(`Expected "Item_1.BackSurface" to be larger than 0, got {Item_1.BackSurface} instead.`) end
|
|
404
|
+
if Item_1.BackSurface > 10 then error(`Expected "Item_1.BackSurface" to be smaller than 10, got {Item_1.BackSurface} instead.`) end
|
|
405
|
+
end
|
|
406
|
+
-- Read 1
|
|
407
|
+
local OPERATION_OFFSET_20 = ARRAY_START_1
|
|
408
|
+
ARRAY_START_1 += 1
|
|
409
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_20) == 1 then
|
|
410
|
+
-- Read BLOCK: 1 bytes
|
|
411
|
+
local BLOCK_START = Read(1)
|
|
412
|
+
Item_1.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
413
|
+
if Item_1.TopSurface < 0 then error(`Expected "Item_1.TopSurface" to be larger than 0, got {Item_1.TopSurface} instead.`) end
|
|
414
|
+
if Item_1.TopSurface > 10 then error(`Expected "Item_1.TopSurface" to be smaller than 10, got {Item_1.TopSurface} instead.`) end
|
|
415
|
+
end
|
|
416
|
+
-- Read 1
|
|
417
|
+
local OPERATION_OFFSET_21 = ARRAY_START_1
|
|
418
|
+
ARRAY_START_1 += 1
|
|
419
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_21) == 1 then
|
|
420
|
+
-- Read BLOCK: 1 bytes
|
|
421
|
+
local BLOCK_START = Read(1)
|
|
422
|
+
Item_1.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
423
|
+
if Item_1.BottomSurface < 0 then error(`Expected "Item_1.BottomSurface" to be larger than 0, got {Item_1.BottomSurface} instead.`) end
|
|
424
|
+
if Item_1.BottomSurface > 10 then error(`Expected "Item_1.BottomSurface" to be smaller than 10, got {Item_1.BottomSurface} instead.`) end
|
|
425
|
+
end
|
|
426
|
+
-- Read 1
|
|
427
|
+
local OPERATION_OFFSET_22 = ARRAY_START_1
|
|
428
|
+
ARRAY_START_1 += 1
|
|
429
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_22) == 1 then
|
|
430
|
+
-- Read BLOCK: 2 bytes
|
|
431
|
+
local BLOCK_START = Read(2)
|
|
432
|
+
-- START ARRAY
|
|
433
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
434
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
435
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
436
|
+
Item_1.Textures = table.create(Length)
|
|
437
|
+
-- Read BLOCK: 11 bytes
|
|
438
|
+
local ARRAY_START_3 = Read(11 * Length)
|
|
439
|
+
for Index = 1, Length do
|
|
440
|
+
local Item_3 = {} :: any
|
|
441
|
+
-- Read 1
|
|
442
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
443
|
+
ARRAY_START_3 += 1
|
|
444
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
445
|
+
-- Read BLOCK: 3 bytes
|
|
446
|
+
local BLOCK_START = Read(3)
|
|
447
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
448
|
+
end
|
|
449
|
+
-- Read 1
|
|
450
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
451
|
+
ARRAY_START_3 += 1
|
|
452
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
453
|
+
-- Read BLOCK: 2 bytes
|
|
454
|
+
local BLOCK_START = Read(2)
|
|
455
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
456
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
457
|
+
end
|
|
458
|
+
-- Read 1
|
|
459
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
460
|
+
ARRAY_START_3 += 1
|
|
461
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
462
|
+
-- Read BLOCK: 4 bytes
|
|
463
|
+
local BLOCK_START = Read(4)
|
|
464
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
465
|
+
end
|
|
466
|
+
-- Read 1
|
|
467
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
468
|
+
ARRAY_START_3 += 1
|
|
469
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
470
|
+
-- START ARRAY
|
|
471
|
+
local Length = 2
|
|
472
|
+
Item_3.UVOffset = table.create(Length)
|
|
473
|
+
-- Read BLOCK: 4 bytes
|
|
474
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
475
|
+
for Index = 1, Length do
|
|
476
|
+
-- Read 4
|
|
477
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
478
|
+
ARRAY_START_5 += 4
|
|
479
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
480
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
481
|
+
end
|
|
482
|
+
-- END ARRAY
|
|
483
|
+
end
|
|
484
|
+
-- Read 1
|
|
485
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
486
|
+
ARRAY_START_3 += 1
|
|
487
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
488
|
+
-- START ARRAY
|
|
489
|
+
local Length = 2
|
|
490
|
+
Item_3.UVScale = table.create(Length)
|
|
491
|
+
-- Read BLOCK: 4 bytes
|
|
492
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
493
|
+
for Index = 1, Length do
|
|
494
|
+
-- Read 4
|
|
495
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
496
|
+
ARRAY_START_5 += 4
|
|
497
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
498
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
499
|
+
end
|
|
500
|
+
-- END ARRAY
|
|
501
|
+
end
|
|
502
|
+
-- Read 1
|
|
503
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
504
|
+
ARRAY_START_3 += 1
|
|
505
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
506
|
+
-- Read BLOCK: 4 bytes
|
|
507
|
+
local BLOCK_START = Read(4)
|
|
508
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
509
|
+
end
|
|
510
|
+
-- Read 1
|
|
511
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
512
|
+
ARRAY_START_3 += 1
|
|
513
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
514
|
+
-- Read BLOCK: 1 bytes
|
|
515
|
+
local BLOCK_START = Read(1)
|
|
516
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
517
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
518
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
519
|
+
end
|
|
520
|
+
-- Read 1
|
|
521
|
+
local OPERATION_OFFSET_7 = ARRAY_START_3
|
|
522
|
+
ARRAY_START_3 += 1
|
|
523
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
524
|
+
-- Read BLOCK: 4 bytes
|
|
525
|
+
local BLOCK_START = Read(4)
|
|
526
|
+
Item_3.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
527
|
+
end
|
|
528
|
+
-- Read 1
|
|
529
|
+
local OPERATION_OFFSET_8 = ARRAY_START_3
|
|
530
|
+
ARRAY_START_3 += 1
|
|
531
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
532
|
+
-- Read BLOCK: 4 bytes
|
|
533
|
+
local BLOCK_START = Read(4)
|
|
534
|
+
Item_3.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
535
|
+
end
|
|
536
|
+
-- Read 1
|
|
537
|
+
local OPERATION_OFFSET_9 = ARRAY_START_3
|
|
538
|
+
ARRAY_START_3 += 1
|
|
539
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
540
|
+
-- Read BLOCK: 4 bytes
|
|
541
|
+
local BLOCK_START = Read(4)
|
|
542
|
+
Item_3.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
543
|
+
end
|
|
544
|
+
-- Read 1
|
|
545
|
+
local OPERATION_OFFSET_10 = ARRAY_START_3
|
|
546
|
+
ARRAY_START_3 += 1
|
|
547
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
548
|
+
-- Read BLOCK: 4 bytes
|
|
549
|
+
local BLOCK_START = Read(4)
|
|
550
|
+
Item_3.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
551
|
+
end
|
|
552
|
+
table.insert(Item_1.Textures, Item_3)
|
|
553
|
+
end
|
|
554
|
+
-- END ARRAY
|
|
555
|
+
end
|
|
556
|
+
-- Read 1
|
|
557
|
+
local OPERATION_OFFSET_23 = ARRAY_START_1
|
|
558
|
+
ARRAY_START_1 += 1
|
|
559
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_23) == 1 then
|
|
560
|
+
-- Read BLOCK: 2 bytes
|
|
561
|
+
local BLOCK_START = Read(2)
|
|
562
|
+
-- START ARRAY
|
|
563
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
564
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
565
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
566
|
+
Item_1.Lights = table.create(Length)
|
|
567
|
+
-- Read BLOCK: 8 bytes
|
|
568
|
+
local ARRAY_START_3 = Read(8 * Length)
|
|
569
|
+
for Index = 1, Length do
|
|
570
|
+
local Item_3 = {} :: any
|
|
571
|
+
-- Read 2
|
|
572
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
573
|
+
ARRAY_START_3 += 2
|
|
574
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
575
|
+
Item_3.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
576
|
+
-- Read 1
|
|
577
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
578
|
+
ARRAY_START_3 += 1
|
|
579
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
580
|
+
-- Read BLOCK: 4 bytes
|
|
581
|
+
local BLOCK_START = Read(4)
|
|
582
|
+
Item_3.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
583
|
+
end
|
|
584
|
+
-- Read 1
|
|
585
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
586
|
+
ARRAY_START_3 += 1
|
|
587
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
588
|
+
-- Read BLOCK: 3 bytes
|
|
589
|
+
local BLOCK_START = Read(3)
|
|
590
|
+
Item_3.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
591
|
+
end
|
|
592
|
+
-- Read 1
|
|
593
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
594
|
+
ARRAY_START_3 += 1
|
|
595
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
596
|
+
-- Read BLOCK: 1 bytes
|
|
597
|
+
local BLOCK_START = Read(1)
|
|
598
|
+
Item_3.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
599
|
+
end
|
|
600
|
+
-- Read 1
|
|
601
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
602
|
+
ARRAY_START_3 += 1
|
|
603
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
604
|
+
-- Read BLOCK: 4 bytes
|
|
605
|
+
local BLOCK_START = Read(4)
|
|
606
|
+
Item_3.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
607
|
+
end
|
|
608
|
+
-- Read 1
|
|
609
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
610
|
+
ARRAY_START_3 += 1
|
|
611
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
612
|
+
-- Read BLOCK: 4 bytes
|
|
613
|
+
local BLOCK_START = Read(4)
|
|
614
|
+
Item_3.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
615
|
+
end
|
|
616
|
+
-- Read 1
|
|
617
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
618
|
+
ARRAY_START_3 += 1
|
|
619
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
620
|
+
-- Read BLOCK: 1 bytes
|
|
621
|
+
local BLOCK_START = Read(1)
|
|
622
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
623
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
624
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
625
|
+
end
|
|
626
|
+
table.insert(Item_1.Lights, Item_3)
|
|
627
|
+
end
|
|
628
|
+
-- END ARRAY
|
|
629
|
+
end
|
|
630
|
+
-- Read 1
|
|
631
|
+
local OPERATION_OFFSET_24 = ARRAY_START_1
|
|
632
|
+
ARRAY_START_1 += 1
|
|
633
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_24) == 1 then
|
|
634
|
+
-- Read BLOCK: 2 bytes
|
|
635
|
+
local BLOCK_START = Read(2)
|
|
636
|
+
-- START ARRAY
|
|
637
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
638
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
639
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
640
|
+
Item_1.Decals = table.create(Length)
|
|
641
|
+
-- Read BLOCK: 7 bytes
|
|
642
|
+
local ARRAY_START_3 = Read(7 * Length)
|
|
643
|
+
for Index = 1, Length do
|
|
644
|
+
local Item_3 = {} :: any
|
|
645
|
+
-- Read 1
|
|
646
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
647
|
+
ARRAY_START_3 += 1
|
|
648
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
649
|
+
-- Read BLOCK: 3 bytes
|
|
650
|
+
local BLOCK_START = Read(3)
|
|
651
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
652
|
+
end
|
|
653
|
+
-- Read 1
|
|
654
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
655
|
+
ARRAY_START_3 += 1
|
|
656
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
657
|
+
-- Read BLOCK: 2 bytes
|
|
658
|
+
local BLOCK_START = Read(2)
|
|
659
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
660
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
661
|
+
end
|
|
662
|
+
-- Read 1
|
|
663
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
664
|
+
ARRAY_START_3 += 1
|
|
665
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
666
|
+
-- Read BLOCK: 4 bytes
|
|
667
|
+
local BLOCK_START = Read(4)
|
|
668
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
669
|
+
end
|
|
670
|
+
-- Read 1
|
|
671
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
672
|
+
ARRAY_START_3 += 1
|
|
673
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
674
|
+
-- START ARRAY
|
|
675
|
+
local Length = 2
|
|
676
|
+
Item_3.UVOffset = table.create(Length)
|
|
677
|
+
-- Read BLOCK: 4 bytes
|
|
678
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
679
|
+
for Index = 1, Length do
|
|
680
|
+
-- Read 4
|
|
681
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
682
|
+
ARRAY_START_5 += 4
|
|
683
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
684
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
685
|
+
end
|
|
686
|
+
-- END ARRAY
|
|
687
|
+
end
|
|
688
|
+
-- Read 1
|
|
689
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
690
|
+
ARRAY_START_3 += 1
|
|
691
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
692
|
+
-- START ARRAY
|
|
693
|
+
local Length = 2
|
|
694
|
+
Item_3.UVScale = table.create(Length)
|
|
695
|
+
-- Read BLOCK: 4 bytes
|
|
696
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
697
|
+
for Index = 1, Length do
|
|
698
|
+
-- Read 4
|
|
699
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
700
|
+
ARRAY_START_5 += 4
|
|
701
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
702
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
703
|
+
end
|
|
704
|
+
-- END ARRAY
|
|
705
|
+
end
|
|
706
|
+
-- Read 1
|
|
707
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
708
|
+
ARRAY_START_3 += 1
|
|
709
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
710
|
+
-- Read BLOCK: 4 bytes
|
|
711
|
+
local BLOCK_START = Read(4)
|
|
712
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
713
|
+
end
|
|
714
|
+
-- Read 1
|
|
715
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
716
|
+
ARRAY_START_3 += 1
|
|
717
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
718
|
+
-- Read BLOCK: 1 bytes
|
|
719
|
+
local BLOCK_START = Read(1)
|
|
720
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
721
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
722
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
723
|
+
end
|
|
724
|
+
table.insert(Item_1.Decals, Item_3)
|
|
725
|
+
end
|
|
726
|
+
-- END ARRAY
|
|
727
|
+
end
|
|
728
|
+
Item_1.Attributes = {}
|
|
729
|
+
-- Read 2
|
|
730
|
+
local OPERATION_OFFSET_25 = ARRAY_START_1
|
|
731
|
+
ARRAY_START_1 += 2
|
|
732
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_25)
|
|
733
|
+
for _ = 1, Elements_2 do
|
|
734
|
+
local OFFSET_0 = Read(2)
|
|
735
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
736
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
737
|
+
RecieveInstanceCursor += 1
|
|
738
|
+
local Element_2 = RecieveInstances[RecieveInstanceCursor]
|
|
739
|
+
Item_1.Attributes[Key_2] = Element_2
|
|
740
|
+
end
|
|
741
|
+
-- START ARRAY
|
|
742
|
+
-- Read 2
|
|
743
|
+
local OPERATION_OFFSET_26 = ARRAY_START_1
|
|
744
|
+
ARRAY_START_1 += 2
|
|
745
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_26)
|
|
746
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
747
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
748
|
+
Item_1.Tags = table.create(Length)
|
|
749
|
+
-- Read BLOCK: 2 bytes
|
|
750
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
751
|
+
for Index = 1, Length do
|
|
752
|
+
-- Read 2
|
|
753
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
754
|
+
ARRAY_START_2 += 2
|
|
755
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
756
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
757
|
+
table.insert(Item_1.Tags, Item_2)
|
|
758
|
+
end
|
|
759
|
+
-- END ARRAY
|
|
760
|
+
table.insert(Value, Item_1)
|
|
761
|
+
end
|
|
762
|
+
-- END ARRAY
|
|
763
|
+
return Value
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
local function Shatterbox_ReadEVENT_ReplicatePuppetStates(): (buffer, number)
|
|
767
|
+
-- Read BLOCK: 4 bytes
|
|
768
|
+
local BLOCK_START = Read(4)
|
|
769
|
+
local Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
770
|
+
local Value1 = buffer.create(Length)
|
|
771
|
+
buffer.copy(Value1, 0, RecieveBuffer, Read(Length), Length)
|
|
772
|
+
if buffer.len(Value1) < 14 then error(`Expected size of "Value1" to be larger than 14, got {buffer.len(Value1)} instead.`) end
|
|
773
|
+
if buffer.len(Value1) > 980 then error(`Expected size of "Value1" to be smaller than 980, got {buffer.len(Value1)} instead.`) end
|
|
774
|
+
local Value2 = buffer.readu16(RecieveBuffer, BLOCK_START + 2)
|
|
775
|
+
return Value1, Value2
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
local function Shatterbox_ReadEVENT_DestroyPuppet(): (number)
|
|
779
|
+
-- Read BLOCK: 2 bytes
|
|
780
|
+
local BLOCK_START = Read(2)
|
|
781
|
+
local Value = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
782
|
+
return Value
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
local function Shatterbox_WriteEVENT_CreateDirtyGroupsFromClient(Value: {[string]: Part}): ()
|
|
786
|
+
-- Allocate BLOCK: 3 bytes
|
|
787
|
+
local BLOCK_START = Allocate(3)
|
|
788
|
+
buffer.writeu8(SendBuffer, BLOCK_START + 0, 5)
|
|
789
|
+
local Elements_1 = 0
|
|
790
|
+
for Key_1, Element_1 in Value do
|
|
791
|
+
Elements_1 += 1
|
|
792
|
+
local Length = #Key_1
|
|
793
|
+
local OFFSET_0 = Allocate(2)
|
|
794
|
+
buffer.writeu16(SendBuffer, OFFSET_0, Length)
|
|
795
|
+
Allocate(Length)
|
|
796
|
+
buffer.writestring(SendBuffer, SendOffset, Key_1, Length)
|
|
797
|
+
table.insert(SendInstances, Element_1 or Null)
|
|
798
|
+
end
|
|
799
|
+
buffer.writeu16(SendBuffer, BLOCK_START + 1, Elements_1)
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
local function Shatterbox_ReadEVENT_CreateDirtyGroupsFromServer(): ({[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }})
|
|
803
|
+
-- Read BLOCK: 2 bytes
|
|
804
|
+
local BLOCK_START = Read(2)
|
|
805
|
+
local Value = {}
|
|
806
|
+
local Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
807
|
+
for _ = 1, Elements_1 do
|
|
808
|
+
local OFFSET_0 = Read(2)
|
|
809
|
+
local Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
810
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
811
|
+
local Element_1 = {} :: any
|
|
812
|
+
local OFFSET_1 = Read(4)
|
|
813
|
+
local X = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
814
|
+
local OFFSET_2 = Read(4)
|
|
815
|
+
local Y = buffer.readf32(RecieveBuffer, OFFSET_2)
|
|
816
|
+
local OFFSET_3 = Read(4)
|
|
817
|
+
local Z = buffer.readf32(RecieveBuffer, OFFSET_3)
|
|
818
|
+
local Position = Vector3.new(X, Y, Z)
|
|
819
|
+
local OFFSET_4 = Read(4)
|
|
820
|
+
local rX = buffer.readf32(RecieveBuffer, OFFSET_4)
|
|
821
|
+
local OFFSET_5 = Read(4)
|
|
822
|
+
local rY = buffer.readf32(RecieveBuffer, OFFSET_5)
|
|
823
|
+
local OFFSET_6 = Read(4)
|
|
824
|
+
local rZ = buffer.readf32(RecieveBuffer, OFFSET_6)
|
|
825
|
+
Element_1.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
826
|
+
local OFFSET_7 = Read(4)
|
|
827
|
+
X = buffer.readf32(RecieveBuffer, OFFSET_7)
|
|
828
|
+
local OFFSET_8 = Read(4)
|
|
829
|
+
Y = buffer.readf32(RecieveBuffer, OFFSET_8)
|
|
830
|
+
local OFFSET_9 = Read(4)
|
|
831
|
+
Z = buffer.readf32(RecieveBuffer, OFFSET_9)
|
|
832
|
+
Element_1.Size = Vector3.new(X, Y, Z)
|
|
833
|
+
local OFFSET_10 = Read(1)
|
|
834
|
+
Element_1.Anchored = (buffer.readu8(RecieveBuffer, OFFSET_10) == 1)
|
|
835
|
+
local OFFSET_11 = Read(1)
|
|
836
|
+
if buffer.readu8(RecieveBuffer, OFFSET_11) == 1 then
|
|
837
|
+
-- Read BLOCK: 3 bytes
|
|
838
|
+
local BLOCK_START = Read(3)
|
|
839
|
+
Element_1.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
840
|
+
end
|
|
841
|
+
local OFFSET_12 = Read(1)
|
|
842
|
+
if buffer.readu8(RecieveBuffer, OFFSET_12) == 1 then
|
|
843
|
+
-- Read BLOCK: 2 bytes
|
|
844
|
+
local BLOCK_START = Read(2)
|
|
845
|
+
Element_1.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
846
|
+
if Element_1.Material < 256 then error(`Expected "Element_1.Material" to be larger than 256, got {Element_1.Material} instead.`) end
|
|
847
|
+
if Element_1.Material > 2311 then error(`Expected "Element_1.Material" to be smaller than 2311, got {Element_1.Material} instead.`) end
|
|
848
|
+
end
|
|
849
|
+
local OFFSET_13 = Read(1)
|
|
850
|
+
if buffer.readu8(RecieveBuffer, OFFSET_13) == 1 then
|
|
851
|
+
-- Read BLOCK: 2 bytes
|
|
852
|
+
local BLOCK_START = Read(2)
|
|
853
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
854
|
+
local MantissaExponent = Encoded % 0x8000
|
|
855
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
856
|
+
if Encoded // 0x8000 == 1 then
|
|
857
|
+
Element_1.Transparency = -math.huge
|
|
858
|
+
else
|
|
859
|
+
Element_1.Transparency = math.huge
|
|
860
|
+
end
|
|
861
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
862
|
+
Element_1.Transparency = 0 / 0
|
|
863
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
864
|
+
Element_1.Transparency = 0
|
|
865
|
+
else
|
|
866
|
+
local Mantissa = MantissaExponent % 0x400
|
|
867
|
+
local Exponent = MantissaExponent // 0x400
|
|
868
|
+
local Fraction;
|
|
869
|
+
if Exponent == 0 then
|
|
870
|
+
Fraction = Mantissa / 0x400
|
|
871
|
+
else
|
|
872
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
873
|
+
end
|
|
874
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
875
|
+
Element_1.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
876
|
+
end
|
|
877
|
+
end
|
|
878
|
+
local OFFSET_14 = Read(1)
|
|
879
|
+
if buffer.readu8(RecieveBuffer, OFFSET_14) == 1 then
|
|
880
|
+
-- Read BLOCK: 2 bytes
|
|
881
|
+
local BLOCK_START = Read(2)
|
|
882
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
883
|
+
local MantissaExponent = Encoded % 0x8000
|
|
884
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
885
|
+
if Encoded // 0x8000 == 1 then
|
|
886
|
+
Element_1.Reflectance = -math.huge
|
|
887
|
+
else
|
|
888
|
+
Element_1.Reflectance = math.huge
|
|
889
|
+
end
|
|
890
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
891
|
+
Element_1.Reflectance = 0 / 0
|
|
892
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
893
|
+
Element_1.Reflectance = 0
|
|
894
|
+
else
|
|
895
|
+
local Mantissa = MantissaExponent % 0x400
|
|
896
|
+
local Exponent = MantissaExponent // 0x400
|
|
897
|
+
local Fraction;
|
|
898
|
+
if Exponent == 0 then
|
|
899
|
+
Fraction = Mantissa / 0x400
|
|
900
|
+
else
|
|
901
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
902
|
+
end
|
|
903
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
904
|
+
Element_1.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
905
|
+
end
|
|
906
|
+
end
|
|
907
|
+
local OFFSET_15 = Read(1)
|
|
908
|
+
if buffer.readu8(RecieveBuffer, OFFSET_15) == 1 then
|
|
909
|
+
-- Read BLOCK: 2 bytes
|
|
910
|
+
local BLOCK_START = Read(2)
|
|
911
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
912
|
+
Element_1.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
913
|
+
end
|
|
914
|
+
local OFFSET_16 = Read(1)
|
|
915
|
+
if buffer.readu8(RecieveBuffer, OFFSET_16) == 1 then
|
|
916
|
+
-- Read BLOCK: 2 bytes
|
|
917
|
+
local BLOCK_START = Read(2)
|
|
918
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
919
|
+
Element_1.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
920
|
+
end
|
|
921
|
+
local OFFSET_17 = Read(1)
|
|
922
|
+
if buffer.readu8(RecieveBuffer, OFFSET_17) == 1 then
|
|
923
|
+
-- Read BLOCK: 1 bytes
|
|
924
|
+
local BLOCK_START = Read(1)
|
|
925
|
+
Element_1.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
926
|
+
if Element_1.LeftSurface < 0 then error(`Expected "Element_1.LeftSurface" to be larger than 0, got {Element_1.LeftSurface} instead.`) end
|
|
927
|
+
if Element_1.LeftSurface > 10 then error(`Expected "Element_1.LeftSurface" to be smaller than 10, got {Element_1.LeftSurface} instead.`) end
|
|
928
|
+
end
|
|
929
|
+
local OFFSET_18 = Read(1)
|
|
930
|
+
if buffer.readu8(RecieveBuffer, OFFSET_18) == 1 then
|
|
931
|
+
-- Read BLOCK: 1 bytes
|
|
932
|
+
local BLOCK_START = Read(1)
|
|
933
|
+
Element_1.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
934
|
+
if Element_1.RightSurface < 0 then error(`Expected "Element_1.RightSurface" to be larger than 0, got {Element_1.RightSurface} instead.`) end
|
|
935
|
+
if Element_1.RightSurface > 10 then error(`Expected "Element_1.RightSurface" to be smaller than 10, got {Element_1.RightSurface} instead.`) end
|
|
936
|
+
end
|
|
937
|
+
local OFFSET_19 = Read(1)
|
|
938
|
+
if buffer.readu8(RecieveBuffer, OFFSET_19) == 1 then
|
|
939
|
+
-- Read BLOCK: 1 bytes
|
|
940
|
+
local BLOCK_START = Read(1)
|
|
941
|
+
Element_1.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
942
|
+
if Element_1.FrontSurface < 0 then error(`Expected "Element_1.FrontSurface" to be larger than 0, got {Element_1.FrontSurface} instead.`) end
|
|
943
|
+
if Element_1.FrontSurface > 10 then error(`Expected "Element_1.FrontSurface" to be smaller than 10, got {Element_1.FrontSurface} instead.`) end
|
|
944
|
+
end
|
|
945
|
+
local OFFSET_20 = Read(1)
|
|
946
|
+
if buffer.readu8(RecieveBuffer, OFFSET_20) == 1 then
|
|
947
|
+
-- Read BLOCK: 1 bytes
|
|
948
|
+
local BLOCK_START = Read(1)
|
|
949
|
+
Element_1.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
950
|
+
if Element_1.BackSurface < 0 then error(`Expected "Element_1.BackSurface" to be larger than 0, got {Element_1.BackSurface} instead.`) end
|
|
951
|
+
if Element_1.BackSurface > 10 then error(`Expected "Element_1.BackSurface" to be smaller than 10, got {Element_1.BackSurface} instead.`) end
|
|
952
|
+
end
|
|
953
|
+
local OFFSET_21 = Read(1)
|
|
954
|
+
if buffer.readu8(RecieveBuffer, OFFSET_21) == 1 then
|
|
955
|
+
-- Read BLOCK: 1 bytes
|
|
956
|
+
local BLOCK_START = Read(1)
|
|
957
|
+
Element_1.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
958
|
+
if Element_1.TopSurface < 0 then error(`Expected "Element_1.TopSurface" to be larger than 0, got {Element_1.TopSurface} instead.`) end
|
|
959
|
+
if Element_1.TopSurface > 10 then error(`Expected "Element_1.TopSurface" to be smaller than 10, got {Element_1.TopSurface} instead.`) end
|
|
960
|
+
end
|
|
961
|
+
local OFFSET_22 = Read(1)
|
|
962
|
+
if buffer.readu8(RecieveBuffer, OFFSET_22) == 1 then
|
|
963
|
+
-- Read BLOCK: 1 bytes
|
|
964
|
+
local BLOCK_START = Read(1)
|
|
965
|
+
Element_1.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
966
|
+
if Element_1.BottomSurface < 0 then error(`Expected "Element_1.BottomSurface" to be larger than 0, got {Element_1.BottomSurface} instead.`) end
|
|
967
|
+
if Element_1.BottomSurface > 10 then error(`Expected "Element_1.BottomSurface" to be smaller than 10, got {Element_1.BottomSurface} instead.`) end
|
|
968
|
+
end
|
|
969
|
+
local OFFSET_23 = Read(1)
|
|
970
|
+
if buffer.readu8(RecieveBuffer, OFFSET_23) == 1 then
|
|
971
|
+
-- Read BLOCK: 2 bytes
|
|
972
|
+
local BLOCK_START = Read(2)
|
|
973
|
+
-- START ARRAY
|
|
974
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
975
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
976
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
977
|
+
Element_1.Textures = table.create(Length)
|
|
978
|
+
-- Read BLOCK: 11 bytes
|
|
979
|
+
local ARRAY_START_3 = Read(11 * Length)
|
|
980
|
+
for Index = 1, Length do
|
|
981
|
+
local Item_3 = {} :: any
|
|
982
|
+
-- Read 1
|
|
983
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
984
|
+
ARRAY_START_3 += 1
|
|
985
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
986
|
+
-- Read BLOCK: 3 bytes
|
|
987
|
+
local BLOCK_START = Read(3)
|
|
988
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
989
|
+
end
|
|
990
|
+
-- Read 1
|
|
991
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
992
|
+
ARRAY_START_3 += 1
|
|
993
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
994
|
+
-- Read BLOCK: 2 bytes
|
|
995
|
+
local BLOCK_START = Read(2)
|
|
996
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
997
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
998
|
+
end
|
|
999
|
+
-- Read 1
|
|
1000
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1001
|
+
ARRAY_START_3 += 1
|
|
1002
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1003
|
+
-- Read BLOCK: 4 bytes
|
|
1004
|
+
local BLOCK_START = Read(4)
|
|
1005
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1006
|
+
end
|
|
1007
|
+
-- Read 1
|
|
1008
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1009
|
+
ARRAY_START_3 += 1
|
|
1010
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1011
|
+
-- START ARRAY
|
|
1012
|
+
local Length = 2
|
|
1013
|
+
Item_3.UVOffset = table.create(Length)
|
|
1014
|
+
-- Read BLOCK: 4 bytes
|
|
1015
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1016
|
+
for Index = 1, Length do
|
|
1017
|
+
-- Read 4
|
|
1018
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1019
|
+
ARRAY_START_5 += 4
|
|
1020
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1021
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
1022
|
+
end
|
|
1023
|
+
-- END ARRAY
|
|
1024
|
+
end
|
|
1025
|
+
-- Read 1
|
|
1026
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1027
|
+
ARRAY_START_3 += 1
|
|
1028
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1029
|
+
-- START ARRAY
|
|
1030
|
+
local Length = 2
|
|
1031
|
+
Item_3.UVScale = table.create(Length)
|
|
1032
|
+
-- Read BLOCK: 4 bytes
|
|
1033
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1034
|
+
for Index = 1, Length do
|
|
1035
|
+
-- Read 4
|
|
1036
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1037
|
+
ARRAY_START_5 += 4
|
|
1038
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1039
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
1040
|
+
end
|
|
1041
|
+
-- END ARRAY
|
|
1042
|
+
end
|
|
1043
|
+
-- Read 1
|
|
1044
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1045
|
+
ARRAY_START_3 += 1
|
|
1046
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1047
|
+
-- Read BLOCK: 4 bytes
|
|
1048
|
+
local BLOCK_START = Read(4)
|
|
1049
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
1050
|
+
end
|
|
1051
|
+
-- Read 1
|
|
1052
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1053
|
+
ARRAY_START_3 += 1
|
|
1054
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1055
|
+
-- Read BLOCK: 1 bytes
|
|
1056
|
+
local BLOCK_START = Read(1)
|
|
1057
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1058
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1059
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1060
|
+
end
|
|
1061
|
+
-- Read 1
|
|
1062
|
+
local OPERATION_OFFSET_7 = ARRAY_START_3
|
|
1063
|
+
ARRAY_START_3 += 1
|
|
1064
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
1065
|
+
-- Read BLOCK: 4 bytes
|
|
1066
|
+
local BLOCK_START = Read(4)
|
|
1067
|
+
Item_3.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1068
|
+
end
|
|
1069
|
+
-- Read 1
|
|
1070
|
+
local OPERATION_OFFSET_8 = ARRAY_START_3
|
|
1071
|
+
ARRAY_START_3 += 1
|
|
1072
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
1073
|
+
-- Read BLOCK: 4 bytes
|
|
1074
|
+
local BLOCK_START = Read(4)
|
|
1075
|
+
Item_3.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1076
|
+
end
|
|
1077
|
+
-- Read 1
|
|
1078
|
+
local OPERATION_OFFSET_9 = ARRAY_START_3
|
|
1079
|
+
ARRAY_START_3 += 1
|
|
1080
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
1081
|
+
-- Read BLOCK: 4 bytes
|
|
1082
|
+
local BLOCK_START = Read(4)
|
|
1083
|
+
Item_3.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1084
|
+
end
|
|
1085
|
+
-- Read 1
|
|
1086
|
+
local OPERATION_OFFSET_10 = ARRAY_START_3
|
|
1087
|
+
ARRAY_START_3 += 1
|
|
1088
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
1089
|
+
-- Read BLOCK: 4 bytes
|
|
1090
|
+
local BLOCK_START = Read(4)
|
|
1091
|
+
Item_3.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1092
|
+
end
|
|
1093
|
+
table.insert(Element_1.Textures, Item_3)
|
|
1094
|
+
end
|
|
1095
|
+
-- END ARRAY
|
|
1096
|
+
end
|
|
1097
|
+
local OFFSET_24 = Read(1)
|
|
1098
|
+
if buffer.readu8(RecieveBuffer, OFFSET_24) == 1 then
|
|
1099
|
+
-- Read BLOCK: 2 bytes
|
|
1100
|
+
local BLOCK_START = Read(2)
|
|
1101
|
+
-- START ARRAY
|
|
1102
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1103
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1104
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1105
|
+
Element_1.Lights = table.create(Length)
|
|
1106
|
+
-- Read BLOCK: 8 bytes
|
|
1107
|
+
local ARRAY_START_3 = Read(8 * Length)
|
|
1108
|
+
for Index = 1, Length do
|
|
1109
|
+
local Item_3 = {} :: any
|
|
1110
|
+
-- Read 2
|
|
1111
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
1112
|
+
ARRAY_START_3 += 2
|
|
1113
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1114
|
+
Item_3.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1115
|
+
-- Read 1
|
|
1116
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
1117
|
+
ARRAY_START_3 += 1
|
|
1118
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
1119
|
+
-- Read BLOCK: 4 bytes
|
|
1120
|
+
local BLOCK_START = Read(4)
|
|
1121
|
+
Item_3.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1122
|
+
end
|
|
1123
|
+
-- Read 1
|
|
1124
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1125
|
+
ARRAY_START_3 += 1
|
|
1126
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1127
|
+
-- Read BLOCK: 3 bytes
|
|
1128
|
+
local BLOCK_START = Read(3)
|
|
1129
|
+
Item_3.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1130
|
+
end
|
|
1131
|
+
-- Read 1
|
|
1132
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1133
|
+
ARRAY_START_3 += 1
|
|
1134
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1135
|
+
-- Read BLOCK: 1 bytes
|
|
1136
|
+
local BLOCK_START = Read(1)
|
|
1137
|
+
Item_3.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
1138
|
+
end
|
|
1139
|
+
-- Read 1
|
|
1140
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1141
|
+
ARRAY_START_3 += 1
|
|
1142
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1143
|
+
-- Read BLOCK: 4 bytes
|
|
1144
|
+
local BLOCK_START = Read(4)
|
|
1145
|
+
Item_3.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1146
|
+
end
|
|
1147
|
+
-- Read 1
|
|
1148
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1149
|
+
ARRAY_START_3 += 1
|
|
1150
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1151
|
+
-- Read BLOCK: 4 bytes
|
|
1152
|
+
local BLOCK_START = Read(4)
|
|
1153
|
+
Item_3.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1154
|
+
end
|
|
1155
|
+
-- Read 1
|
|
1156
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1157
|
+
ARRAY_START_3 += 1
|
|
1158
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1159
|
+
-- Read BLOCK: 1 bytes
|
|
1160
|
+
local BLOCK_START = Read(1)
|
|
1161
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1162
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1163
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1164
|
+
end
|
|
1165
|
+
table.insert(Element_1.Lights, Item_3)
|
|
1166
|
+
end
|
|
1167
|
+
-- END ARRAY
|
|
1168
|
+
end
|
|
1169
|
+
local OFFSET_25 = Read(1)
|
|
1170
|
+
if buffer.readu8(RecieveBuffer, OFFSET_25) == 1 then
|
|
1171
|
+
-- Read BLOCK: 2 bytes
|
|
1172
|
+
local BLOCK_START = Read(2)
|
|
1173
|
+
-- START ARRAY
|
|
1174
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1175
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1176
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1177
|
+
Element_1.Decals = table.create(Length)
|
|
1178
|
+
-- Read BLOCK: 7 bytes
|
|
1179
|
+
local ARRAY_START_3 = Read(7 * Length)
|
|
1180
|
+
for Index = 1, Length do
|
|
1181
|
+
local Item_3 = {} :: any
|
|
1182
|
+
-- Read 1
|
|
1183
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
1184
|
+
ARRAY_START_3 += 1
|
|
1185
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
1186
|
+
-- Read BLOCK: 3 bytes
|
|
1187
|
+
local BLOCK_START = Read(3)
|
|
1188
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1189
|
+
end
|
|
1190
|
+
-- Read 1
|
|
1191
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
1192
|
+
ARRAY_START_3 += 1
|
|
1193
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
1194
|
+
-- Read BLOCK: 2 bytes
|
|
1195
|
+
local BLOCK_START = Read(2)
|
|
1196
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1197
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1198
|
+
end
|
|
1199
|
+
-- Read 1
|
|
1200
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1201
|
+
ARRAY_START_3 += 1
|
|
1202
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1203
|
+
-- Read BLOCK: 4 bytes
|
|
1204
|
+
local BLOCK_START = Read(4)
|
|
1205
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1206
|
+
end
|
|
1207
|
+
-- Read 1
|
|
1208
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1209
|
+
ARRAY_START_3 += 1
|
|
1210
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1211
|
+
-- START ARRAY
|
|
1212
|
+
local Length = 2
|
|
1213
|
+
Item_3.UVOffset = table.create(Length)
|
|
1214
|
+
-- Read BLOCK: 4 bytes
|
|
1215
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1216
|
+
for Index = 1, Length do
|
|
1217
|
+
-- Read 4
|
|
1218
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1219
|
+
ARRAY_START_5 += 4
|
|
1220
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1221
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
1222
|
+
end
|
|
1223
|
+
-- END ARRAY
|
|
1224
|
+
end
|
|
1225
|
+
-- Read 1
|
|
1226
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1227
|
+
ARRAY_START_3 += 1
|
|
1228
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1229
|
+
-- START ARRAY
|
|
1230
|
+
local Length = 2
|
|
1231
|
+
Item_3.UVScale = table.create(Length)
|
|
1232
|
+
-- Read BLOCK: 4 bytes
|
|
1233
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1234
|
+
for Index = 1, Length do
|
|
1235
|
+
-- Read 4
|
|
1236
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1237
|
+
ARRAY_START_5 += 4
|
|
1238
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1239
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
1240
|
+
end
|
|
1241
|
+
-- END ARRAY
|
|
1242
|
+
end
|
|
1243
|
+
-- Read 1
|
|
1244
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1245
|
+
ARRAY_START_3 += 1
|
|
1246
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1247
|
+
-- Read BLOCK: 4 bytes
|
|
1248
|
+
local BLOCK_START = Read(4)
|
|
1249
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
1250
|
+
end
|
|
1251
|
+
-- Read 1
|
|
1252
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1253
|
+
ARRAY_START_3 += 1
|
|
1254
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1255
|
+
-- Read BLOCK: 1 bytes
|
|
1256
|
+
local BLOCK_START = Read(1)
|
|
1257
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1258
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1259
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1260
|
+
end
|
|
1261
|
+
table.insert(Element_1.Decals, Item_3)
|
|
1262
|
+
end
|
|
1263
|
+
-- END ARRAY
|
|
1264
|
+
end
|
|
1265
|
+
Element_1.Attributes = {}
|
|
1266
|
+
local OFFSET_26 = Read(2)
|
|
1267
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OFFSET_26)
|
|
1268
|
+
for _ = 1, Elements_2 do
|
|
1269
|
+
local OFFSET_0 = Read(2)
|
|
1270
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
1271
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1272
|
+
RecieveInstanceCursor += 1
|
|
1273
|
+
local Element_2 = RecieveInstances[RecieveInstanceCursor]
|
|
1274
|
+
Element_1.Attributes[Key_2] = Element_2
|
|
1275
|
+
end
|
|
1276
|
+
-- START ARRAY
|
|
1277
|
+
local OFFSET_27 = Read(2)
|
|
1278
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_27)
|
|
1279
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1280
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1281
|
+
Element_1.Tags = table.create(Length)
|
|
1282
|
+
-- Read BLOCK: 2 bytes
|
|
1283
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
1284
|
+
for Index = 1, Length do
|
|
1285
|
+
-- Read 2
|
|
1286
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
1287
|
+
ARRAY_START_2 += 2
|
|
1288
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1289
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1290
|
+
table.insert(Element_1.Tags, Item_2)
|
|
1291
|
+
end
|
|
1292
|
+
-- END ARRAY
|
|
1293
|
+
Value[Key_1] = Element_1
|
|
1294
|
+
end
|
|
1295
|
+
return Value
|
|
1296
|
+
end
|
|
1297
|
+
|
|
1298
|
+
local function Shatterbox_ReadEVENT_ReplicateState(): ({[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, {[string]: { { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } }}, {[string]: boolean}, { { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? } }, {[string]: number}, {[string]: {[string]: boolean}}, {[string]: number}, {[string]: number}, {[string]: number}, {[number]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, number)
|
|
1299
|
+
-- Read BLOCK: 22 bytes
|
|
1300
|
+
local BLOCK_START = Read(22)
|
|
1301
|
+
local Value1 = {}
|
|
1302
|
+
local Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1303
|
+
for _ = 1, Elements_1 do
|
|
1304
|
+
local OFFSET_0 = Read(2)
|
|
1305
|
+
local Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
1306
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1307
|
+
local Element_1 = {} :: any
|
|
1308
|
+
local OFFSET_1 = Read(4)
|
|
1309
|
+
local X = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
1310
|
+
local OFFSET_2 = Read(4)
|
|
1311
|
+
local Y = buffer.readf32(RecieveBuffer, OFFSET_2)
|
|
1312
|
+
local OFFSET_3 = Read(4)
|
|
1313
|
+
local Z = buffer.readf32(RecieveBuffer, OFFSET_3)
|
|
1314
|
+
local Position = Vector3.new(X, Y, Z)
|
|
1315
|
+
local OFFSET_4 = Read(4)
|
|
1316
|
+
local rX = buffer.readf32(RecieveBuffer, OFFSET_4)
|
|
1317
|
+
local OFFSET_5 = Read(4)
|
|
1318
|
+
local rY = buffer.readf32(RecieveBuffer, OFFSET_5)
|
|
1319
|
+
local OFFSET_6 = Read(4)
|
|
1320
|
+
local rZ = buffer.readf32(RecieveBuffer, OFFSET_6)
|
|
1321
|
+
Element_1.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
1322
|
+
local OFFSET_7 = Read(4)
|
|
1323
|
+
X = buffer.readf32(RecieveBuffer, OFFSET_7)
|
|
1324
|
+
local OFFSET_8 = Read(4)
|
|
1325
|
+
Y = buffer.readf32(RecieveBuffer, OFFSET_8)
|
|
1326
|
+
local OFFSET_9 = Read(4)
|
|
1327
|
+
Z = buffer.readf32(RecieveBuffer, OFFSET_9)
|
|
1328
|
+
Element_1.Size = Vector3.new(X, Y, Z)
|
|
1329
|
+
local OFFSET_10 = Read(1)
|
|
1330
|
+
Element_1.Anchored = (buffer.readu8(RecieveBuffer, OFFSET_10) == 1)
|
|
1331
|
+
local OFFSET_11 = Read(1)
|
|
1332
|
+
if buffer.readu8(RecieveBuffer, OFFSET_11) == 1 then
|
|
1333
|
+
-- Read BLOCK: 3 bytes
|
|
1334
|
+
local BLOCK_START = Read(3)
|
|
1335
|
+
Element_1.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1336
|
+
end
|
|
1337
|
+
local OFFSET_12 = Read(1)
|
|
1338
|
+
if buffer.readu8(RecieveBuffer, OFFSET_12) == 1 then
|
|
1339
|
+
-- Read BLOCK: 2 bytes
|
|
1340
|
+
local BLOCK_START = Read(2)
|
|
1341
|
+
Element_1.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1342
|
+
if Element_1.Material < 256 then error(`Expected "Element_1.Material" to be larger than 256, got {Element_1.Material} instead.`) end
|
|
1343
|
+
if Element_1.Material > 2311 then error(`Expected "Element_1.Material" to be smaller than 2311, got {Element_1.Material} instead.`) end
|
|
1344
|
+
end
|
|
1345
|
+
local OFFSET_13 = Read(1)
|
|
1346
|
+
if buffer.readu8(RecieveBuffer, OFFSET_13) == 1 then
|
|
1347
|
+
-- Read BLOCK: 2 bytes
|
|
1348
|
+
local BLOCK_START = Read(2)
|
|
1349
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1350
|
+
local MantissaExponent = Encoded % 0x8000
|
|
1351
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
1352
|
+
if Encoded // 0x8000 == 1 then
|
|
1353
|
+
Element_1.Transparency = -math.huge
|
|
1354
|
+
else
|
|
1355
|
+
Element_1.Transparency = math.huge
|
|
1356
|
+
end
|
|
1357
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
1358
|
+
Element_1.Transparency = 0 / 0
|
|
1359
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
1360
|
+
Element_1.Transparency = 0
|
|
1361
|
+
else
|
|
1362
|
+
local Mantissa = MantissaExponent % 0x400
|
|
1363
|
+
local Exponent = MantissaExponent // 0x400
|
|
1364
|
+
local Fraction;
|
|
1365
|
+
if Exponent == 0 then
|
|
1366
|
+
Fraction = Mantissa / 0x400
|
|
1367
|
+
else
|
|
1368
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
1369
|
+
end
|
|
1370
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
1371
|
+
Element_1.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
1372
|
+
end
|
|
1373
|
+
end
|
|
1374
|
+
local OFFSET_14 = Read(1)
|
|
1375
|
+
if buffer.readu8(RecieveBuffer, OFFSET_14) == 1 then
|
|
1376
|
+
-- Read BLOCK: 2 bytes
|
|
1377
|
+
local BLOCK_START = Read(2)
|
|
1378
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1379
|
+
local MantissaExponent = Encoded % 0x8000
|
|
1380
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
1381
|
+
if Encoded // 0x8000 == 1 then
|
|
1382
|
+
Element_1.Reflectance = -math.huge
|
|
1383
|
+
else
|
|
1384
|
+
Element_1.Reflectance = math.huge
|
|
1385
|
+
end
|
|
1386
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
1387
|
+
Element_1.Reflectance = 0 / 0
|
|
1388
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
1389
|
+
Element_1.Reflectance = 0
|
|
1390
|
+
else
|
|
1391
|
+
local Mantissa = MantissaExponent % 0x400
|
|
1392
|
+
local Exponent = MantissaExponent // 0x400
|
|
1393
|
+
local Fraction;
|
|
1394
|
+
if Exponent == 0 then
|
|
1395
|
+
Fraction = Mantissa / 0x400
|
|
1396
|
+
else
|
|
1397
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
1398
|
+
end
|
|
1399
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
1400
|
+
Element_1.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
1401
|
+
end
|
|
1402
|
+
end
|
|
1403
|
+
local OFFSET_15 = Read(1)
|
|
1404
|
+
if buffer.readu8(RecieveBuffer, OFFSET_15) == 1 then
|
|
1405
|
+
-- Read BLOCK: 2 bytes
|
|
1406
|
+
local BLOCK_START = Read(2)
|
|
1407
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1408
|
+
Element_1.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1409
|
+
end
|
|
1410
|
+
local OFFSET_16 = Read(1)
|
|
1411
|
+
if buffer.readu8(RecieveBuffer, OFFSET_16) == 1 then
|
|
1412
|
+
-- Read BLOCK: 2 bytes
|
|
1413
|
+
local BLOCK_START = Read(2)
|
|
1414
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1415
|
+
Element_1.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1416
|
+
end
|
|
1417
|
+
local OFFSET_17 = Read(1)
|
|
1418
|
+
if buffer.readu8(RecieveBuffer, OFFSET_17) == 1 then
|
|
1419
|
+
-- Read BLOCK: 1 bytes
|
|
1420
|
+
local BLOCK_START = Read(1)
|
|
1421
|
+
Element_1.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1422
|
+
if Element_1.LeftSurface < 0 then error(`Expected "Element_1.LeftSurface" to be larger than 0, got {Element_1.LeftSurface} instead.`) end
|
|
1423
|
+
if Element_1.LeftSurface > 10 then error(`Expected "Element_1.LeftSurface" to be smaller than 10, got {Element_1.LeftSurface} instead.`) end
|
|
1424
|
+
end
|
|
1425
|
+
local OFFSET_18 = Read(1)
|
|
1426
|
+
if buffer.readu8(RecieveBuffer, OFFSET_18) == 1 then
|
|
1427
|
+
-- Read BLOCK: 1 bytes
|
|
1428
|
+
local BLOCK_START = Read(1)
|
|
1429
|
+
Element_1.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1430
|
+
if Element_1.RightSurface < 0 then error(`Expected "Element_1.RightSurface" to be larger than 0, got {Element_1.RightSurface} instead.`) end
|
|
1431
|
+
if Element_1.RightSurface > 10 then error(`Expected "Element_1.RightSurface" to be smaller than 10, got {Element_1.RightSurface} instead.`) end
|
|
1432
|
+
end
|
|
1433
|
+
local OFFSET_19 = Read(1)
|
|
1434
|
+
if buffer.readu8(RecieveBuffer, OFFSET_19) == 1 then
|
|
1435
|
+
-- Read BLOCK: 1 bytes
|
|
1436
|
+
local BLOCK_START = Read(1)
|
|
1437
|
+
Element_1.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1438
|
+
if Element_1.FrontSurface < 0 then error(`Expected "Element_1.FrontSurface" to be larger than 0, got {Element_1.FrontSurface} instead.`) end
|
|
1439
|
+
if Element_1.FrontSurface > 10 then error(`Expected "Element_1.FrontSurface" to be smaller than 10, got {Element_1.FrontSurface} instead.`) end
|
|
1440
|
+
end
|
|
1441
|
+
local OFFSET_20 = Read(1)
|
|
1442
|
+
if buffer.readu8(RecieveBuffer, OFFSET_20) == 1 then
|
|
1443
|
+
-- Read BLOCK: 1 bytes
|
|
1444
|
+
local BLOCK_START = Read(1)
|
|
1445
|
+
Element_1.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1446
|
+
if Element_1.BackSurface < 0 then error(`Expected "Element_1.BackSurface" to be larger than 0, got {Element_1.BackSurface} instead.`) end
|
|
1447
|
+
if Element_1.BackSurface > 10 then error(`Expected "Element_1.BackSurface" to be smaller than 10, got {Element_1.BackSurface} instead.`) end
|
|
1448
|
+
end
|
|
1449
|
+
local OFFSET_21 = Read(1)
|
|
1450
|
+
if buffer.readu8(RecieveBuffer, OFFSET_21) == 1 then
|
|
1451
|
+
-- Read BLOCK: 1 bytes
|
|
1452
|
+
local BLOCK_START = Read(1)
|
|
1453
|
+
Element_1.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1454
|
+
if Element_1.TopSurface < 0 then error(`Expected "Element_1.TopSurface" to be larger than 0, got {Element_1.TopSurface} instead.`) end
|
|
1455
|
+
if Element_1.TopSurface > 10 then error(`Expected "Element_1.TopSurface" to be smaller than 10, got {Element_1.TopSurface} instead.`) end
|
|
1456
|
+
end
|
|
1457
|
+
local OFFSET_22 = Read(1)
|
|
1458
|
+
if buffer.readu8(RecieveBuffer, OFFSET_22) == 1 then
|
|
1459
|
+
-- Read BLOCK: 1 bytes
|
|
1460
|
+
local BLOCK_START = Read(1)
|
|
1461
|
+
Element_1.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1462
|
+
if Element_1.BottomSurface < 0 then error(`Expected "Element_1.BottomSurface" to be larger than 0, got {Element_1.BottomSurface} instead.`) end
|
|
1463
|
+
if Element_1.BottomSurface > 10 then error(`Expected "Element_1.BottomSurface" to be smaller than 10, got {Element_1.BottomSurface} instead.`) end
|
|
1464
|
+
end
|
|
1465
|
+
local OFFSET_23 = Read(1)
|
|
1466
|
+
if buffer.readu8(RecieveBuffer, OFFSET_23) == 1 then
|
|
1467
|
+
-- Read BLOCK: 2 bytes
|
|
1468
|
+
local BLOCK_START = Read(2)
|
|
1469
|
+
-- START ARRAY
|
|
1470
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1471
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1472
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1473
|
+
Element_1.Textures = table.create(Length)
|
|
1474
|
+
-- Read BLOCK: 11 bytes
|
|
1475
|
+
local ARRAY_START_3 = Read(11 * Length)
|
|
1476
|
+
for Index = 1, Length do
|
|
1477
|
+
local Item_3 = {} :: any
|
|
1478
|
+
-- Read 1
|
|
1479
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
1480
|
+
ARRAY_START_3 += 1
|
|
1481
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
1482
|
+
-- Read BLOCK: 3 bytes
|
|
1483
|
+
local BLOCK_START = Read(3)
|
|
1484
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1485
|
+
end
|
|
1486
|
+
-- Read 1
|
|
1487
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
1488
|
+
ARRAY_START_3 += 1
|
|
1489
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
1490
|
+
-- Read BLOCK: 2 bytes
|
|
1491
|
+
local BLOCK_START = Read(2)
|
|
1492
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1493
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1494
|
+
end
|
|
1495
|
+
-- Read 1
|
|
1496
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1497
|
+
ARRAY_START_3 += 1
|
|
1498
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1499
|
+
-- Read BLOCK: 4 bytes
|
|
1500
|
+
local BLOCK_START = Read(4)
|
|
1501
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1502
|
+
end
|
|
1503
|
+
-- Read 1
|
|
1504
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1505
|
+
ARRAY_START_3 += 1
|
|
1506
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1507
|
+
-- START ARRAY
|
|
1508
|
+
local Length = 2
|
|
1509
|
+
Item_3.UVOffset = table.create(Length)
|
|
1510
|
+
-- Read BLOCK: 4 bytes
|
|
1511
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1512
|
+
for Index = 1, Length do
|
|
1513
|
+
-- Read 4
|
|
1514
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1515
|
+
ARRAY_START_5 += 4
|
|
1516
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1517
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
1518
|
+
end
|
|
1519
|
+
-- END ARRAY
|
|
1520
|
+
end
|
|
1521
|
+
-- Read 1
|
|
1522
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1523
|
+
ARRAY_START_3 += 1
|
|
1524
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1525
|
+
-- START ARRAY
|
|
1526
|
+
local Length = 2
|
|
1527
|
+
Item_3.UVScale = table.create(Length)
|
|
1528
|
+
-- Read BLOCK: 4 bytes
|
|
1529
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1530
|
+
for Index = 1, Length do
|
|
1531
|
+
-- Read 4
|
|
1532
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1533
|
+
ARRAY_START_5 += 4
|
|
1534
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1535
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
1536
|
+
end
|
|
1537
|
+
-- END ARRAY
|
|
1538
|
+
end
|
|
1539
|
+
-- Read 1
|
|
1540
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1541
|
+
ARRAY_START_3 += 1
|
|
1542
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1543
|
+
-- Read BLOCK: 4 bytes
|
|
1544
|
+
local BLOCK_START = Read(4)
|
|
1545
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
1546
|
+
end
|
|
1547
|
+
-- Read 1
|
|
1548
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1549
|
+
ARRAY_START_3 += 1
|
|
1550
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1551
|
+
-- Read BLOCK: 1 bytes
|
|
1552
|
+
local BLOCK_START = Read(1)
|
|
1553
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1554
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1555
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1556
|
+
end
|
|
1557
|
+
-- Read 1
|
|
1558
|
+
local OPERATION_OFFSET_7 = ARRAY_START_3
|
|
1559
|
+
ARRAY_START_3 += 1
|
|
1560
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
1561
|
+
-- Read BLOCK: 4 bytes
|
|
1562
|
+
local BLOCK_START = Read(4)
|
|
1563
|
+
Item_3.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1564
|
+
end
|
|
1565
|
+
-- Read 1
|
|
1566
|
+
local OPERATION_OFFSET_8 = ARRAY_START_3
|
|
1567
|
+
ARRAY_START_3 += 1
|
|
1568
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
1569
|
+
-- Read BLOCK: 4 bytes
|
|
1570
|
+
local BLOCK_START = Read(4)
|
|
1571
|
+
Item_3.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1572
|
+
end
|
|
1573
|
+
-- Read 1
|
|
1574
|
+
local OPERATION_OFFSET_9 = ARRAY_START_3
|
|
1575
|
+
ARRAY_START_3 += 1
|
|
1576
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
1577
|
+
-- Read BLOCK: 4 bytes
|
|
1578
|
+
local BLOCK_START = Read(4)
|
|
1579
|
+
Item_3.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1580
|
+
end
|
|
1581
|
+
-- Read 1
|
|
1582
|
+
local OPERATION_OFFSET_10 = ARRAY_START_3
|
|
1583
|
+
ARRAY_START_3 += 1
|
|
1584
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
1585
|
+
-- Read BLOCK: 4 bytes
|
|
1586
|
+
local BLOCK_START = Read(4)
|
|
1587
|
+
Item_3.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1588
|
+
end
|
|
1589
|
+
table.insert(Element_1.Textures, Item_3)
|
|
1590
|
+
end
|
|
1591
|
+
-- END ARRAY
|
|
1592
|
+
end
|
|
1593
|
+
local OFFSET_24 = Read(1)
|
|
1594
|
+
if buffer.readu8(RecieveBuffer, OFFSET_24) == 1 then
|
|
1595
|
+
-- Read BLOCK: 2 bytes
|
|
1596
|
+
local BLOCK_START = Read(2)
|
|
1597
|
+
-- START ARRAY
|
|
1598
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1599
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1600
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1601
|
+
Element_1.Lights = table.create(Length)
|
|
1602
|
+
-- Read BLOCK: 8 bytes
|
|
1603
|
+
local ARRAY_START_3 = Read(8 * Length)
|
|
1604
|
+
for Index = 1, Length do
|
|
1605
|
+
local Item_3 = {} :: any
|
|
1606
|
+
-- Read 2
|
|
1607
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
1608
|
+
ARRAY_START_3 += 2
|
|
1609
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1610
|
+
Item_3.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1611
|
+
-- Read 1
|
|
1612
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
1613
|
+
ARRAY_START_3 += 1
|
|
1614
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
1615
|
+
-- Read BLOCK: 4 bytes
|
|
1616
|
+
local BLOCK_START = Read(4)
|
|
1617
|
+
Item_3.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1618
|
+
end
|
|
1619
|
+
-- Read 1
|
|
1620
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1621
|
+
ARRAY_START_3 += 1
|
|
1622
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1623
|
+
-- Read BLOCK: 3 bytes
|
|
1624
|
+
local BLOCK_START = Read(3)
|
|
1625
|
+
Item_3.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1626
|
+
end
|
|
1627
|
+
-- Read 1
|
|
1628
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1629
|
+
ARRAY_START_3 += 1
|
|
1630
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1631
|
+
-- Read BLOCK: 1 bytes
|
|
1632
|
+
local BLOCK_START = Read(1)
|
|
1633
|
+
Item_3.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
1634
|
+
end
|
|
1635
|
+
-- Read 1
|
|
1636
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1637
|
+
ARRAY_START_3 += 1
|
|
1638
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1639
|
+
-- Read BLOCK: 4 bytes
|
|
1640
|
+
local BLOCK_START = Read(4)
|
|
1641
|
+
Item_3.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1642
|
+
end
|
|
1643
|
+
-- Read 1
|
|
1644
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1645
|
+
ARRAY_START_3 += 1
|
|
1646
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1647
|
+
-- Read BLOCK: 4 bytes
|
|
1648
|
+
local BLOCK_START = Read(4)
|
|
1649
|
+
Item_3.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1650
|
+
end
|
|
1651
|
+
-- Read 1
|
|
1652
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1653
|
+
ARRAY_START_3 += 1
|
|
1654
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1655
|
+
-- Read BLOCK: 1 bytes
|
|
1656
|
+
local BLOCK_START = Read(1)
|
|
1657
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1658
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1659
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1660
|
+
end
|
|
1661
|
+
table.insert(Element_1.Lights, Item_3)
|
|
1662
|
+
end
|
|
1663
|
+
-- END ARRAY
|
|
1664
|
+
end
|
|
1665
|
+
local OFFSET_25 = Read(1)
|
|
1666
|
+
if buffer.readu8(RecieveBuffer, OFFSET_25) == 1 then
|
|
1667
|
+
-- Read BLOCK: 2 bytes
|
|
1668
|
+
local BLOCK_START = Read(2)
|
|
1669
|
+
-- START ARRAY
|
|
1670
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1671
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1672
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1673
|
+
Element_1.Decals = table.create(Length)
|
|
1674
|
+
-- Read BLOCK: 7 bytes
|
|
1675
|
+
local ARRAY_START_3 = Read(7 * Length)
|
|
1676
|
+
for Index = 1, Length do
|
|
1677
|
+
local Item_3 = {} :: any
|
|
1678
|
+
-- Read 1
|
|
1679
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
1680
|
+
ARRAY_START_3 += 1
|
|
1681
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
1682
|
+
-- Read BLOCK: 3 bytes
|
|
1683
|
+
local BLOCK_START = Read(3)
|
|
1684
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1685
|
+
end
|
|
1686
|
+
-- Read 1
|
|
1687
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
1688
|
+
ARRAY_START_3 += 1
|
|
1689
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
1690
|
+
-- Read BLOCK: 2 bytes
|
|
1691
|
+
local BLOCK_START = Read(2)
|
|
1692
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1693
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1694
|
+
end
|
|
1695
|
+
-- Read 1
|
|
1696
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
1697
|
+
ARRAY_START_3 += 1
|
|
1698
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
1699
|
+
-- Read BLOCK: 4 bytes
|
|
1700
|
+
local BLOCK_START = Read(4)
|
|
1701
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
1702
|
+
end
|
|
1703
|
+
-- Read 1
|
|
1704
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
1705
|
+
ARRAY_START_3 += 1
|
|
1706
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
1707
|
+
-- START ARRAY
|
|
1708
|
+
local Length = 2
|
|
1709
|
+
Item_3.UVOffset = table.create(Length)
|
|
1710
|
+
-- Read BLOCK: 4 bytes
|
|
1711
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1712
|
+
for Index = 1, Length do
|
|
1713
|
+
-- Read 4
|
|
1714
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1715
|
+
ARRAY_START_5 += 4
|
|
1716
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1717
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
1718
|
+
end
|
|
1719
|
+
-- END ARRAY
|
|
1720
|
+
end
|
|
1721
|
+
-- Read 1
|
|
1722
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
1723
|
+
ARRAY_START_3 += 1
|
|
1724
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
1725
|
+
-- START ARRAY
|
|
1726
|
+
local Length = 2
|
|
1727
|
+
Item_3.UVScale = table.create(Length)
|
|
1728
|
+
-- Read BLOCK: 4 bytes
|
|
1729
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
1730
|
+
for Index = 1, Length do
|
|
1731
|
+
-- Read 4
|
|
1732
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
1733
|
+
ARRAY_START_5 += 4
|
|
1734
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1735
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
1736
|
+
end
|
|
1737
|
+
-- END ARRAY
|
|
1738
|
+
end
|
|
1739
|
+
-- Read 1
|
|
1740
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
1741
|
+
ARRAY_START_3 += 1
|
|
1742
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
1743
|
+
-- Read BLOCK: 4 bytes
|
|
1744
|
+
local BLOCK_START = Read(4)
|
|
1745
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
1746
|
+
end
|
|
1747
|
+
-- Read 1
|
|
1748
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
1749
|
+
ARRAY_START_3 += 1
|
|
1750
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
1751
|
+
-- Read BLOCK: 1 bytes
|
|
1752
|
+
local BLOCK_START = Read(1)
|
|
1753
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1754
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
1755
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
1756
|
+
end
|
|
1757
|
+
table.insert(Element_1.Decals, Item_3)
|
|
1758
|
+
end
|
|
1759
|
+
-- END ARRAY
|
|
1760
|
+
end
|
|
1761
|
+
Element_1.Attributes = {}
|
|
1762
|
+
local OFFSET_26 = Read(2)
|
|
1763
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OFFSET_26)
|
|
1764
|
+
for _ = 1, Elements_2 do
|
|
1765
|
+
local OFFSET_0 = Read(2)
|
|
1766
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
1767
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1768
|
+
RecieveInstanceCursor += 1
|
|
1769
|
+
local Element_2 = RecieveInstances[RecieveInstanceCursor]
|
|
1770
|
+
Element_1.Attributes[Key_2] = Element_2
|
|
1771
|
+
end
|
|
1772
|
+
-- START ARRAY
|
|
1773
|
+
local OFFSET_27 = Read(2)
|
|
1774
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_27)
|
|
1775
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1776
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1777
|
+
Element_1.Tags = table.create(Length)
|
|
1778
|
+
-- Read BLOCK: 2 bytes
|
|
1779
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
1780
|
+
for Index = 1, Length do
|
|
1781
|
+
-- Read 2
|
|
1782
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
1783
|
+
ARRAY_START_2 += 2
|
|
1784
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1785
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1786
|
+
table.insert(Element_1.Tags, Item_2)
|
|
1787
|
+
end
|
|
1788
|
+
-- END ARRAY
|
|
1789
|
+
Value1[Key_1] = Element_1
|
|
1790
|
+
end
|
|
1791
|
+
local Value2 = {}
|
|
1792
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 2)
|
|
1793
|
+
for _ = 1, Elements_1 do
|
|
1794
|
+
local OFFSET_0 = Read(2)
|
|
1795
|
+
local Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
1796
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1797
|
+
-- START ARRAY
|
|
1798
|
+
local OFFSET_1 = Read(2)
|
|
1799
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_1)
|
|
1800
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
1801
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
1802
|
+
local Element_1 = table.create(Length)
|
|
1803
|
+
-- Read BLOCK: 56 bytes
|
|
1804
|
+
local ARRAY_START_2 = Read(56 * Length)
|
|
1805
|
+
for Index = 1, Length do
|
|
1806
|
+
local Item_2 = {} :: any
|
|
1807
|
+
-- Read 4
|
|
1808
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
1809
|
+
ARRAY_START_2 += 4
|
|
1810
|
+
local X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
1811
|
+
-- Read 4
|
|
1812
|
+
local OPERATION_OFFSET_1 = ARRAY_START_2
|
|
1813
|
+
ARRAY_START_2 += 4
|
|
1814
|
+
local Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_1)
|
|
1815
|
+
-- Read 4
|
|
1816
|
+
local OPERATION_OFFSET_2 = ARRAY_START_2
|
|
1817
|
+
ARRAY_START_2 += 4
|
|
1818
|
+
local Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_2)
|
|
1819
|
+
local Position = Vector3.new(X, Y, Z)
|
|
1820
|
+
-- Read 4
|
|
1821
|
+
local OPERATION_OFFSET_3 = ARRAY_START_2
|
|
1822
|
+
ARRAY_START_2 += 4
|
|
1823
|
+
local rX = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_3)
|
|
1824
|
+
-- Read 4
|
|
1825
|
+
local OPERATION_OFFSET_4 = ARRAY_START_2
|
|
1826
|
+
ARRAY_START_2 += 4
|
|
1827
|
+
local rY = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_4)
|
|
1828
|
+
-- Read 4
|
|
1829
|
+
local OPERATION_OFFSET_5 = ARRAY_START_2
|
|
1830
|
+
ARRAY_START_2 += 4
|
|
1831
|
+
local rZ = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_5)
|
|
1832
|
+
Item_2.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
1833
|
+
-- Read 4
|
|
1834
|
+
local OPERATION_OFFSET_6 = ARRAY_START_2
|
|
1835
|
+
ARRAY_START_2 += 4
|
|
1836
|
+
X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_6)
|
|
1837
|
+
-- Read 4
|
|
1838
|
+
local OPERATION_OFFSET_7 = ARRAY_START_2
|
|
1839
|
+
ARRAY_START_2 += 4
|
|
1840
|
+
Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_7)
|
|
1841
|
+
-- Read 4
|
|
1842
|
+
local OPERATION_OFFSET_8 = ARRAY_START_2
|
|
1843
|
+
ARRAY_START_2 += 4
|
|
1844
|
+
Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_8)
|
|
1845
|
+
Item_2.Size = Vector3.new(X, Y, Z)
|
|
1846
|
+
-- Read 1
|
|
1847
|
+
local OPERATION_OFFSET_9 = ARRAY_START_2
|
|
1848
|
+
ARRAY_START_2 += 1
|
|
1849
|
+
Item_2.Anchored = (buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1)
|
|
1850
|
+
-- Read 1
|
|
1851
|
+
local OPERATION_OFFSET_10 = ARRAY_START_2
|
|
1852
|
+
ARRAY_START_2 += 1
|
|
1853
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
1854
|
+
-- Read BLOCK: 3 bytes
|
|
1855
|
+
local BLOCK_START = Read(3)
|
|
1856
|
+
Item_2.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
1857
|
+
end
|
|
1858
|
+
-- Read 1
|
|
1859
|
+
local OPERATION_OFFSET_11 = ARRAY_START_2
|
|
1860
|
+
ARRAY_START_2 += 1
|
|
1861
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_11) == 1 then
|
|
1862
|
+
-- Read BLOCK: 2 bytes
|
|
1863
|
+
local BLOCK_START = Read(2)
|
|
1864
|
+
Item_2.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1865
|
+
if Item_2.Material < 256 then error(`Expected "Item_2.Material" to be larger than 256, got {Item_2.Material} instead.`) end
|
|
1866
|
+
if Item_2.Material > 2311 then error(`Expected "Item_2.Material" to be smaller than 2311, got {Item_2.Material} instead.`) end
|
|
1867
|
+
end
|
|
1868
|
+
-- Read 1
|
|
1869
|
+
local OPERATION_OFFSET_12 = ARRAY_START_2
|
|
1870
|
+
ARRAY_START_2 += 1
|
|
1871
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_12) == 1 then
|
|
1872
|
+
-- Read BLOCK: 2 bytes
|
|
1873
|
+
local BLOCK_START = Read(2)
|
|
1874
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1875
|
+
local MantissaExponent = Encoded % 0x8000
|
|
1876
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
1877
|
+
if Encoded // 0x8000 == 1 then
|
|
1878
|
+
Item_2.Transparency = -math.huge
|
|
1879
|
+
else
|
|
1880
|
+
Item_2.Transparency = math.huge
|
|
1881
|
+
end
|
|
1882
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
1883
|
+
Item_2.Transparency = 0 / 0
|
|
1884
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
1885
|
+
Item_2.Transparency = 0
|
|
1886
|
+
else
|
|
1887
|
+
local Mantissa = MantissaExponent % 0x400
|
|
1888
|
+
local Exponent = MantissaExponent // 0x400
|
|
1889
|
+
local Fraction;
|
|
1890
|
+
if Exponent == 0 then
|
|
1891
|
+
Fraction = Mantissa / 0x400
|
|
1892
|
+
else
|
|
1893
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
1894
|
+
end
|
|
1895
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
1896
|
+
Item_2.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
1897
|
+
end
|
|
1898
|
+
end
|
|
1899
|
+
-- Read 1
|
|
1900
|
+
local OPERATION_OFFSET_13 = ARRAY_START_2
|
|
1901
|
+
ARRAY_START_2 += 1
|
|
1902
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_13) == 1 then
|
|
1903
|
+
-- Read BLOCK: 2 bytes
|
|
1904
|
+
local BLOCK_START = Read(2)
|
|
1905
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1906
|
+
local MantissaExponent = Encoded % 0x8000
|
|
1907
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
1908
|
+
if Encoded // 0x8000 == 1 then
|
|
1909
|
+
Item_2.Reflectance = -math.huge
|
|
1910
|
+
else
|
|
1911
|
+
Item_2.Reflectance = math.huge
|
|
1912
|
+
end
|
|
1913
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
1914
|
+
Item_2.Reflectance = 0 / 0
|
|
1915
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
1916
|
+
Item_2.Reflectance = 0
|
|
1917
|
+
else
|
|
1918
|
+
local Mantissa = MantissaExponent % 0x400
|
|
1919
|
+
local Exponent = MantissaExponent // 0x400
|
|
1920
|
+
local Fraction;
|
|
1921
|
+
if Exponent == 0 then
|
|
1922
|
+
Fraction = Mantissa / 0x400
|
|
1923
|
+
else
|
|
1924
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
1925
|
+
end
|
|
1926
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
1927
|
+
Item_2.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
1928
|
+
end
|
|
1929
|
+
end
|
|
1930
|
+
-- Read 1
|
|
1931
|
+
local OPERATION_OFFSET_14 = ARRAY_START_2
|
|
1932
|
+
ARRAY_START_2 += 1
|
|
1933
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_14) == 1 then
|
|
1934
|
+
-- Read BLOCK: 2 bytes
|
|
1935
|
+
local BLOCK_START = Read(2)
|
|
1936
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1937
|
+
Item_2.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1938
|
+
end
|
|
1939
|
+
-- Read 1
|
|
1940
|
+
local OPERATION_OFFSET_15 = ARRAY_START_2
|
|
1941
|
+
ARRAY_START_2 += 1
|
|
1942
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_15) == 1 then
|
|
1943
|
+
-- Read BLOCK: 2 bytes
|
|
1944
|
+
local BLOCK_START = Read(2)
|
|
1945
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
1946
|
+
Item_2.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
1947
|
+
end
|
|
1948
|
+
-- Read 1
|
|
1949
|
+
local OPERATION_OFFSET_16 = ARRAY_START_2
|
|
1950
|
+
ARRAY_START_2 += 1
|
|
1951
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_16) == 1 then
|
|
1952
|
+
-- Read BLOCK: 1 bytes
|
|
1953
|
+
local BLOCK_START = Read(1)
|
|
1954
|
+
Item_2.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1955
|
+
if Item_2.LeftSurface < 0 then error(`Expected "Item_2.LeftSurface" to be larger than 0, got {Item_2.LeftSurface} instead.`) end
|
|
1956
|
+
if Item_2.LeftSurface > 10 then error(`Expected "Item_2.LeftSurface" to be smaller than 10, got {Item_2.LeftSurface} instead.`) end
|
|
1957
|
+
end
|
|
1958
|
+
-- Read 1
|
|
1959
|
+
local OPERATION_OFFSET_17 = ARRAY_START_2
|
|
1960
|
+
ARRAY_START_2 += 1
|
|
1961
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_17) == 1 then
|
|
1962
|
+
-- Read BLOCK: 1 bytes
|
|
1963
|
+
local BLOCK_START = Read(1)
|
|
1964
|
+
Item_2.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1965
|
+
if Item_2.RightSurface < 0 then error(`Expected "Item_2.RightSurface" to be larger than 0, got {Item_2.RightSurface} instead.`) end
|
|
1966
|
+
if Item_2.RightSurface > 10 then error(`Expected "Item_2.RightSurface" to be smaller than 10, got {Item_2.RightSurface} instead.`) end
|
|
1967
|
+
end
|
|
1968
|
+
-- Read 1
|
|
1969
|
+
local OPERATION_OFFSET_18 = ARRAY_START_2
|
|
1970
|
+
ARRAY_START_2 += 1
|
|
1971
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_18) == 1 then
|
|
1972
|
+
-- Read BLOCK: 1 bytes
|
|
1973
|
+
local BLOCK_START = Read(1)
|
|
1974
|
+
Item_2.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1975
|
+
if Item_2.FrontSurface < 0 then error(`Expected "Item_2.FrontSurface" to be larger than 0, got {Item_2.FrontSurface} instead.`) end
|
|
1976
|
+
if Item_2.FrontSurface > 10 then error(`Expected "Item_2.FrontSurface" to be smaller than 10, got {Item_2.FrontSurface} instead.`) end
|
|
1977
|
+
end
|
|
1978
|
+
-- Read 1
|
|
1979
|
+
local OPERATION_OFFSET_19 = ARRAY_START_2
|
|
1980
|
+
ARRAY_START_2 += 1
|
|
1981
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_19) == 1 then
|
|
1982
|
+
-- Read BLOCK: 1 bytes
|
|
1983
|
+
local BLOCK_START = Read(1)
|
|
1984
|
+
Item_2.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1985
|
+
if Item_2.BackSurface < 0 then error(`Expected "Item_2.BackSurface" to be larger than 0, got {Item_2.BackSurface} instead.`) end
|
|
1986
|
+
if Item_2.BackSurface > 10 then error(`Expected "Item_2.BackSurface" to be smaller than 10, got {Item_2.BackSurface} instead.`) end
|
|
1987
|
+
end
|
|
1988
|
+
-- Read 1
|
|
1989
|
+
local OPERATION_OFFSET_20 = ARRAY_START_2
|
|
1990
|
+
ARRAY_START_2 += 1
|
|
1991
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_20) == 1 then
|
|
1992
|
+
-- Read BLOCK: 1 bytes
|
|
1993
|
+
local BLOCK_START = Read(1)
|
|
1994
|
+
Item_2.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
1995
|
+
if Item_2.TopSurface < 0 then error(`Expected "Item_2.TopSurface" to be larger than 0, got {Item_2.TopSurface} instead.`) end
|
|
1996
|
+
if Item_2.TopSurface > 10 then error(`Expected "Item_2.TopSurface" to be smaller than 10, got {Item_2.TopSurface} instead.`) end
|
|
1997
|
+
end
|
|
1998
|
+
-- Read 1
|
|
1999
|
+
local OPERATION_OFFSET_21 = ARRAY_START_2
|
|
2000
|
+
ARRAY_START_2 += 1
|
|
2001
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_21) == 1 then
|
|
2002
|
+
-- Read BLOCK: 1 bytes
|
|
2003
|
+
local BLOCK_START = Read(1)
|
|
2004
|
+
Item_2.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2005
|
+
if Item_2.BottomSurface < 0 then error(`Expected "Item_2.BottomSurface" to be larger than 0, got {Item_2.BottomSurface} instead.`) end
|
|
2006
|
+
if Item_2.BottomSurface > 10 then error(`Expected "Item_2.BottomSurface" to be smaller than 10, got {Item_2.BottomSurface} instead.`) end
|
|
2007
|
+
end
|
|
2008
|
+
-- Read 1
|
|
2009
|
+
local OPERATION_OFFSET_22 = ARRAY_START_2
|
|
2010
|
+
ARRAY_START_2 += 1
|
|
2011
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_22) == 1 then
|
|
2012
|
+
-- Read BLOCK: 2 bytes
|
|
2013
|
+
local BLOCK_START = Read(2)
|
|
2014
|
+
-- START ARRAY
|
|
2015
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2016
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2017
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2018
|
+
Item_2.Textures = table.create(Length)
|
|
2019
|
+
-- Read BLOCK: 11 bytes
|
|
2020
|
+
local ARRAY_START_4 = Read(11 * Length)
|
|
2021
|
+
for Index = 1, Length do
|
|
2022
|
+
local Item_4 = {} :: any
|
|
2023
|
+
-- Read 1
|
|
2024
|
+
local OPERATION_OFFSET_0 = ARRAY_START_4
|
|
2025
|
+
ARRAY_START_4 += 1
|
|
2026
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
2027
|
+
-- Read BLOCK: 3 bytes
|
|
2028
|
+
local BLOCK_START = Read(3)
|
|
2029
|
+
Item_4.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2030
|
+
end
|
|
2031
|
+
-- Read 1
|
|
2032
|
+
local OPERATION_OFFSET_1 = ARRAY_START_4
|
|
2033
|
+
ARRAY_START_4 += 1
|
|
2034
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2035
|
+
-- Read BLOCK: 2 bytes
|
|
2036
|
+
local BLOCK_START = Read(2)
|
|
2037
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2038
|
+
Item_4.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2039
|
+
end
|
|
2040
|
+
-- Read 1
|
|
2041
|
+
local OPERATION_OFFSET_2 = ARRAY_START_4
|
|
2042
|
+
ARRAY_START_4 += 1
|
|
2043
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2044
|
+
-- Read BLOCK: 4 bytes
|
|
2045
|
+
local BLOCK_START = Read(4)
|
|
2046
|
+
Item_4.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2047
|
+
end
|
|
2048
|
+
-- Read 1
|
|
2049
|
+
local OPERATION_OFFSET_3 = ARRAY_START_4
|
|
2050
|
+
ARRAY_START_4 += 1
|
|
2051
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2052
|
+
-- START ARRAY
|
|
2053
|
+
local Length = 2
|
|
2054
|
+
Item_4.UVOffset = table.create(Length)
|
|
2055
|
+
-- Read BLOCK: 4 bytes
|
|
2056
|
+
local ARRAY_START_6 = Read(4 * Length)
|
|
2057
|
+
for Index = 1, Length do
|
|
2058
|
+
-- Read 4
|
|
2059
|
+
local OPERATION_OFFSET_0 = ARRAY_START_6
|
|
2060
|
+
ARRAY_START_6 += 4
|
|
2061
|
+
local Item_6 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2062
|
+
table.insert(Item_4.UVOffset, Item_6)
|
|
2063
|
+
end
|
|
2064
|
+
-- END ARRAY
|
|
2065
|
+
end
|
|
2066
|
+
-- Read 1
|
|
2067
|
+
local OPERATION_OFFSET_4 = ARRAY_START_4
|
|
2068
|
+
ARRAY_START_4 += 1
|
|
2069
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2070
|
+
-- START ARRAY
|
|
2071
|
+
local Length = 2
|
|
2072
|
+
Item_4.UVScale = table.create(Length)
|
|
2073
|
+
-- Read BLOCK: 4 bytes
|
|
2074
|
+
local ARRAY_START_6 = Read(4 * Length)
|
|
2075
|
+
for Index = 1, Length do
|
|
2076
|
+
-- Read 4
|
|
2077
|
+
local OPERATION_OFFSET_0 = ARRAY_START_6
|
|
2078
|
+
ARRAY_START_6 += 4
|
|
2079
|
+
local Item_6 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2080
|
+
table.insert(Item_4.UVScale, Item_6)
|
|
2081
|
+
end
|
|
2082
|
+
-- END ARRAY
|
|
2083
|
+
end
|
|
2084
|
+
-- Read 1
|
|
2085
|
+
local OPERATION_OFFSET_5 = ARRAY_START_4
|
|
2086
|
+
ARRAY_START_4 += 1
|
|
2087
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2088
|
+
-- Read BLOCK: 4 bytes
|
|
2089
|
+
local BLOCK_START = Read(4)
|
|
2090
|
+
Item_4.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
2091
|
+
end
|
|
2092
|
+
-- Read 1
|
|
2093
|
+
local OPERATION_OFFSET_6 = ARRAY_START_4
|
|
2094
|
+
ARRAY_START_4 += 1
|
|
2095
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
2096
|
+
-- Read BLOCK: 1 bytes
|
|
2097
|
+
local BLOCK_START = Read(1)
|
|
2098
|
+
Item_4.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2099
|
+
if Item_4.Face < 0 then error(`Expected "Item_4.Face" to be larger than 0, got {Item_4.Face} instead.`) end
|
|
2100
|
+
if Item_4.Face > 5 then error(`Expected "Item_4.Face" to be smaller than 5, got {Item_4.Face} instead.`) end
|
|
2101
|
+
end
|
|
2102
|
+
-- Read 1
|
|
2103
|
+
local OPERATION_OFFSET_7 = ARRAY_START_4
|
|
2104
|
+
ARRAY_START_4 += 1
|
|
2105
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
2106
|
+
-- Read BLOCK: 4 bytes
|
|
2107
|
+
local BLOCK_START = Read(4)
|
|
2108
|
+
Item_4.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2109
|
+
end
|
|
2110
|
+
-- Read 1
|
|
2111
|
+
local OPERATION_OFFSET_8 = ARRAY_START_4
|
|
2112
|
+
ARRAY_START_4 += 1
|
|
2113
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
2114
|
+
-- Read BLOCK: 4 bytes
|
|
2115
|
+
local BLOCK_START = Read(4)
|
|
2116
|
+
Item_4.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2117
|
+
end
|
|
2118
|
+
-- Read 1
|
|
2119
|
+
local OPERATION_OFFSET_9 = ARRAY_START_4
|
|
2120
|
+
ARRAY_START_4 += 1
|
|
2121
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
2122
|
+
-- Read BLOCK: 4 bytes
|
|
2123
|
+
local BLOCK_START = Read(4)
|
|
2124
|
+
Item_4.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2125
|
+
end
|
|
2126
|
+
-- Read 1
|
|
2127
|
+
local OPERATION_OFFSET_10 = ARRAY_START_4
|
|
2128
|
+
ARRAY_START_4 += 1
|
|
2129
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
2130
|
+
-- Read BLOCK: 4 bytes
|
|
2131
|
+
local BLOCK_START = Read(4)
|
|
2132
|
+
Item_4.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2133
|
+
end
|
|
2134
|
+
table.insert(Item_2.Textures, Item_4)
|
|
2135
|
+
end
|
|
2136
|
+
-- END ARRAY
|
|
2137
|
+
end
|
|
2138
|
+
-- Read 1
|
|
2139
|
+
local OPERATION_OFFSET_23 = ARRAY_START_2
|
|
2140
|
+
ARRAY_START_2 += 1
|
|
2141
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_23) == 1 then
|
|
2142
|
+
-- Read BLOCK: 2 bytes
|
|
2143
|
+
local BLOCK_START = Read(2)
|
|
2144
|
+
-- START ARRAY
|
|
2145
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2146
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2147
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2148
|
+
Item_2.Lights = table.create(Length)
|
|
2149
|
+
-- Read BLOCK: 8 bytes
|
|
2150
|
+
local ARRAY_START_4 = Read(8 * Length)
|
|
2151
|
+
for Index = 1, Length do
|
|
2152
|
+
local Item_4 = {} :: any
|
|
2153
|
+
-- Read 2
|
|
2154
|
+
local OPERATION_OFFSET_0 = ARRAY_START_4
|
|
2155
|
+
ARRAY_START_4 += 2
|
|
2156
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2157
|
+
Item_4.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2158
|
+
-- Read 1
|
|
2159
|
+
local OPERATION_OFFSET_1 = ARRAY_START_4
|
|
2160
|
+
ARRAY_START_4 += 1
|
|
2161
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2162
|
+
-- Read BLOCK: 4 bytes
|
|
2163
|
+
local BLOCK_START = Read(4)
|
|
2164
|
+
Item_4.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2165
|
+
end
|
|
2166
|
+
-- Read 1
|
|
2167
|
+
local OPERATION_OFFSET_2 = ARRAY_START_4
|
|
2168
|
+
ARRAY_START_4 += 1
|
|
2169
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2170
|
+
-- Read BLOCK: 3 bytes
|
|
2171
|
+
local BLOCK_START = Read(3)
|
|
2172
|
+
Item_4.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2173
|
+
end
|
|
2174
|
+
-- Read 1
|
|
2175
|
+
local OPERATION_OFFSET_3 = ARRAY_START_4
|
|
2176
|
+
ARRAY_START_4 += 1
|
|
2177
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2178
|
+
-- Read BLOCK: 1 bytes
|
|
2179
|
+
local BLOCK_START = Read(1)
|
|
2180
|
+
Item_4.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
2181
|
+
end
|
|
2182
|
+
-- Read 1
|
|
2183
|
+
local OPERATION_OFFSET_4 = ARRAY_START_4
|
|
2184
|
+
ARRAY_START_4 += 1
|
|
2185
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2186
|
+
-- Read BLOCK: 4 bytes
|
|
2187
|
+
local BLOCK_START = Read(4)
|
|
2188
|
+
Item_4.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2189
|
+
end
|
|
2190
|
+
-- Read 1
|
|
2191
|
+
local OPERATION_OFFSET_5 = ARRAY_START_4
|
|
2192
|
+
ARRAY_START_4 += 1
|
|
2193
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2194
|
+
-- Read BLOCK: 4 bytes
|
|
2195
|
+
local BLOCK_START = Read(4)
|
|
2196
|
+
Item_4.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2197
|
+
end
|
|
2198
|
+
-- Read 1
|
|
2199
|
+
local OPERATION_OFFSET_6 = ARRAY_START_4
|
|
2200
|
+
ARRAY_START_4 += 1
|
|
2201
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
2202
|
+
-- Read BLOCK: 1 bytes
|
|
2203
|
+
local BLOCK_START = Read(1)
|
|
2204
|
+
Item_4.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2205
|
+
if Item_4.Face < 0 then error(`Expected "Item_4.Face" to be larger than 0, got {Item_4.Face} instead.`) end
|
|
2206
|
+
if Item_4.Face > 5 then error(`Expected "Item_4.Face" to be smaller than 5, got {Item_4.Face} instead.`) end
|
|
2207
|
+
end
|
|
2208
|
+
table.insert(Item_2.Lights, Item_4)
|
|
2209
|
+
end
|
|
2210
|
+
-- END ARRAY
|
|
2211
|
+
end
|
|
2212
|
+
-- Read 1
|
|
2213
|
+
local OPERATION_OFFSET_24 = ARRAY_START_2
|
|
2214
|
+
ARRAY_START_2 += 1
|
|
2215
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_24) == 1 then
|
|
2216
|
+
-- Read BLOCK: 2 bytes
|
|
2217
|
+
local BLOCK_START = Read(2)
|
|
2218
|
+
-- START ARRAY
|
|
2219
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2220
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2221
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2222
|
+
Item_2.Decals = table.create(Length)
|
|
2223
|
+
-- Read BLOCK: 7 bytes
|
|
2224
|
+
local ARRAY_START_4 = Read(7 * Length)
|
|
2225
|
+
for Index = 1, Length do
|
|
2226
|
+
local Item_4 = {} :: any
|
|
2227
|
+
-- Read 1
|
|
2228
|
+
local OPERATION_OFFSET_0 = ARRAY_START_4
|
|
2229
|
+
ARRAY_START_4 += 1
|
|
2230
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
2231
|
+
-- Read BLOCK: 3 bytes
|
|
2232
|
+
local BLOCK_START = Read(3)
|
|
2233
|
+
Item_4.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2234
|
+
end
|
|
2235
|
+
-- Read 1
|
|
2236
|
+
local OPERATION_OFFSET_1 = ARRAY_START_4
|
|
2237
|
+
ARRAY_START_4 += 1
|
|
2238
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2239
|
+
-- Read BLOCK: 2 bytes
|
|
2240
|
+
local BLOCK_START = Read(2)
|
|
2241
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2242
|
+
Item_4.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2243
|
+
end
|
|
2244
|
+
-- Read 1
|
|
2245
|
+
local OPERATION_OFFSET_2 = ARRAY_START_4
|
|
2246
|
+
ARRAY_START_4 += 1
|
|
2247
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2248
|
+
-- Read BLOCK: 4 bytes
|
|
2249
|
+
local BLOCK_START = Read(4)
|
|
2250
|
+
Item_4.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2251
|
+
end
|
|
2252
|
+
-- Read 1
|
|
2253
|
+
local OPERATION_OFFSET_3 = ARRAY_START_4
|
|
2254
|
+
ARRAY_START_4 += 1
|
|
2255
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2256
|
+
-- START ARRAY
|
|
2257
|
+
local Length = 2
|
|
2258
|
+
Item_4.UVOffset = table.create(Length)
|
|
2259
|
+
-- Read BLOCK: 4 bytes
|
|
2260
|
+
local ARRAY_START_6 = Read(4 * Length)
|
|
2261
|
+
for Index = 1, Length do
|
|
2262
|
+
-- Read 4
|
|
2263
|
+
local OPERATION_OFFSET_0 = ARRAY_START_6
|
|
2264
|
+
ARRAY_START_6 += 4
|
|
2265
|
+
local Item_6 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2266
|
+
table.insert(Item_4.UVOffset, Item_6)
|
|
2267
|
+
end
|
|
2268
|
+
-- END ARRAY
|
|
2269
|
+
end
|
|
2270
|
+
-- Read 1
|
|
2271
|
+
local OPERATION_OFFSET_4 = ARRAY_START_4
|
|
2272
|
+
ARRAY_START_4 += 1
|
|
2273
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2274
|
+
-- START ARRAY
|
|
2275
|
+
local Length = 2
|
|
2276
|
+
Item_4.UVScale = table.create(Length)
|
|
2277
|
+
-- Read BLOCK: 4 bytes
|
|
2278
|
+
local ARRAY_START_6 = Read(4 * Length)
|
|
2279
|
+
for Index = 1, Length do
|
|
2280
|
+
-- Read 4
|
|
2281
|
+
local OPERATION_OFFSET_0 = ARRAY_START_6
|
|
2282
|
+
ARRAY_START_6 += 4
|
|
2283
|
+
local Item_6 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2284
|
+
table.insert(Item_4.UVScale, Item_6)
|
|
2285
|
+
end
|
|
2286
|
+
-- END ARRAY
|
|
2287
|
+
end
|
|
2288
|
+
-- Read 1
|
|
2289
|
+
local OPERATION_OFFSET_5 = ARRAY_START_4
|
|
2290
|
+
ARRAY_START_4 += 1
|
|
2291
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2292
|
+
-- Read BLOCK: 4 bytes
|
|
2293
|
+
local BLOCK_START = Read(4)
|
|
2294
|
+
Item_4.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
2295
|
+
end
|
|
2296
|
+
-- Read 1
|
|
2297
|
+
local OPERATION_OFFSET_6 = ARRAY_START_4
|
|
2298
|
+
ARRAY_START_4 += 1
|
|
2299
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
2300
|
+
-- Read BLOCK: 1 bytes
|
|
2301
|
+
local BLOCK_START = Read(1)
|
|
2302
|
+
Item_4.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2303
|
+
if Item_4.Face < 0 then error(`Expected "Item_4.Face" to be larger than 0, got {Item_4.Face} instead.`) end
|
|
2304
|
+
if Item_4.Face > 5 then error(`Expected "Item_4.Face" to be smaller than 5, got {Item_4.Face} instead.`) end
|
|
2305
|
+
end
|
|
2306
|
+
table.insert(Item_2.Decals, Item_4)
|
|
2307
|
+
end
|
|
2308
|
+
-- END ARRAY
|
|
2309
|
+
end
|
|
2310
|
+
Item_2.Attributes = {}
|
|
2311
|
+
-- Read 2
|
|
2312
|
+
local OPERATION_OFFSET_25 = ARRAY_START_2
|
|
2313
|
+
ARRAY_START_2 += 2
|
|
2314
|
+
local Elements_3 = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_25)
|
|
2315
|
+
for _ = 1, Elements_3 do
|
|
2316
|
+
local OFFSET_0 = Read(2)
|
|
2317
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2318
|
+
local Key_3 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2319
|
+
RecieveInstanceCursor += 1
|
|
2320
|
+
local Element_3 = RecieveInstances[RecieveInstanceCursor]
|
|
2321
|
+
Item_2.Attributes[Key_3] = Element_3
|
|
2322
|
+
end
|
|
2323
|
+
-- START ARRAY
|
|
2324
|
+
-- Read 2
|
|
2325
|
+
local OPERATION_OFFSET_26 = ARRAY_START_2
|
|
2326
|
+
ARRAY_START_2 += 2
|
|
2327
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_26)
|
|
2328
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2329
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2330
|
+
Item_2.Tags = table.create(Length)
|
|
2331
|
+
-- Read BLOCK: 2 bytes
|
|
2332
|
+
local ARRAY_START_3 = Read(2 * Length)
|
|
2333
|
+
for Index = 1, Length do
|
|
2334
|
+
-- Read 2
|
|
2335
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
2336
|
+
ARRAY_START_3 += 2
|
|
2337
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2338
|
+
local Item_3 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2339
|
+
table.insert(Item_2.Tags, Item_3)
|
|
2340
|
+
end
|
|
2341
|
+
-- END ARRAY
|
|
2342
|
+
table.insert(Element_1, Item_2)
|
|
2343
|
+
end
|
|
2344
|
+
-- END ARRAY
|
|
2345
|
+
Value2[Key_1] = Element_1
|
|
2346
|
+
end
|
|
2347
|
+
local Value3 = {}
|
|
2348
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 4)
|
|
2349
|
+
for _ = 1, Elements_1 do
|
|
2350
|
+
local OFFSET_0 = Read(2)
|
|
2351
|
+
local Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2352
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2353
|
+
local OFFSET_1 = Read(1)
|
|
2354
|
+
local Element_1 = (buffer.readu8(RecieveBuffer, OFFSET_1) == 1)
|
|
2355
|
+
Value3[Key_1] = Element_1
|
|
2356
|
+
end
|
|
2357
|
+
-- START ARRAY
|
|
2358
|
+
local Length = buffer.readu16(RecieveBuffer, BLOCK_START + 6)
|
|
2359
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2360
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2361
|
+
local Value4 = table.create(Length)
|
|
2362
|
+
-- Read BLOCK: 47 bytes
|
|
2363
|
+
local ARRAY_START_1 = Read(47 * Length)
|
|
2364
|
+
for Index = 1, Length do
|
|
2365
|
+
local Item_1 = {} :: any
|
|
2366
|
+
-- Read 2
|
|
2367
|
+
local OPERATION_OFFSET_0 = ARRAY_START_1
|
|
2368
|
+
ARRAY_START_1 += 2
|
|
2369
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2370
|
+
Item_1.ID = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2371
|
+
Item_1.CuttingPart = {} :: any
|
|
2372
|
+
-- Read 4
|
|
2373
|
+
local OPERATION_OFFSET_1 = ARRAY_START_1
|
|
2374
|
+
ARRAY_START_1 += 4
|
|
2375
|
+
local X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_1)
|
|
2376
|
+
-- Read 4
|
|
2377
|
+
local OPERATION_OFFSET_2 = ARRAY_START_1
|
|
2378
|
+
ARRAY_START_1 += 4
|
|
2379
|
+
local Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_2)
|
|
2380
|
+
-- Read 4
|
|
2381
|
+
local OPERATION_OFFSET_3 = ARRAY_START_1
|
|
2382
|
+
ARRAY_START_1 += 4
|
|
2383
|
+
local Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_3)
|
|
2384
|
+
local Position = Vector3.new(X, Y, Z)
|
|
2385
|
+
-- Read 4
|
|
2386
|
+
local OPERATION_OFFSET_4 = ARRAY_START_1
|
|
2387
|
+
ARRAY_START_1 += 4
|
|
2388
|
+
local rX = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_4)
|
|
2389
|
+
-- Read 4
|
|
2390
|
+
local OPERATION_OFFSET_5 = ARRAY_START_1
|
|
2391
|
+
ARRAY_START_1 += 4
|
|
2392
|
+
local rY = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_5)
|
|
2393
|
+
-- Read 4
|
|
2394
|
+
local OPERATION_OFFSET_6 = ARRAY_START_1
|
|
2395
|
+
ARRAY_START_1 += 4
|
|
2396
|
+
local rZ = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_6)
|
|
2397
|
+
Item_1.CuttingPart.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
2398
|
+
-- Read 4
|
|
2399
|
+
local OPERATION_OFFSET_7 = ARRAY_START_1
|
|
2400
|
+
ARRAY_START_1 += 4
|
|
2401
|
+
X = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_7)
|
|
2402
|
+
-- Read 4
|
|
2403
|
+
local OPERATION_OFFSET_8 = ARRAY_START_1
|
|
2404
|
+
ARRAY_START_1 += 4
|
|
2405
|
+
Y = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_8)
|
|
2406
|
+
-- Read 4
|
|
2407
|
+
local OPERATION_OFFSET_9 = ARRAY_START_1
|
|
2408
|
+
ARRAY_START_1 += 4
|
|
2409
|
+
Z = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_9)
|
|
2410
|
+
Item_1.CuttingPart.Size = Vector3.new(X, Y, Z)
|
|
2411
|
+
-- Read 1
|
|
2412
|
+
local OPERATION_OFFSET_10 = ARRAY_START_1
|
|
2413
|
+
ARRAY_START_1 += 1
|
|
2414
|
+
Item_1.CuttingPart.Shape = buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10)
|
|
2415
|
+
if Item_1.CuttingPart.Shape < 0 then error(`Expected "Item_1.CuttingPart.Shape" to be larger than 0, got {Item_1.CuttingPart.Shape} instead.`) end
|
|
2416
|
+
if Item_1.CuttingPart.Shape > 4 then error(`Expected "Item_1.CuttingPart.Shape" to be smaller than 4, got {Item_1.CuttingPart.Shape} instead.`) end
|
|
2417
|
+
-- Read 1
|
|
2418
|
+
local OPERATION_OFFSET_11 = ARRAY_START_1
|
|
2419
|
+
ARRAY_START_1 += 1
|
|
2420
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_11) == 1 then
|
|
2421
|
+
-- Read BLOCK: 2 bytes
|
|
2422
|
+
local BLOCK_START = Read(2)
|
|
2423
|
+
-- START ARRAY
|
|
2424
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2425
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2426
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2427
|
+
Item_1.FilterTagged = table.create(Length)
|
|
2428
|
+
-- Read BLOCK: 2 bytes
|
|
2429
|
+
local ARRAY_START_3 = Read(2 * Length)
|
|
2430
|
+
for Index = 1, Length do
|
|
2431
|
+
-- Read 2
|
|
2432
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
2433
|
+
ARRAY_START_3 += 2
|
|
2434
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2435
|
+
local Item_3 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2436
|
+
table.insert(Item_1.FilterTagged, Item_3)
|
|
2437
|
+
end
|
|
2438
|
+
-- END ARRAY
|
|
2439
|
+
end
|
|
2440
|
+
-- Read 1
|
|
2441
|
+
local OPERATION_OFFSET_12 = ARRAY_START_1
|
|
2442
|
+
ARRAY_START_1 += 1
|
|
2443
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_12) == 1 then
|
|
2444
|
+
-- Read BLOCK: 4 bytes
|
|
2445
|
+
local BLOCK_START = Read(4)
|
|
2446
|
+
Item_1.GridSize = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2447
|
+
end
|
|
2448
|
+
-- Read 1
|
|
2449
|
+
local OPERATION_OFFSET_13 = ARRAY_START_1
|
|
2450
|
+
ARRAY_START_1 += 1
|
|
2451
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_13) == 1 then
|
|
2452
|
+
-- Read BLOCK: 4 bytes
|
|
2453
|
+
local BLOCK_START = Read(4)
|
|
2454
|
+
Item_1.CleanupDelay = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2455
|
+
end
|
|
2456
|
+
-- Read 1
|
|
2457
|
+
local OPERATION_OFFSET_14 = ARRAY_START_1
|
|
2458
|
+
ARRAY_START_1 += 1
|
|
2459
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_14) == 1 then
|
|
2460
|
+
-- Read BLOCK: 1 bytes
|
|
2461
|
+
local BLOCK_START = Read(1)
|
|
2462
|
+
Item_1.SkipWalls = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
2463
|
+
end
|
|
2464
|
+
-- Read 1
|
|
2465
|
+
local OPERATION_OFFSET_15 = ARRAY_START_1
|
|
2466
|
+
ARRAY_START_1 += 1
|
|
2467
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_15) == 1 then
|
|
2468
|
+
-- Read BLOCK: 1 bytes
|
|
2469
|
+
local BLOCK_START = Read(1)
|
|
2470
|
+
Item_1.SkipFloors = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
2471
|
+
end
|
|
2472
|
+
-- Read 1
|
|
2473
|
+
local OPERATION_OFFSET_16 = ARRAY_START_1
|
|
2474
|
+
ARRAY_START_1 += 1
|
|
2475
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_16) == 1 then
|
|
2476
|
+
-- Read BLOCK: 1 bytes
|
|
2477
|
+
local BLOCK_START = Read(1)
|
|
2478
|
+
Item_1.SkipEncapsulatedVoxels = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
2479
|
+
end
|
|
2480
|
+
-- Read 1
|
|
2481
|
+
local OPERATION_OFFSET_17 = ARRAY_START_1
|
|
2482
|
+
ARRAY_START_1 += 1
|
|
2483
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_17) == 1 then
|
|
2484
|
+
-- Read BLOCK: 2 bytes
|
|
2485
|
+
local BLOCK_START = Read(2)
|
|
2486
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2487
|
+
Item_1.OnVoxelDestruct = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2488
|
+
end
|
|
2489
|
+
-- Read 1
|
|
2490
|
+
local OPERATION_OFFSET_18 = ARRAY_START_1
|
|
2491
|
+
ARRAY_START_1 += 1
|
|
2492
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_18) == 1 then
|
|
2493
|
+
RecieveInstanceCursor += 1
|
|
2494
|
+
Item_1.UserData = RecieveInstances[RecieveInstanceCursor]
|
|
2495
|
+
end
|
|
2496
|
+
table.insert(Value4, Item_1)
|
|
2497
|
+
end
|
|
2498
|
+
-- END ARRAY
|
|
2499
|
+
local Value5 = {}
|
|
2500
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 8)
|
|
2501
|
+
for _ = 1, Elements_1 do
|
|
2502
|
+
local OFFSET_0 = Read(2)
|
|
2503
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2504
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2505
|
+
local OFFSET_1 = Read(4)
|
|
2506
|
+
local Element_1 = buffer.readu32(RecieveBuffer, OFFSET_1)
|
|
2507
|
+
Value5[Key_1] = Element_1
|
|
2508
|
+
end
|
|
2509
|
+
local Value6 = {}
|
|
2510
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 10)
|
|
2511
|
+
for _ = 1, Elements_1 do
|
|
2512
|
+
local OFFSET_0 = Read(2)
|
|
2513
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2514
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2515
|
+
local Element_1 = {}
|
|
2516
|
+
local OFFSET_1 = Read(2)
|
|
2517
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OFFSET_1)
|
|
2518
|
+
for _ = 1, Elements_2 do
|
|
2519
|
+
local OFFSET_0 = Read(2)
|
|
2520
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2521
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2522
|
+
local OFFSET_1 = Read(1)
|
|
2523
|
+
local Element_2 = (buffer.readu8(RecieveBuffer, OFFSET_1) == 1)
|
|
2524
|
+
Element_1[Key_2] = Element_2
|
|
2525
|
+
end
|
|
2526
|
+
Value6[Key_1] = Element_1
|
|
2527
|
+
end
|
|
2528
|
+
local Value7 = {}
|
|
2529
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 12)
|
|
2530
|
+
for _ = 1, Elements_1 do
|
|
2531
|
+
local OFFSET_0 = Read(2)
|
|
2532
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2533
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2534
|
+
local OFFSET_1 = Read(4)
|
|
2535
|
+
local Element_1 = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
2536
|
+
Value7[Key_1] = Element_1
|
|
2537
|
+
end
|
|
2538
|
+
local Value8 = {}
|
|
2539
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 14)
|
|
2540
|
+
for _ = 1, Elements_1 do
|
|
2541
|
+
local OFFSET_0 = Read(2)
|
|
2542
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2543
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2544
|
+
local OFFSET_1 = Read(4)
|
|
2545
|
+
local Element_1 = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
2546
|
+
Value8[Key_1] = Element_1
|
|
2547
|
+
end
|
|
2548
|
+
local Value9 = {}
|
|
2549
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 16)
|
|
2550
|
+
for _ = 1, Elements_1 do
|
|
2551
|
+
local OFFSET_0 = Read(2)
|
|
2552
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2553
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2554
|
+
local OFFSET_1 = Read(4)
|
|
2555
|
+
local Element_1 = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
2556
|
+
Value9[Key_1] = Element_1
|
|
2557
|
+
end
|
|
2558
|
+
local Value10 = {}
|
|
2559
|
+
Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 18)
|
|
2560
|
+
for _ = 1, Elements_1 do
|
|
2561
|
+
local OFFSET_0 = Read(2)
|
|
2562
|
+
local Key_1 = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
2563
|
+
local Element_1 = {} :: any
|
|
2564
|
+
local OFFSET_1 = Read(4)
|
|
2565
|
+
local X = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
2566
|
+
local OFFSET_2 = Read(4)
|
|
2567
|
+
local Y = buffer.readf32(RecieveBuffer, OFFSET_2)
|
|
2568
|
+
local OFFSET_3 = Read(4)
|
|
2569
|
+
local Z = buffer.readf32(RecieveBuffer, OFFSET_3)
|
|
2570
|
+
local Position = Vector3.new(X, Y, Z)
|
|
2571
|
+
local OFFSET_4 = Read(4)
|
|
2572
|
+
local rX = buffer.readf32(RecieveBuffer, OFFSET_4)
|
|
2573
|
+
local OFFSET_5 = Read(4)
|
|
2574
|
+
local rY = buffer.readf32(RecieveBuffer, OFFSET_5)
|
|
2575
|
+
local OFFSET_6 = Read(4)
|
|
2576
|
+
local rZ = buffer.readf32(RecieveBuffer, OFFSET_6)
|
|
2577
|
+
Element_1.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
2578
|
+
local OFFSET_7 = Read(4)
|
|
2579
|
+
X = buffer.readf32(RecieveBuffer, OFFSET_7)
|
|
2580
|
+
local OFFSET_8 = Read(4)
|
|
2581
|
+
Y = buffer.readf32(RecieveBuffer, OFFSET_8)
|
|
2582
|
+
local OFFSET_9 = Read(4)
|
|
2583
|
+
Z = buffer.readf32(RecieveBuffer, OFFSET_9)
|
|
2584
|
+
Element_1.Size = Vector3.new(X, Y, Z)
|
|
2585
|
+
local OFFSET_10 = Read(1)
|
|
2586
|
+
Element_1.Anchored = (buffer.readu8(RecieveBuffer, OFFSET_10) == 1)
|
|
2587
|
+
local OFFSET_11 = Read(1)
|
|
2588
|
+
if buffer.readu8(RecieveBuffer, OFFSET_11) == 1 then
|
|
2589
|
+
-- Read BLOCK: 3 bytes
|
|
2590
|
+
local BLOCK_START = Read(3)
|
|
2591
|
+
Element_1.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2592
|
+
end
|
|
2593
|
+
local OFFSET_12 = Read(1)
|
|
2594
|
+
if buffer.readu8(RecieveBuffer, OFFSET_12) == 1 then
|
|
2595
|
+
-- Read BLOCK: 2 bytes
|
|
2596
|
+
local BLOCK_START = Read(2)
|
|
2597
|
+
Element_1.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2598
|
+
if Element_1.Material < 256 then error(`Expected "Element_1.Material" to be larger than 256, got {Element_1.Material} instead.`) end
|
|
2599
|
+
if Element_1.Material > 2311 then error(`Expected "Element_1.Material" to be smaller than 2311, got {Element_1.Material} instead.`) end
|
|
2600
|
+
end
|
|
2601
|
+
local OFFSET_13 = Read(1)
|
|
2602
|
+
if buffer.readu8(RecieveBuffer, OFFSET_13) == 1 then
|
|
2603
|
+
-- Read BLOCK: 2 bytes
|
|
2604
|
+
local BLOCK_START = Read(2)
|
|
2605
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2606
|
+
local MantissaExponent = Encoded % 0x8000
|
|
2607
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
2608
|
+
if Encoded // 0x8000 == 1 then
|
|
2609
|
+
Element_1.Transparency = -math.huge
|
|
2610
|
+
else
|
|
2611
|
+
Element_1.Transparency = math.huge
|
|
2612
|
+
end
|
|
2613
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
2614
|
+
Element_1.Transparency = 0 / 0
|
|
2615
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
2616
|
+
Element_1.Transparency = 0
|
|
2617
|
+
else
|
|
2618
|
+
local Mantissa = MantissaExponent % 0x400
|
|
2619
|
+
local Exponent = MantissaExponent // 0x400
|
|
2620
|
+
local Fraction;
|
|
2621
|
+
if Exponent == 0 then
|
|
2622
|
+
Fraction = Mantissa / 0x400
|
|
2623
|
+
else
|
|
2624
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
2625
|
+
end
|
|
2626
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
2627
|
+
Element_1.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
2628
|
+
end
|
|
2629
|
+
end
|
|
2630
|
+
local OFFSET_14 = Read(1)
|
|
2631
|
+
if buffer.readu8(RecieveBuffer, OFFSET_14) == 1 then
|
|
2632
|
+
-- Read BLOCK: 2 bytes
|
|
2633
|
+
local BLOCK_START = Read(2)
|
|
2634
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2635
|
+
local MantissaExponent = Encoded % 0x8000
|
|
2636
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
2637
|
+
if Encoded // 0x8000 == 1 then
|
|
2638
|
+
Element_1.Reflectance = -math.huge
|
|
2639
|
+
else
|
|
2640
|
+
Element_1.Reflectance = math.huge
|
|
2641
|
+
end
|
|
2642
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
2643
|
+
Element_1.Reflectance = 0 / 0
|
|
2644
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
2645
|
+
Element_1.Reflectance = 0
|
|
2646
|
+
else
|
|
2647
|
+
local Mantissa = MantissaExponent % 0x400
|
|
2648
|
+
local Exponent = MantissaExponent // 0x400
|
|
2649
|
+
local Fraction;
|
|
2650
|
+
if Exponent == 0 then
|
|
2651
|
+
Fraction = Mantissa / 0x400
|
|
2652
|
+
else
|
|
2653
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
2654
|
+
end
|
|
2655
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
2656
|
+
Element_1.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
2657
|
+
end
|
|
2658
|
+
end
|
|
2659
|
+
local OFFSET_15 = Read(1)
|
|
2660
|
+
if buffer.readu8(RecieveBuffer, OFFSET_15) == 1 then
|
|
2661
|
+
-- Read BLOCK: 2 bytes
|
|
2662
|
+
local BLOCK_START = Read(2)
|
|
2663
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2664
|
+
Element_1.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2665
|
+
end
|
|
2666
|
+
local OFFSET_16 = Read(1)
|
|
2667
|
+
if buffer.readu8(RecieveBuffer, OFFSET_16) == 1 then
|
|
2668
|
+
-- Read BLOCK: 2 bytes
|
|
2669
|
+
local BLOCK_START = Read(2)
|
|
2670
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2671
|
+
Element_1.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2672
|
+
end
|
|
2673
|
+
local OFFSET_17 = Read(1)
|
|
2674
|
+
if buffer.readu8(RecieveBuffer, OFFSET_17) == 1 then
|
|
2675
|
+
-- Read BLOCK: 1 bytes
|
|
2676
|
+
local BLOCK_START = Read(1)
|
|
2677
|
+
Element_1.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2678
|
+
if Element_1.LeftSurface < 0 then error(`Expected "Element_1.LeftSurface" to be larger than 0, got {Element_1.LeftSurface} instead.`) end
|
|
2679
|
+
if Element_1.LeftSurface > 10 then error(`Expected "Element_1.LeftSurface" to be smaller than 10, got {Element_1.LeftSurface} instead.`) end
|
|
2680
|
+
end
|
|
2681
|
+
local OFFSET_18 = Read(1)
|
|
2682
|
+
if buffer.readu8(RecieveBuffer, OFFSET_18) == 1 then
|
|
2683
|
+
-- Read BLOCK: 1 bytes
|
|
2684
|
+
local BLOCK_START = Read(1)
|
|
2685
|
+
Element_1.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2686
|
+
if Element_1.RightSurface < 0 then error(`Expected "Element_1.RightSurface" to be larger than 0, got {Element_1.RightSurface} instead.`) end
|
|
2687
|
+
if Element_1.RightSurface > 10 then error(`Expected "Element_1.RightSurface" to be smaller than 10, got {Element_1.RightSurface} instead.`) end
|
|
2688
|
+
end
|
|
2689
|
+
local OFFSET_19 = Read(1)
|
|
2690
|
+
if buffer.readu8(RecieveBuffer, OFFSET_19) == 1 then
|
|
2691
|
+
-- Read BLOCK: 1 bytes
|
|
2692
|
+
local BLOCK_START = Read(1)
|
|
2693
|
+
Element_1.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2694
|
+
if Element_1.FrontSurface < 0 then error(`Expected "Element_1.FrontSurface" to be larger than 0, got {Element_1.FrontSurface} instead.`) end
|
|
2695
|
+
if Element_1.FrontSurface > 10 then error(`Expected "Element_1.FrontSurface" to be smaller than 10, got {Element_1.FrontSurface} instead.`) end
|
|
2696
|
+
end
|
|
2697
|
+
local OFFSET_20 = Read(1)
|
|
2698
|
+
if buffer.readu8(RecieveBuffer, OFFSET_20) == 1 then
|
|
2699
|
+
-- Read BLOCK: 1 bytes
|
|
2700
|
+
local BLOCK_START = Read(1)
|
|
2701
|
+
Element_1.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2702
|
+
if Element_1.BackSurface < 0 then error(`Expected "Element_1.BackSurface" to be larger than 0, got {Element_1.BackSurface} instead.`) end
|
|
2703
|
+
if Element_1.BackSurface > 10 then error(`Expected "Element_1.BackSurface" to be smaller than 10, got {Element_1.BackSurface} instead.`) end
|
|
2704
|
+
end
|
|
2705
|
+
local OFFSET_21 = Read(1)
|
|
2706
|
+
if buffer.readu8(RecieveBuffer, OFFSET_21) == 1 then
|
|
2707
|
+
-- Read BLOCK: 1 bytes
|
|
2708
|
+
local BLOCK_START = Read(1)
|
|
2709
|
+
Element_1.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2710
|
+
if Element_1.TopSurface < 0 then error(`Expected "Element_1.TopSurface" to be larger than 0, got {Element_1.TopSurface} instead.`) end
|
|
2711
|
+
if Element_1.TopSurface > 10 then error(`Expected "Element_1.TopSurface" to be smaller than 10, got {Element_1.TopSurface} instead.`) end
|
|
2712
|
+
end
|
|
2713
|
+
local OFFSET_22 = Read(1)
|
|
2714
|
+
if buffer.readu8(RecieveBuffer, OFFSET_22) == 1 then
|
|
2715
|
+
-- Read BLOCK: 1 bytes
|
|
2716
|
+
local BLOCK_START = Read(1)
|
|
2717
|
+
Element_1.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2718
|
+
if Element_1.BottomSurface < 0 then error(`Expected "Element_1.BottomSurface" to be larger than 0, got {Element_1.BottomSurface} instead.`) end
|
|
2719
|
+
if Element_1.BottomSurface > 10 then error(`Expected "Element_1.BottomSurface" to be smaller than 10, got {Element_1.BottomSurface} instead.`) end
|
|
2720
|
+
end
|
|
2721
|
+
local OFFSET_23 = Read(1)
|
|
2722
|
+
if buffer.readu8(RecieveBuffer, OFFSET_23) == 1 then
|
|
2723
|
+
-- Read BLOCK: 2 bytes
|
|
2724
|
+
local BLOCK_START = Read(2)
|
|
2725
|
+
-- START ARRAY
|
|
2726
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2727
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2728
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2729
|
+
Element_1.Textures = table.create(Length)
|
|
2730
|
+
-- Read BLOCK: 11 bytes
|
|
2731
|
+
local ARRAY_START_3 = Read(11 * Length)
|
|
2732
|
+
for Index = 1, Length do
|
|
2733
|
+
local Item_3 = {} :: any
|
|
2734
|
+
-- Read 1
|
|
2735
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
2736
|
+
ARRAY_START_3 += 1
|
|
2737
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
2738
|
+
-- Read BLOCK: 3 bytes
|
|
2739
|
+
local BLOCK_START = Read(3)
|
|
2740
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2741
|
+
end
|
|
2742
|
+
-- Read 1
|
|
2743
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
2744
|
+
ARRAY_START_3 += 1
|
|
2745
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2746
|
+
-- Read BLOCK: 2 bytes
|
|
2747
|
+
local BLOCK_START = Read(2)
|
|
2748
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2749
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2750
|
+
end
|
|
2751
|
+
-- Read 1
|
|
2752
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
2753
|
+
ARRAY_START_3 += 1
|
|
2754
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2755
|
+
-- Read BLOCK: 4 bytes
|
|
2756
|
+
local BLOCK_START = Read(4)
|
|
2757
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2758
|
+
end
|
|
2759
|
+
-- Read 1
|
|
2760
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
2761
|
+
ARRAY_START_3 += 1
|
|
2762
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2763
|
+
-- START ARRAY
|
|
2764
|
+
local Length = 2
|
|
2765
|
+
Item_3.UVOffset = table.create(Length)
|
|
2766
|
+
-- Read BLOCK: 4 bytes
|
|
2767
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
2768
|
+
for Index = 1, Length do
|
|
2769
|
+
-- Read 4
|
|
2770
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
2771
|
+
ARRAY_START_5 += 4
|
|
2772
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2773
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
2774
|
+
end
|
|
2775
|
+
-- END ARRAY
|
|
2776
|
+
end
|
|
2777
|
+
-- Read 1
|
|
2778
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
2779
|
+
ARRAY_START_3 += 1
|
|
2780
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2781
|
+
-- START ARRAY
|
|
2782
|
+
local Length = 2
|
|
2783
|
+
Item_3.UVScale = table.create(Length)
|
|
2784
|
+
-- Read BLOCK: 4 bytes
|
|
2785
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
2786
|
+
for Index = 1, Length do
|
|
2787
|
+
-- Read 4
|
|
2788
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
2789
|
+
ARRAY_START_5 += 4
|
|
2790
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2791
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
2792
|
+
end
|
|
2793
|
+
-- END ARRAY
|
|
2794
|
+
end
|
|
2795
|
+
-- Read 1
|
|
2796
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
2797
|
+
ARRAY_START_3 += 1
|
|
2798
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2799
|
+
-- Read BLOCK: 4 bytes
|
|
2800
|
+
local BLOCK_START = Read(4)
|
|
2801
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
2802
|
+
end
|
|
2803
|
+
-- Read 1
|
|
2804
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
2805
|
+
ARRAY_START_3 += 1
|
|
2806
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
2807
|
+
-- Read BLOCK: 1 bytes
|
|
2808
|
+
local BLOCK_START = Read(1)
|
|
2809
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2810
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
2811
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
2812
|
+
end
|
|
2813
|
+
-- Read 1
|
|
2814
|
+
local OPERATION_OFFSET_7 = ARRAY_START_3
|
|
2815
|
+
ARRAY_START_3 += 1
|
|
2816
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
2817
|
+
-- Read BLOCK: 4 bytes
|
|
2818
|
+
local BLOCK_START = Read(4)
|
|
2819
|
+
Item_3.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2820
|
+
end
|
|
2821
|
+
-- Read 1
|
|
2822
|
+
local OPERATION_OFFSET_8 = ARRAY_START_3
|
|
2823
|
+
ARRAY_START_3 += 1
|
|
2824
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
2825
|
+
-- Read BLOCK: 4 bytes
|
|
2826
|
+
local BLOCK_START = Read(4)
|
|
2827
|
+
Item_3.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2828
|
+
end
|
|
2829
|
+
-- Read 1
|
|
2830
|
+
local OPERATION_OFFSET_9 = ARRAY_START_3
|
|
2831
|
+
ARRAY_START_3 += 1
|
|
2832
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
2833
|
+
-- Read BLOCK: 4 bytes
|
|
2834
|
+
local BLOCK_START = Read(4)
|
|
2835
|
+
Item_3.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2836
|
+
end
|
|
2837
|
+
-- Read 1
|
|
2838
|
+
local OPERATION_OFFSET_10 = ARRAY_START_3
|
|
2839
|
+
ARRAY_START_3 += 1
|
|
2840
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
2841
|
+
-- Read BLOCK: 4 bytes
|
|
2842
|
+
local BLOCK_START = Read(4)
|
|
2843
|
+
Item_3.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2844
|
+
end
|
|
2845
|
+
table.insert(Element_1.Textures, Item_3)
|
|
2846
|
+
end
|
|
2847
|
+
-- END ARRAY
|
|
2848
|
+
end
|
|
2849
|
+
local OFFSET_24 = Read(1)
|
|
2850
|
+
if buffer.readu8(RecieveBuffer, OFFSET_24) == 1 then
|
|
2851
|
+
-- Read BLOCK: 2 bytes
|
|
2852
|
+
local BLOCK_START = Read(2)
|
|
2853
|
+
-- START ARRAY
|
|
2854
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2855
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2856
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2857
|
+
Element_1.Lights = table.create(Length)
|
|
2858
|
+
-- Read BLOCK: 8 bytes
|
|
2859
|
+
local ARRAY_START_3 = Read(8 * Length)
|
|
2860
|
+
for Index = 1, Length do
|
|
2861
|
+
local Item_3 = {} :: any
|
|
2862
|
+
-- Read 2
|
|
2863
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
2864
|
+
ARRAY_START_3 += 2
|
|
2865
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2866
|
+
Item_3.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2867
|
+
-- Read 1
|
|
2868
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
2869
|
+
ARRAY_START_3 += 1
|
|
2870
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2871
|
+
-- Read BLOCK: 4 bytes
|
|
2872
|
+
local BLOCK_START = Read(4)
|
|
2873
|
+
Item_3.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2874
|
+
end
|
|
2875
|
+
-- Read 1
|
|
2876
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
2877
|
+
ARRAY_START_3 += 1
|
|
2878
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2879
|
+
-- Read BLOCK: 3 bytes
|
|
2880
|
+
local BLOCK_START = Read(3)
|
|
2881
|
+
Item_3.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2882
|
+
end
|
|
2883
|
+
-- Read 1
|
|
2884
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
2885
|
+
ARRAY_START_3 += 1
|
|
2886
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2887
|
+
-- Read BLOCK: 1 bytes
|
|
2888
|
+
local BLOCK_START = Read(1)
|
|
2889
|
+
Item_3.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
2890
|
+
end
|
|
2891
|
+
-- Read 1
|
|
2892
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
2893
|
+
ARRAY_START_3 += 1
|
|
2894
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2895
|
+
-- Read BLOCK: 4 bytes
|
|
2896
|
+
local BLOCK_START = Read(4)
|
|
2897
|
+
Item_3.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2898
|
+
end
|
|
2899
|
+
-- Read 1
|
|
2900
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
2901
|
+
ARRAY_START_3 += 1
|
|
2902
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2903
|
+
-- Read BLOCK: 4 bytes
|
|
2904
|
+
local BLOCK_START = Read(4)
|
|
2905
|
+
Item_3.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2906
|
+
end
|
|
2907
|
+
-- Read 1
|
|
2908
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
2909
|
+
ARRAY_START_3 += 1
|
|
2910
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
2911
|
+
-- Read BLOCK: 1 bytes
|
|
2912
|
+
local BLOCK_START = Read(1)
|
|
2913
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
2914
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
2915
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
2916
|
+
end
|
|
2917
|
+
table.insert(Element_1.Lights, Item_3)
|
|
2918
|
+
end
|
|
2919
|
+
-- END ARRAY
|
|
2920
|
+
end
|
|
2921
|
+
local OFFSET_25 = Read(1)
|
|
2922
|
+
if buffer.readu8(RecieveBuffer, OFFSET_25) == 1 then
|
|
2923
|
+
-- Read BLOCK: 2 bytes
|
|
2924
|
+
local BLOCK_START = Read(2)
|
|
2925
|
+
-- START ARRAY
|
|
2926
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2927
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
2928
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
2929
|
+
Element_1.Decals = table.create(Length)
|
|
2930
|
+
-- Read BLOCK: 7 bytes
|
|
2931
|
+
local ARRAY_START_3 = Read(7 * Length)
|
|
2932
|
+
for Index = 1, Length do
|
|
2933
|
+
local Item_3 = {} :: any
|
|
2934
|
+
-- Read 1
|
|
2935
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
2936
|
+
ARRAY_START_3 += 1
|
|
2937
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
2938
|
+
-- Read BLOCK: 3 bytes
|
|
2939
|
+
local BLOCK_START = Read(3)
|
|
2940
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
2941
|
+
end
|
|
2942
|
+
-- Read 1
|
|
2943
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
2944
|
+
ARRAY_START_3 += 1
|
|
2945
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
2946
|
+
-- Read BLOCK: 2 bytes
|
|
2947
|
+
local BLOCK_START = Read(2)
|
|
2948
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
2949
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
2950
|
+
end
|
|
2951
|
+
-- Read 1
|
|
2952
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
2953
|
+
ARRAY_START_3 += 1
|
|
2954
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
2955
|
+
-- Read BLOCK: 4 bytes
|
|
2956
|
+
local BLOCK_START = Read(4)
|
|
2957
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
2958
|
+
end
|
|
2959
|
+
-- Read 1
|
|
2960
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
2961
|
+
ARRAY_START_3 += 1
|
|
2962
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
2963
|
+
-- START ARRAY
|
|
2964
|
+
local Length = 2
|
|
2965
|
+
Item_3.UVOffset = table.create(Length)
|
|
2966
|
+
-- Read BLOCK: 4 bytes
|
|
2967
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
2968
|
+
for Index = 1, Length do
|
|
2969
|
+
-- Read 4
|
|
2970
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
2971
|
+
ARRAY_START_5 += 4
|
|
2972
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2973
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
2974
|
+
end
|
|
2975
|
+
-- END ARRAY
|
|
2976
|
+
end
|
|
2977
|
+
-- Read 1
|
|
2978
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
2979
|
+
ARRAY_START_3 += 1
|
|
2980
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
2981
|
+
-- START ARRAY
|
|
2982
|
+
local Length = 2
|
|
2983
|
+
Item_3.UVScale = table.create(Length)
|
|
2984
|
+
-- Read BLOCK: 4 bytes
|
|
2985
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
2986
|
+
for Index = 1, Length do
|
|
2987
|
+
-- Read 4
|
|
2988
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
2989
|
+
ARRAY_START_5 += 4
|
|
2990
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
2991
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
2992
|
+
end
|
|
2993
|
+
-- END ARRAY
|
|
2994
|
+
end
|
|
2995
|
+
-- Read 1
|
|
2996
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
2997
|
+
ARRAY_START_3 += 1
|
|
2998
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
2999
|
+
-- Read BLOCK: 4 bytes
|
|
3000
|
+
local BLOCK_START = Read(4)
|
|
3001
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
3002
|
+
end
|
|
3003
|
+
-- Read 1
|
|
3004
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
3005
|
+
ARRAY_START_3 += 1
|
|
3006
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
3007
|
+
-- Read BLOCK: 1 bytes
|
|
3008
|
+
local BLOCK_START = Read(1)
|
|
3009
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3010
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
3011
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
3012
|
+
end
|
|
3013
|
+
table.insert(Element_1.Decals, Item_3)
|
|
3014
|
+
end
|
|
3015
|
+
-- END ARRAY
|
|
3016
|
+
end
|
|
3017
|
+
Element_1.Attributes = {}
|
|
3018
|
+
local OFFSET_26 = Read(2)
|
|
3019
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OFFSET_26)
|
|
3020
|
+
for _ = 1, Elements_2 do
|
|
3021
|
+
local OFFSET_0 = Read(2)
|
|
3022
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
3023
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3024
|
+
RecieveInstanceCursor += 1
|
|
3025
|
+
local Element_2 = RecieveInstances[RecieveInstanceCursor]
|
|
3026
|
+
Element_1.Attributes[Key_2] = Element_2
|
|
3027
|
+
end
|
|
3028
|
+
-- START ARRAY
|
|
3029
|
+
local OFFSET_27 = Read(2)
|
|
3030
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_27)
|
|
3031
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3032
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3033
|
+
Element_1.Tags = table.create(Length)
|
|
3034
|
+
-- Read BLOCK: 2 bytes
|
|
3035
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
3036
|
+
for Index = 1, Length do
|
|
3037
|
+
-- Read 2
|
|
3038
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
3039
|
+
ARRAY_START_2 += 2
|
|
3040
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3041
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3042
|
+
table.insert(Element_1.Tags, Item_2)
|
|
3043
|
+
end
|
|
3044
|
+
-- END ARRAY
|
|
3045
|
+
Value10[Key_1] = Element_1
|
|
3046
|
+
end
|
|
3047
|
+
local Value11 = buffer.readu16(RecieveBuffer, BLOCK_START + 20)
|
|
3048
|
+
return Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Value11
|
|
3049
|
+
end
|
|
3050
|
+
|
|
3051
|
+
local function Shatterbox_ReadEVENT_ReplicateDestruction(): (string, { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? }, {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, {[string]: boolean}?)
|
|
3052
|
+
-- Read BLOCK: 52 bytes
|
|
3053
|
+
local BLOCK_START = Read(52)
|
|
3054
|
+
local Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3055
|
+
local Value1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3056
|
+
local Value2 = {} :: any
|
|
3057
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 2)
|
|
3058
|
+
Value2.ID = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3059
|
+
Value2.CuttingPart = {} :: any
|
|
3060
|
+
local X = buffer.readf32(RecieveBuffer, BLOCK_START + 4)
|
|
3061
|
+
local Y = buffer.readf32(RecieveBuffer, BLOCK_START + 8)
|
|
3062
|
+
local Z = buffer.readf32(RecieveBuffer, BLOCK_START + 12)
|
|
3063
|
+
local Position = Vector3.new(X, Y, Z)
|
|
3064
|
+
local rX = buffer.readf32(RecieveBuffer, BLOCK_START + 16)
|
|
3065
|
+
local rY = buffer.readf32(RecieveBuffer, BLOCK_START + 20)
|
|
3066
|
+
local rZ = buffer.readf32(RecieveBuffer, BLOCK_START + 24)
|
|
3067
|
+
Value2.CuttingPart.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
3068
|
+
X = buffer.readf32(RecieveBuffer, BLOCK_START + 28)
|
|
3069
|
+
Y = buffer.readf32(RecieveBuffer, BLOCK_START + 32)
|
|
3070
|
+
Z = buffer.readf32(RecieveBuffer, BLOCK_START + 36)
|
|
3071
|
+
Value2.CuttingPart.Size = Vector3.new(X, Y, Z)
|
|
3072
|
+
Value2.CuttingPart.Shape = buffer.readu8(RecieveBuffer, BLOCK_START + 40)
|
|
3073
|
+
if Value2.CuttingPart.Shape < 0 then error(`Expected "Value2.CuttingPart.Shape" to be larger than 0, got {Value2.CuttingPart.Shape} instead.`) end
|
|
3074
|
+
if Value2.CuttingPart.Shape > 4 then error(`Expected "Value2.CuttingPart.Shape" to be smaller than 4, got {Value2.CuttingPart.Shape} instead.`) end
|
|
3075
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 41) == 1 then
|
|
3076
|
+
-- Read BLOCK: 2 bytes
|
|
3077
|
+
local BLOCK_START = Read(2)
|
|
3078
|
+
-- START ARRAY
|
|
3079
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3080
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3081
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3082
|
+
Value2.FilterTagged = table.create(Length)
|
|
3083
|
+
-- Read BLOCK: 2 bytes
|
|
3084
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
3085
|
+
for Index = 1, Length do
|
|
3086
|
+
-- Read 2
|
|
3087
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
3088
|
+
ARRAY_START_2 += 2
|
|
3089
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3090
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3091
|
+
table.insert(Value2.FilterTagged, Item_2)
|
|
3092
|
+
end
|
|
3093
|
+
-- END ARRAY
|
|
3094
|
+
end
|
|
3095
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 42) == 1 then
|
|
3096
|
+
-- Read BLOCK: 4 bytes
|
|
3097
|
+
local BLOCK_START = Read(4)
|
|
3098
|
+
Value2.GridSize = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3099
|
+
end
|
|
3100
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 43) == 1 then
|
|
3101
|
+
-- Read BLOCK: 4 bytes
|
|
3102
|
+
local BLOCK_START = Read(4)
|
|
3103
|
+
Value2.CleanupDelay = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3104
|
+
end
|
|
3105
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 44) == 1 then
|
|
3106
|
+
-- Read BLOCK: 1 bytes
|
|
3107
|
+
local BLOCK_START = Read(1)
|
|
3108
|
+
Value2.SkipWalls = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
3109
|
+
end
|
|
3110
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 45) == 1 then
|
|
3111
|
+
-- Read BLOCK: 1 bytes
|
|
3112
|
+
local BLOCK_START = Read(1)
|
|
3113
|
+
Value2.SkipFloors = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
3114
|
+
end
|
|
3115
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 46) == 1 then
|
|
3116
|
+
-- Read BLOCK: 1 bytes
|
|
3117
|
+
local BLOCK_START = Read(1)
|
|
3118
|
+
Value2.SkipEncapsulatedVoxels = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
3119
|
+
end
|
|
3120
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 47) == 1 then
|
|
3121
|
+
-- Read BLOCK: 2 bytes
|
|
3122
|
+
local BLOCK_START = Read(2)
|
|
3123
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3124
|
+
Value2.OnVoxelDestruct = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3125
|
+
end
|
|
3126
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 48) == 1 then
|
|
3127
|
+
RecieveInstanceCursor += 1
|
|
3128
|
+
Value2.UserData = RecieveInstances[RecieveInstanceCursor]
|
|
3129
|
+
end
|
|
3130
|
+
local Value3 = {}
|
|
3131
|
+
local Elements_1 = buffer.readu16(RecieveBuffer, BLOCK_START + 49)
|
|
3132
|
+
for _ = 1, Elements_1 do
|
|
3133
|
+
local OFFSET_0 = Read(2)
|
|
3134
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
3135
|
+
local Key_1 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3136
|
+
local Element_1 = {} :: any
|
|
3137
|
+
local OFFSET_1 = Read(4)
|
|
3138
|
+
X = buffer.readf32(RecieveBuffer, OFFSET_1)
|
|
3139
|
+
local OFFSET_2 = Read(4)
|
|
3140
|
+
Y = buffer.readf32(RecieveBuffer, OFFSET_2)
|
|
3141
|
+
local OFFSET_3 = Read(4)
|
|
3142
|
+
Z = buffer.readf32(RecieveBuffer, OFFSET_3)
|
|
3143
|
+
Position = Vector3.new(X, Y, Z)
|
|
3144
|
+
local OFFSET_4 = Read(4)
|
|
3145
|
+
rX = buffer.readf32(RecieveBuffer, OFFSET_4)
|
|
3146
|
+
local OFFSET_5 = Read(4)
|
|
3147
|
+
rY = buffer.readf32(RecieveBuffer, OFFSET_5)
|
|
3148
|
+
local OFFSET_6 = Read(4)
|
|
3149
|
+
rZ = buffer.readf32(RecieveBuffer, OFFSET_6)
|
|
3150
|
+
Element_1.CFrame = CFrame.new(Position) * CFrame.fromOrientation(rX, rY, rZ)
|
|
3151
|
+
local OFFSET_7 = Read(4)
|
|
3152
|
+
X = buffer.readf32(RecieveBuffer, OFFSET_7)
|
|
3153
|
+
local OFFSET_8 = Read(4)
|
|
3154
|
+
Y = buffer.readf32(RecieveBuffer, OFFSET_8)
|
|
3155
|
+
local OFFSET_9 = Read(4)
|
|
3156
|
+
Z = buffer.readf32(RecieveBuffer, OFFSET_9)
|
|
3157
|
+
Element_1.Size = Vector3.new(X, Y, Z)
|
|
3158
|
+
local OFFSET_10 = Read(1)
|
|
3159
|
+
Element_1.Anchored = (buffer.readu8(RecieveBuffer, OFFSET_10) == 1)
|
|
3160
|
+
local OFFSET_11 = Read(1)
|
|
3161
|
+
if buffer.readu8(RecieveBuffer, OFFSET_11) == 1 then
|
|
3162
|
+
-- Read BLOCK: 3 bytes
|
|
3163
|
+
local BLOCK_START = Read(3)
|
|
3164
|
+
Element_1.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
3165
|
+
end
|
|
3166
|
+
local OFFSET_12 = Read(1)
|
|
3167
|
+
if buffer.readu8(RecieveBuffer, OFFSET_12) == 1 then
|
|
3168
|
+
-- Read BLOCK: 2 bytes
|
|
3169
|
+
local BLOCK_START = Read(2)
|
|
3170
|
+
Element_1.Material = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3171
|
+
if Element_1.Material < 256 then error(`Expected "Element_1.Material" to be larger than 256, got {Element_1.Material} instead.`) end
|
|
3172
|
+
if Element_1.Material > 2311 then error(`Expected "Element_1.Material" to be smaller than 2311, got {Element_1.Material} instead.`) end
|
|
3173
|
+
end
|
|
3174
|
+
local OFFSET_13 = Read(1)
|
|
3175
|
+
if buffer.readu8(RecieveBuffer, OFFSET_13) == 1 then
|
|
3176
|
+
-- Read BLOCK: 2 bytes
|
|
3177
|
+
local BLOCK_START = Read(2)
|
|
3178
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3179
|
+
local MantissaExponent = Encoded % 0x8000
|
|
3180
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
3181
|
+
if Encoded // 0x8000 == 1 then
|
|
3182
|
+
Element_1.Transparency = -math.huge
|
|
3183
|
+
else
|
|
3184
|
+
Element_1.Transparency = math.huge
|
|
3185
|
+
end
|
|
3186
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
3187
|
+
Element_1.Transparency = 0 / 0
|
|
3188
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
3189
|
+
Element_1.Transparency = 0
|
|
3190
|
+
else
|
|
3191
|
+
local Mantissa = MantissaExponent % 0x400
|
|
3192
|
+
local Exponent = MantissaExponent // 0x400
|
|
3193
|
+
local Fraction;
|
|
3194
|
+
if Exponent == 0 then
|
|
3195
|
+
Fraction = Mantissa / 0x400
|
|
3196
|
+
else
|
|
3197
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
3198
|
+
end
|
|
3199
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
3200
|
+
Element_1.Transparency = if Encoded // 0x8000 == 1 then -Result else Result
|
|
3201
|
+
end
|
|
3202
|
+
end
|
|
3203
|
+
local OFFSET_14 = Read(1)
|
|
3204
|
+
if buffer.readu8(RecieveBuffer, OFFSET_14) == 1 then
|
|
3205
|
+
-- Read BLOCK: 2 bytes
|
|
3206
|
+
local BLOCK_START = Read(2)
|
|
3207
|
+
local Encoded = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3208
|
+
local MantissaExponent = Encoded % 0x8000
|
|
3209
|
+
if MantissaExponent == 0b0_11111_0000000000 then
|
|
3210
|
+
if Encoded // 0x8000 == 1 then
|
|
3211
|
+
Element_1.Reflectance = -math.huge
|
|
3212
|
+
else
|
|
3213
|
+
Element_1.Reflectance = math.huge
|
|
3214
|
+
end
|
|
3215
|
+
elseif MantissaExponent == 0b1_11111_0000000000 then
|
|
3216
|
+
Element_1.Reflectance = 0 / 0
|
|
3217
|
+
elseif MantissaExponent == 0b0_00000_0000000000 then
|
|
3218
|
+
Element_1.Reflectance = 0
|
|
3219
|
+
else
|
|
3220
|
+
local Mantissa = MantissaExponent % 0x400
|
|
3221
|
+
local Exponent = MantissaExponent // 0x400
|
|
3222
|
+
local Fraction;
|
|
3223
|
+
if Exponent == 0 then
|
|
3224
|
+
Fraction = Mantissa / 0x400
|
|
3225
|
+
else
|
|
3226
|
+
Fraction = Mantissa / 0x800 + 0.5
|
|
3227
|
+
end
|
|
3228
|
+
local Result = math.ldexp(Fraction, Exponent - 14)
|
|
3229
|
+
Element_1.Reflectance = if Encoded // 0x8000 == 1 then -Result else Result
|
|
3230
|
+
end
|
|
3231
|
+
end
|
|
3232
|
+
local OFFSET_15 = Read(1)
|
|
3233
|
+
if buffer.readu8(RecieveBuffer, OFFSET_15) == 1 then
|
|
3234
|
+
-- Read BLOCK: 2 bytes
|
|
3235
|
+
local BLOCK_START = Read(2)
|
|
3236
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3237
|
+
Element_1.MaterialVariant = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3238
|
+
end
|
|
3239
|
+
local OFFSET_16 = Read(1)
|
|
3240
|
+
if buffer.readu8(RecieveBuffer, OFFSET_16) == 1 then
|
|
3241
|
+
-- Read BLOCK: 2 bytes
|
|
3242
|
+
local BLOCK_START = Read(2)
|
|
3243
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3244
|
+
Element_1.CollisionGroup = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3245
|
+
end
|
|
3246
|
+
local OFFSET_17 = Read(1)
|
|
3247
|
+
if buffer.readu8(RecieveBuffer, OFFSET_17) == 1 then
|
|
3248
|
+
-- Read BLOCK: 1 bytes
|
|
3249
|
+
local BLOCK_START = Read(1)
|
|
3250
|
+
Element_1.LeftSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3251
|
+
if Element_1.LeftSurface < 0 then error(`Expected "Element_1.LeftSurface" to be larger than 0, got {Element_1.LeftSurface} instead.`) end
|
|
3252
|
+
if Element_1.LeftSurface > 10 then error(`Expected "Element_1.LeftSurface" to be smaller than 10, got {Element_1.LeftSurface} instead.`) end
|
|
3253
|
+
end
|
|
3254
|
+
local OFFSET_18 = Read(1)
|
|
3255
|
+
if buffer.readu8(RecieveBuffer, OFFSET_18) == 1 then
|
|
3256
|
+
-- Read BLOCK: 1 bytes
|
|
3257
|
+
local BLOCK_START = Read(1)
|
|
3258
|
+
Element_1.RightSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3259
|
+
if Element_1.RightSurface < 0 then error(`Expected "Element_1.RightSurface" to be larger than 0, got {Element_1.RightSurface} instead.`) end
|
|
3260
|
+
if Element_1.RightSurface > 10 then error(`Expected "Element_1.RightSurface" to be smaller than 10, got {Element_1.RightSurface} instead.`) end
|
|
3261
|
+
end
|
|
3262
|
+
local OFFSET_19 = Read(1)
|
|
3263
|
+
if buffer.readu8(RecieveBuffer, OFFSET_19) == 1 then
|
|
3264
|
+
-- Read BLOCK: 1 bytes
|
|
3265
|
+
local BLOCK_START = Read(1)
|
|
3266
|
+
Element_1.FrontSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3267
|
+
if Element_1.FrontSurface < 0 then error(`Expected "Element_1.FrontSurface" to be larger than 0, got {Element_1.FrontSurface} instead.`) end
|
|
3268
|
+
if Element_1.FrontSurface > 10 then error(`Expected "Element_1.FrontSurface" to be smaller than 10, got {Element_1.FrontSurface} instead.`) end
|
|
3269
|
+
end
|
|
3270
|
+
local OFFSET_20 = Read(1)
|
|
3271
|
+
if buffer.readu8(RecieveBuffer, OFFSET_20) == 1 then
|
|
3272
|
+
-- Read BLOCK: 1 bytes
|
|
3273
|
+
local BLOCK_START = Read(1)
|
|
3274
|
+
Element_1.BackSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3275
|
+
if Element_1.BackSurface < 0 then error(`Expected "Element_1.BackSurface" to be larger than 0, got {Element_1.BackSurface} instead.`) end
|
|
3276
|
+
if Element_1.BackSurface > 10 then error(`Expected "Element_1.BackSurface" to be smaller than 10, got {Element_1.BackSurface} instead.`) end
|
|
3277
|
+
end
|
|
3278
|
+
local OFFSET_21 = Read(1)
|
|
3279
|
+
if buffer.readu8(RecieveBuffer, OFFSET_21) == 1 then
|
|
3280
|
+
-- Read BLOCK: 1 bytes
|
|
3281
|
+
local BLOCK_START = Read(1)
|
|
3282
|
+
Element_1.TopSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3283
|
+
if Element_1.TopSurface < 0 then error(`Expected "Element_1.TopSurface" to be larger than 0, got {Element_1.TopSurface} instead.`) end
|
|
3284
|
+
if Element_1.TopSurface > 10 then error(`Expected "Element_1.TopSurface" to be smaller than 10, got {Element_1.TopSurface} instead.`) end
|
|
3285
|
+
end
|
|
3286
|
+
local OFFSET_22 = Read(1)
|
|
3287
|
+
if buffer.readu8(RecieveBuffer, OFFSET_22) == 1 then
|
|
3288
|
+
-- Read BLOCK: 1 bytes
|
|
3289
|
+
local BLOCK_START = Read(1)
|
|
3290
|
+
Element_1.BottomSurface = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3291
|
+
if Element_1.BottomSurface < 0 then error(`Expected "Element_1.BottomSurface" to be larger than 0, got {Element_1.BottomSurface} instead.`) end
|
|
3292
|
+
if Element_1.BottomSurface > 10 then error(`Expected "Element_1.BottomSurface" to be smaller than 10, got {Element_1.BottomSurface} instead.`) end
|
|
3293
|
+
end
|
|
3294
|
+
local OFFSET_23 = Read(1)
|
|
3295
|
+
if buffer.readu8(RecieveBuffer, OFFSET_23) == 1 then
|
|
3296
|
+
-- Read BLOCK: 2 bytes
|
|
3297
|
+
local BLOCK_START = Read(2)
|
|
3298
|
+
-- START ARRAY
|
|
3299
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3300
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3301
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3302
|
+
Element_1.Textures = table.create(Length)
|
|
3303
|
+
-- Read BLOCK: 11 bytes
|
|
3304
|
+
local ARRAY_START_3 = Read(11 * Length)
|
|
3305
|
+
for Index = 1, Length do
|
|
3306
|
+
local Item_3 = {} :: any
|
|
3307
|
+
-- Read 1
|
|
3308
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
3309
|
+
ARRAY_START_3 += 1
|
|
3310
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
3311
|
+
-- Read BLOCK: 3 bytes
|
|
3312
|
+
local BLOCK_START = Read(3)
|
|
3313
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
3314
|
+
end
|
|
3315
|
+
-- Read 1
|
|
3316
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
3317
|
+
ARRAY_START_3 += 1
|
|
3318
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
3319
|
+
-- Read BLOCK: 2 bytes
|
|
3320
|
+
local BLOCK_START = Read(2)
|
|
3321
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3322
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3323
|
+
end
|
|
3324
|
+
-- Read 1
|
|
3325
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
3326
|
+
ARRAY_START_3 += 1
|
|
3327
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
3328
|
+
-- Read BLOCK: 4 bytes
|
|
3329
|
+
local BLOCK_START = Read(4)
|
|
3330
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3331
|
+
end
|
|
3332
|
+
-- Read 1
|
|
3333
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
3334
|
+
ARRAY_START_3 += 1
|
|
3335
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
3336
|
+
-- START ARRAY
|
|
3337
|
+
local Length = 2
|
|
3338
|
+
Item_3.UVOffset = table.create(Length)
|
|
3339
|
+
-- Read BLOCK: 4 bytes
|
|
3340
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
3341
|
+
for Index = 1, Length do
|
|
3342
|
+
-- Read 4
|
|
3343
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
3344
|
+
ARRAY_START_5 += 4
|
|
3345
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3346
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
3347
|
+
end
|
|
3348
|
+
-- END ARRAY
|
|
3349
|
+
end
|
|
3350
|
+
-- Read 1
|
|
3351
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
3352
|
+
ARRAY_START_3 += 1
|
|
3353
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
3354
|
+
-- START ARRAY
|
|
3355
|
+
local Length = 2
|
|
3356
|
+
Item_3.UVScale = table.create(Length)
|
|
3357
|
+
-- Read BLOCK: 4 bytes
|
|
3358
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
3359
|
+
for Index = 1, Length do
|
|
3360
|
+
-- Read 4
|
|
3361
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
3362
|
+
ARRAY_START_5 += 4
|
|
3363
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3364
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
3365
|
+
end
|
|
3366
|
+
-- END ARRAY
|
|
3367
|
+
end
|
|
3368
|
+
-- Read 1
|
|
3369
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
3370
|
+
ARRAY_START_3 += 1
|
|
3371
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
3372
|
+
-- Read BLOCK: 4 bytes
|
|
3373
|
+
local BLOCK_START = Read(4)
|
|
3374
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
3375
|
+
end
|
|
3376
|
+
-- Read 1
|
|
3377
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
3378
|
+
ARRAY_START_3 += 1
|
|
3379
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
3380
|
+
-- Read BLOCK: 1 bytes
|
|
3381
|
+
local BLOCK_START = Read(1)
|
|
3382
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3383
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
3384
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
3385
|
+
end
|
|
3386
|
+
-- Read 1
|
|
3387
|
+
local OPERATION_OFFSET_7 = ARRAY_START_3
|
|
3388
|
+
ARRAY_START_3 += 1
|
|
3389
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_7) == 1 then
|
|
3390
|
+
-- Read BLOCK: 4 bytes
|
|
3391
|
+
local BLOCK_START = Read(4)
|
|
3392
|
+
Item_3.OffsetStudsU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3393
|
+
end
|
|
3394
|
+
-- Read 1
|
|
3395
|
+
local OPERATION_OFFSET_8 = ARRAY_START_3
|
|
3396
|
+
ARRAY_START_3 += 1
|
|
3397
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_8) == 1 then
|
|
3398
|
+
-- Read BLOCK: 4 bytes
|
|
3399
|
+
local BLOCK_START = Read(4)
|
|
3400
|
+
Item_3.OffsetStudsV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3401
|
+
end
|
|
3402
|
+
-- Read 1
|
|
3403
|
+
local OPERATION_OFFSET_9 = ARRAY_START_3
|
|
3404
|
+
ARRAY_START_3 += 1
|
|
3405
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_9) == 1 then
|
|
3406
|
+
-- Read BLOCK: 4 bytes
|
|
3407
|
+
local BLOCK_START = Read(4)
|
|
3408
|
+
Item_3.StudsPerTileU = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3409
|
+
end
|
|
3410
|
+
-- Read 1
|
|
3411
|
+
local OPERATION_OFFSET_10 = ARRAY_START_3
|
|
3412
|
+
ARRAY_START_3 += 1
|
|
3413
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_10) == 1 then
|
|
3414
|
+
-- Read BLOCK: 4 bytes
|
|
3415
|
+
local BLOCK_START = Read(4)
|
|
3416
|
+
Item_3.StudsPerTileV = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3417
|
+
end
|
|
3418
|
+
table.insert(Element_1.Textures, Item_3)
|
|
3419
|
+
end
|
|
3420
|
+
-- END ARRAY
|
|
3421
|
+
end
|
|
3422
|
+
local OFFSET_24 = Read(1)
|
|
3423
|
+
if buffer.readu8(RecieveBuffer, OFFSET_24) == 1 then
|
|
3424
|
+
-- Read BLOCK: 2 bytes
|
|
3425
|
+
local BLOCK_START = Read(2)
|
|
3426
|
+
-- START ARRAY
|
|
3427
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3428
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3429
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3430
|
+
Element_1.Lights = table.create(Length)
|
|
3431
|
+
-- Read BLOCK: 8 bytes
|
|
3432
|
+
local ARRAY_START_3 = Read(8 * Length)
|
|
3433
|
+
for Index = 1, Length do
|
|
3434
|
+
local Item_3 = {} :: any
|
|
3435
|
+
-- Read 2
|
|
3436
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
3437
|
+
ARRAY_START_3 += 2
|
|
3438
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3439
|
+
Item_3.ClassName = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3440
|
+
-- Read 1
|
|
3441
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
3442
|
+
ARRAY_START_3 += 1
|
|
3443
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
3444
|
+
-- Read BLOCK: 4 bytes
|
|
3445
|
+
local BLOCK_START = Read(4)
|
|
3446
|
+
Item_3.Brightness = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3447
|
+
end
|
|
3448
|
+
-- Read 1
|
|
3449
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
3450
|
+
ARRAY_START_3 += 1
|
|
3451
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
3452
|
+
-- Read BLOCK: 3 bytes
|
|
3453
|
+
local BLOCK_START = Read(3)
|
|
3454
|
+
Item_3.Color = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
3455
|
+
end
|
|
3456
|
+
-- Read 1
|
|
3457
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
3458
|
+
ARRAY_START_3 += 1
|
|
3459
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
3460
|
+
-- Read BLOCK: 1 bytes
|
|
3461
|
+
local BLOCK_START = Read(1)
|
|
3462
|
+
Item_3.Shadows = (buffer.readu8(RecieveBuffer, BLOCK_START + 0) == 1)
|
|
3463
|
+
end
|
|
3464
|
+
-- Read 1
|
|
3465
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
3466
|
+
ARRAY_START_3 += 1
|
|
3467
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
3468
|
+
-- Read BLOCK: 4 bytes
|
|
3469
|
+
local BLOCK_START = Read(4)
|
|
3470
|
+
Item_3.Range = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3471
|
+
end
|
|
3472
|
+
-- Read 1
|
|
3473
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
3474
|
+
ARRAY_START_3 += 1
|
|
3475
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
3476
|
+
-- Read BLOCK: 4 bytes
|
|
3477
|
+
local BLOCK_START = Read(4)
|
|
3478
|
+
Item_3.Angle = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3479
|
+
end
|
|
3480
|
+
-- Read 1
|
|
3481
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
3482
|
+
ARRAY_START_3 += 1
|
|
3483
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
3484
|
+
-- Read BLOCK: 1 bytes
|
|
3485
|
+
local BLOCK_START = Read(1)
|
|
3486
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3487
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
3488
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
3489
|
+
end
|
|
3490
|
+
table.insert(Element_1.Lights, Item_3)
|
|
3491
|
+
end
|
|
3492
|
+
-- END ARRAY
|
|
3493
|
+
end
|
|
3494
|
+
local OFFSET_25 = Read(1)
|
|
3495
|
+
if buffer.readu8(RecieveBuffer, OFFSET_25) == 1 then
|
|
3496
|
+
-- Read BLOCK: 2 bytes
|
|
3497
|
+
local BLOCK_START = Read(2)
|
|
3498
|
+
-- START ARRAY
|
|
3499
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3500
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3501
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3502
|
+
Element_1.Decals = table.create(Length)
|
|
3503
|
+
-- Read BLOCK: 7 bytes
|
|
3504
|
+
local ARRAY_START_3 = Read(7 * Length)
|
|
3505
|
+
for Index = 1, Length do
|
|
3506
|
+
local Item_3 = {} :: any
|
|
3507
|
+
-- Read 1
|
|
3508
|
+
local OPERATION_OFFSET_0 = ARRAY_START_3
|
|
3509
|
+
ARRAY_START_3 += 1
|
|
3510
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_0) == 1 then
|
|
3511
|
+
-- Read BLOCK: 3 bytes
|
|
3512
|
+
local BLOCK_START = Read(3)
|
|
3513
|
+
Item_3.Color3 = Color3.fromRGB(buffer.readu8(RecieveBuffer, BLOCK_START + 0), buffer.readu8(RecieveBuffer, BLOCK_START + 1), buffer.readu8(RecieveBuffer, BLOCK_START + 2))
|
|
3514
|
+
end
|
|
3515
|
+
-- Read 1
|
|
3516
|
+
local OPERATION_OFFSET_1 = ARRAY_START_3
|
|
3517
|
+
ARRAY_START_3 += 1
|
|
3518
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_1) == 1 then
|
|
3519
|
+
-- Read BLOCK: 2 bytes
|
|
3520
|
+
local BLOCK_START = Read(2)
|
|
3521
|
+
Length = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3522
|
+
Item_3.ColorMap = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3523
|
+
end
|
|
3524
|
+
-- Read 1
|
|
3525
|
+
local OPERATION_OFFSET_2 = ARRAY_START_3
|
|
3526
|
+
ARRAY_START_3 += 1
|
|
3527
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_2) == 1 then
|
|
3528
|
+
-- Read BLOCK: 4 bytes
|
|
3529
|
+
local BLOCK_START = Read(4)
|
|
3530
|
+
Item_3.Transparency = buffer.readf32(RecieveBuffer, BLOCK_START + 0)
|
|
3531
|
+
end
|
|
3532
|
+
-- Read 1
|
|
3533
|
+
local OPERATION_OFFSET_3 = ARRAY_START_3
|
|
3534
|
+
ARRAY_START_3 += 1
|
|
3535
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_3) == 1 then
|
|
3536
|
+
-- START ARRAY
|
|
3537
|
+
local Length = 2
|
|
3538
|
+
Item_3.UVOffset = table.create(Length)
|
|
3539
|
+
-- Read BLOCK: 4 bytes
|
|
3540
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
3541
|
+
for Index = 1, Length do
|
|
3542
|
+
-- Read 4
|
|
3543
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
3544
|
+
ARRAY_START_5 += 4
|
|
3545
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3546
|
+
table.insert(Item_3.UVOffset, Item_5)
|
|
3547
|
+
end
|
|
3548
|
+
-- END ARRAY
|
|
3549
|
+
end
|
|
3550
|
+
-- Read 1
|
|
3551
|
+
local OPERATION_OFFSET_4 = ARRAY_START_3
|
|
3552
|
+
ARRAY_START_3 += 1
|
|
3553
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_4) == 1 then
|
|
3554
|
+
-- START ARRAY
|
|
3555
|
+
local Length = 2
|
|
3556
|
+
Item_3.UVScale = table.create(Length)
|
|
3557
|
+
-- Read BLOCK: 4 bytes
|
|
3558
|
+
local ARRAY_START_5 = Read(4 * Length)
|
|
3559
|
+
for Index = 1, Length do
|
|
3560
|
+
-- Read 4
|
|
3561
|
+
local OPERATION_OFFSET_0 = ARRAY_START_5
|
|
3562
|
+
ARRAY_START_5 += 4
|
|
3563
|
+
local Item_5 = buffer.readf32(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3564
|
+
table.insert(Item_3.UVScale, Item_5)
|
|
3565
|
+
end
|
|
3566
|
+
-- END ARRAY
|
|
3567
|
+
end
|
|
3568
|
+
-- Read 1
|
|
3569
|
+
local OPERATION_OFFSET_5 = ARRAY_START_3
|
|
3570
|
+
ARRAY_START_3 += 1
|
|
3571
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_5) == 1 then
|
|
3572
|
+
-- Read BLOCK: 4 bytes
|
|
3573
|
+
local BLOCK_START = Read(4)
|
|
3574
|
+
Item_3.ZIndex = buffer.readu32(RecieveBuffer, BLOCK_START + 0)
|
|
3575
|
+
end
|
|
3576
|
+
-- Read 1
|
|
3577
|
+
local OPERATION_OFFSET_6 = ARRAY_START_3
|
|
3578
|
+
ARRAY_START_3 += 1
|
|
3579
|
+
if buffer.readu8(RecieveBuffer, OPERATION_OFFSET_6) == 1 then
|
|
3580
|
+
-- Read BLOCK: 1 bytes
|
|
3581
|
+
local BLOCK_START = Read(1)
|
|
3582
|
+
Item_3.Face = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3583
|
+
if Item_3.Face < 0 then error(`Expected "Item_3.Face" to be larger than 0, got {Item_3.Face} instead.`) end
|
|
3584
|
+
if Item_3.Face > 5 then error(`Expected "Item_3.Face" to be smaller than 5, got {Item_3.Face} instead.`) end
|
|
3585
|
+
end
|
|
3586
|
+
table.insert(Element_1.Decals, Item_3)
|
|
3587
|
+
end
|
|
3588
|
+
-- END ARRAY
|
|
3589
|
+
end
|
|
3590
|
+
Element_1.Attributes = {}
|
|
3591
|
+
local OFFSET_26 = Read(2)
|
|
3592
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, OFFSET_26)
|
|
3593
|
+
for _ = 1, Elements_2 do
|
|
3594
|
+
local OFFSET_0 = Read(2)
|
|
3595
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
3596
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3597
|
+
RecieveInstanceCursor += 1
|
|
3598
|
+
local Element_2 = RecieveInstances[RecieveInstanceCursor]
|
|
3599
|
+
Element_1.Attributes[Key_2] = Element_2
|
|
3600
|
+
end
|
|
3601
|
+
-- START ARRAY
|
|
3602
|
+
local OFFSET_27 = Read(2)
|
|
3603
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_27)
|
|
3604
|
+
if Length < 0 then error(`Expected "Length" to be larger than 0, got {Length} instead.`) end
|
|
3605
|
+
if Length > 65535 then error(`Expected "Length" to be smaller than 65535, got {Length} instead.`) end
|
|
3606
|
+
Element_1.Tags = table.create(Length)
|
|
3607
|
+
-- Read BLOCK: 2 bytes
|
|
3608
|
+
local ARRAY_START_2 = Read(2 * Length)
|
|
3609
|
+
for Index = 1, Length do
|
|
3610
|
+
-- Read 2
|
|
3611
|
+
local OPERATION_OFFSET_0 = ARRAY_START_2
|
|
3612
|
+
ARRAY_START_2 += 2
|
|
3613
|
+
Length = buffer.readu16(RecieveBuffer, OPERATION_OFFSET_0)
|
|
3614
|
+
local Item_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3615
|
+
table.insert(Element_1.Tags, Item_2)
|
|
3616
|
+
end
|
|
3617
|
+
-- END ARRAY
|
|
3618
|
+
Value3[Key_1] = Element_1
|
|
3619
|
+
end
|
|
3620
|
+
local Value4
|
|
3621
|
+
if buffer.readu8(RecieveBuffer, BLOCK_START + 51) == 1 then
|
|
3622
|
+
-- Read BLOCK: 2 bytes
|
|
3623
|
+
local BLOCK_START = Read(2)
|
|
3624
|
+
Value4 = {}
|
|
3625
|
+
local Elements_2 = buffer.readu16(RecieveBuffer, BLOCK_START + 0)
|
|
3626
|
+
for _ = 1, Elements_2 do
|
|
3627
|
+
local OFFSET_0 = Read(2)
|
|
3628
|
+
Length = buffer.readu16(RecieveBuffer, OFFSET_0)
|
|
3629
|
+
local Key_2 = buffer.readstring(RecieveBuffer, Read(Length), Length)
|
|
3630
|
+
local OFFSET_1 = Read(1)
|
|
3631
|
+
local Element_2 = (buffer.readu8(RecieveBuffer, OFFSET_1) == 1)
|
|
3632
|
+
Value4[Key_2] = Element_2
|
|
3633
|
+
end
|
|
3634
|
+
end
|
|
3635
|
+
return Value1, Value2, Value3, Value4
|
|
3636
|
+
end
|
|
3637
|
+
|
|
3638
|
+
local function Shatterbox_WriteEVENT_ClientInitComplete(Value: nil): ()
|
|
3639
|
+
-- Allocate BLOCK: 1 bytes
|
|
3640
|
+
local BLOCK_START = Allocate(1)
|
|
3641
|
+
buffer.writeu8(SendBuffer, BLOCK_START + 0, 9)
|
|
3642
|
+
end
|
|
3643
|
+
|
|
3644
|
+
local function Shatterbox_ReadEVENT_SignalPrintState(): (nil)
|
|
3645
|
+
return nil
|
|
3646
|
+
end
|
|
3647
|
+
|
|
3648
|
+
if not RunService:IsRunning() then
|
|
3649
|
+
local NOOP = function() end
|
|
3650
|
+
local Returns = table.freeze({
|
|
3651
|
+
Shatterbox = {
|
|
3652
|
+
SignalClearQueue = {
|
|
3653
|
+
On = NOOP
|
|
3654
|
+
},
|
|
3655
|
+
SignalReset = {
|
|
3656
|
+
On = NOOP
|
|
3657
|
+
},
|
|
3658
|
+
SignalResetArea = {
|
|
3659
|
+
On = NOOP
|
|
3660
|
+
},
|
|
3661
|
+
CreatePuppets = {
|
|
3662
|
+
On = NOOP
|
|
3663
|
+
},
|
|
3664
|
+
ReplicatePuppetStates = {
|
|
3665
|
+
On = NOOP
|
|
3666
|
+
},
|
|
3667
|
+
DestroyPuppet = {
|
|
3668
|
+
On = NOOP
|
|
3669
|
+
},
|
|
3670
|
+
CreateDirtyGroupsFromClient = {
|
|
3671
|
+
Fire = NOOP
|
|
3672
|
+
},
|
|
3673
|
+
CreateDirtyGroupsFromServer = {
|
|
3674
|
+
On = NOOP
|
|
3675
|
+
},
|
|
3676
|
+
ReplicateState = {
|
|
3677
|
+
On = NOOP
|
|
3678
|
+
},
|
|
3679
|
+
ReplicateDestruction = {
|
|
3680
|
+
On = NOOP
|
|
3681
|
+
},
|
|
3682
|
+
ClientInitComplete = {
|
|
3683
|
+
Fire = NOOP
|
|
3684
|
+
},
|
|
3685
|
+
SignalPrintState = {
|
|
3686
|
+
On = NOOP
|
|
3687
|
+
},
|
|
3688
|
+
},
|
|
3689
|
+
})
|
|
3690
|
+
return Returns :: BLINK_EVENTS_SYMBOL
|
|
3691
|
+
end
|
|
3692
|
+
|
|
3693
|
+
if not RunService:IsClient() then
|
|
3694
|
+
error("Client network module can only be required from the client.")
|
|
3695
|
+
end
|
|
3696
|
+
|
|
3697
|
+
local Reliable: RemoteEvent = ReplicatedStorage:WaitForChild(BASE_EVENT_NAME .. "_RELIABLE_REMOTE") :: RemoteEvent
|
|
3698
|
+
local Unreliable: UnreliableRemoteEvent = ReplicatedStorage:WaitForChild(BASE_EVENT_NAME .. "_UNRELIABLE_REMOTE") :: UnreliableRemoteEvent
|
|
3699
|
+
|
|
3700
|
+
local function StepReplication()
|
|
3701
|
+
if SendCursor <= 0 then
|
|
3702
|
+
return
|
|
3703
|
+
end
|
|
3704
|
+
|
|
3705
|
+
local Buffer = buffer.create(SendCursor)
|
|
3706
|
+
buffer.copy(Buffer, 0, SendBuffer, 0, SendCursor)
|
|
3707
|
+
Reliable:FireServer(Buffer, SendInstances)
|
|
3708
|
+
|
|
3709
|
+
SendSize = 64
|
|
3710
|
+
SendCursor = 0
|
|
3711
|
+
SendOffset = 0
|
|
3712
|
+
SendBuffer = buffer.create(64)
|
|
3713
|
+
table.clear(SendInstances)
|
|
3714
|
+
end
|
|
3715
|
+
RunService.Heartbeat:Connect(StepReplication)
|
|
3716
|
+
Reliable.OnClientEvent:Connect(function(Buffer: buffer, Instances: {Instance})
|
|
3717
|
+
RecieveCursor = 0
|
|
3718
|
+
RecieveBuffer = Buffer
|
|
3719
|
+
RecieveInstances = Instances
|
|
3720
|
+
RecieveInstanceCursor = 0
|
|
3721
|
+
local Size = buffer.len(RecieveBuffer)
|
|
3722
|
+
while (RecieveCursor < Size) do
|
|
3723
|
+
-- Read BLOCK: 1 bytes
|
|
3724
|
+
local BLOCK_START = Read(1)
|
|
3725
|
+
local Index = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3726
|
+
if Index == 0 then
|
|
3727
|
+
local Value: nil = Shatterbox_ReadEVENT_SignalClearQueue()
|
|
3728
|
+
if #Events.Reliable[0] > 0 then
|
|
3729
|
+
for _, Listener in Events.Reliable[0] do
|
|
3730
|
+
task.spawn(Listener, Value)
|
|
3731
|
+
end
|
|
3732
|
+
else
|
|
3733
|
+
if #Queue.Reliable[0] > 256 then
|
|
3734
|
+
warn("[Blink]: Event queue of \"SignalClearQueue\" exceeded 256, did you forget to implement a listener?")
|
|
3735
|
+
end
|
|
3736
|
+
table.insert(Queue.Reliable[0], {Value} :: {any})
|
|
3737
|
+
end
|
|
3738
|
+
elseif Index == 1 then
|
|
3739
|
+
local Value: boolean = Shatterbox_ReadEVENT_SignalReset()
|
|
3740
|
+
if #Events.Reliable[1] > 0 then
|
|
3741
|
+
for _, Listener in Events.Reliable[1] do
|
|
3742
|
+
task.spawn(Listener, Value)
|
|
3743
|
+
end
|
|
3744
|
+
else
|
|
3745
|
+
if #Queue.Reliable[1] > 256 then
|
|
3746
|
+
warn("[Blink]: Event queue of \"SignalReset\" exceeded 256, did you forget to implement a listener?")
|
|
3747
|
+
end
|
|
3748
|
+
table.insert(Queue.Reliable[1], {Value} :: {any})
|
|
3749
|
+
end
|
|
3750
|
+
elseif Index == 2 then
|
|
3751
|
+
local Value1: CFrame, Value2: Vector3 = Shatterbox_ReadEVENT_SignalResetArea()
|
|
3752
|
+
if #Events.Reliable[2] > 0 then
|
|
3753
|
+
for _, Listener in Events.Reliable[2] do
|
|
3754
|
+
task.spawn(Listener, Value1, Value2)
|
|
3755
|
+
end
|
|
3756
|
+
else
|
|
3757
|
+
if #Queue.Reliable[2] > 256 then
|
|
3758
|
+
warn("[Blink]: Event queue of \"SignalResetArea\" exceeded 256, did you forget to implement a listener?")
|
|
3759
|
+
end
|
|
3760
|
+
table.insert(Queue.Reliable[2], {Value1, Value2} :: {any})
|
|
3761
|
+
end
|
|
3762
|
+
elseif Index == 3 then
|
|
3763
|
+
local Value: { { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } } = Shatterbox_ReadEVENT_CreatePuppets()
|
|
3764
|
+
if #Events.Reliable[3] > 0 then
|
|
3765
|
+
for _, Listener in Events.Reliable[3] do
|
|
3766
|
+
task.spawn(Listener, Value)
|
|
3767
|
+
end
|
|
3768
|
+
else
|
|
3769
|
+
if #Queue.Reliable[3] > 256 then
|
|
3770
|
+
warn("[Blink]: Event queue of \"CreatePuppets\" exceeded 256, did you forget to implement a listener?")
|
|
3771
|
+
end
|
|
3772
|
+
table.insert(Queue.Reliable[3], {Value} :: {any})
|
|
3773
|
+
end
|
|
3774
|
+
elseif Index == 4 then
|
|
3775
|
+
local Value: number = Shatterbox_ReadEVENT_DestroyPuppet()
|
|
3776
|
+
if #Events.Reliable[4] > 0 then
|
|
3777
|
+
for _, Listener in Events.Reliable[4] do
|
|
3778
|
+
task.spawn(Listener, Value)
|
|
3779
|
+
end
|
|
3780
|
+
else
|
|
3781
|
+
if #Queue.Reliable[4] > 256 then
|
|
3782
|
+
warn("[Blink]: Event queue of \"DestroyPuppet\" exceeded 256, did you forget to implement a listener?")
|
|
3783
|
+
end
|
|
3784
|
+
table.insert(Queue.Reliable[4], {Value} :: {any})
|
|
3785
|
+
end
|
|
3786
|
+
elseif Index == 6 then
|
|
3787
|
+
local Value: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }} = Shatterbox_ReadEVENT_CreateDirtyGroupsFromServer()
|
|
3788
|
+
if #Events.Reliable[6] > 0 then
|
|
3789
|
+
for _, Listener in Events.Reliable[6] do
|
|
3790
|
+
task.spawn(Listener, Value)
|
|
3791
|
+
end
|
|
3792
|
+
else
|
|
3793
|
+
if #Queue.Reliable[6] > 256 then
|
|
3794
|
+
warn("[Blink]: Event queue of \"CreateDirtyGroupsFromServer\" exceeded 256, did you forget to implement a listener?")
|
|
3795
|
+
end
|
|
3796
|
+
table.insert(Queue.Reliable[6], {Value} :: {any})
|
|
3797
|
+
end
|
|
3798
|
+
elseif Index == 7 then
|
|
3799
|
+
local Value1: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value2: {[string]: { { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } }}, Value3: {[string]: boolean}, Value4: { { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? } }, Value5: {[string]: number}, Value6: {[string]: {[string]: boolean}}, Value7: {[string]: number}, Value8: {[string]: number}, Value9: {[string]: number}, Value10: {[number]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value11: number = Shatterbox_ReadEVENT_ReplicateState()
|
|
3800
|
+
if #Events.Reliable[7] > 0 then
|
|
3801
|
+
for _, Listener in Events.Reliable[7] do
|
|
3802
|
+
task.spawn(Listener, Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Value11)
|
|
3803
|
+
end
|
|
3804
|
+
else
|
|
3805
|
+
if #Queue.Reliable[7] > 256 then
|
|
3806
|
+
warn("[Blink]: Event queue of \"ReplicateState\" exceeded 256, did you forget to implement a listener?")
|
|
3807
|
+
end
|
|
3808
|
+
table.insert(Queue.Reliable[7], {Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Value11} :: {any})
|
|
3809
|
+
end
|
|
3810
|
+
elseif Index == 8 then
|
|
3811
|
+
local Value1: string, Value2: { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? }, Value3: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value4: {[string]: boolean}? = Shatterbox_ReadEVENT_ReplicateDestruction()
|
|
3812
|
+
if #Events.Reliable[8] > 0 then
|
|
3813
|
+
for _, Listener in Events.Reliable[8] do
|
|
3814
|
+
task.spawn(Listener, Value1, Value2, Value3, Value4)
|
|
3815
|
+
end
|
|
3816
|
+
else
|
|
3817
|
+
if #Queue.Reliable[8] > 256 then
|
|
3818
|
+
warn("[Blink]: Event queue of \"ReplicateDestruction\" exceeded 256, did you forget to implement a listener?")
|
|
3819
|
+
end
|
|
3820
|
+
table.insert(Queue.Reliable[8], {Value1, Value2, Value3, Value4} :: {any})
|
|
3821
|
+
end
|
|
3822
|
+
elseif Index == 10 then
|
|
3823
|
+
local Value: nil = Shatterbox_ReadEVENT_SignalPrintState()
|
|
3824
|
+
if #Events.Reliable[10] > 0 then
|
|
3825
|
+
for _, Listener in Events.Reliable[10] do
|
|
3826
|
+
task.spawn(Listener, Value)
|
|
3827
|
+
end
|
|
3828
|
+
else
|
|
3829
|
+
if #Queue.Reliable[10] > 256 then
|
|
3830
|
+
warn("[Blink]: Event queue of \"SignalPrintState\" exceeded 256, did you forget to implement a listener?")
|
|
3831
|
+
end
|
|
3832
|
+
table.insert(Queue.Reliable[10], {Value} :: {any})
|
|
3833
|
+
end
|
|
3834
|
+
end
|
|
3835
|
+
end
|
|
3836
|
+
end)
|
|
3837
|
+
Unreliable.OnClientEvent:Connect(function(Buffer: buffer, Instances: {Instance})
|
|
3838
|
+
RecieveCursor = 0
|
|
3839
|
+
RecieveBuffer = Buffer
|
|
3840
|
+
RecieveInstances = Instances
|
|
3841
|
+
RecieveInstanceCursor = 0
|
|
3842
|
+
local Size = buffer.len(RecieveBuffer)
|
|
3843
|
+
while (RecieveCursor < Size) do
|
|
3844
|
+
-- Read BLOCK: 1 bytes
|
|
3845
|
+
local BLOCK_START = Read(1)
|
|
3846
|
+
local Index = buffer.readu8(RecieveBuffer, BLOCK_START + 0)
|
|
3847
|
+
if Index == 0 then
|
|
3848
|
+
local Value1: buffer, Value2: number = Shatterbox_ReadEVENT_ReplicatePuppetStates()
|
|
3849
|
+
for _, Listener in Events.Unreliable[0] do
|
|
3850
|
+
task.spawn(Listener, Value1, Value2)
|
|
3851
|
+
end
|
|
3852
|
+
end
|
|
3853
|
+
end
|
|
3854
|
+
end)
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
local Returns = table.freeze({
|
|
3858
|
+
StepReplication = StepReplication,
|
|
3859
|
+
|
|
3860
|
+
Shatterbox = {
|
|
3861
|
+
SignalClearQueue = {
|
|
3862
|
+
On = function(Listener: (Value: nil) -> ()): () -> ()
|
|
3863
|
+
table.insert(Events.Reliable[0], Listener)
|
|
3864
|
+
for Index, Arguments in Queue.Reliable[0] do
|
|
3865
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3866
|
+
end
|
|
3867
|
+
Queue.Reliable[0] = {}
|
|
3868
|
+
return function (): ()
|
|
3869
|
+
local Index = table.find(Events.Reliable[0], Listener)
|
|
3870
|
+
if Index ~= nil then
|
|
3871
|
+
table.remove(Events.Reliable[0], Index)
|
|
3872
|
+
end
|
|
3873
|
+
end
|
|
3874
|
+
end
|
|
3875
|
+
},
|
|
3876
|
+
SignalReset = {
|
|
3877
|
+
On = function(Listener: (Value: boolean) -> ()): () -> ()
|
|
3878
|
+
table.insert(Events.Reliable[1], Listener)
|
|
3879
|
+
for Index, Arguments in Queue.Reliable[1] do
|
|
3880
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3881
|
+
end
|
|
3882
|
+
Queue.Reliable[1] = {}
|
|
3883
|
+
return function (): ()
|
|
3884
|
+
local Index = table.find(Events.Reliable[1], Listener)
|
|
3885
|
+
if Index ~= nil then
|
|
3886
|
+
table.remove(Events.Reliable[1], Index)
|
|
3887
|
+
end
|
|
3888
|
+
end
|
|
3889
|
+
end
|
|
3890
|
+
},
|
|
3891
|
+
SignalResetArea = {
|
|
3892
|
+
On = function(Listener: (Value1: CFrame, Value2: Vector3) -> ()): () -> ()
|
|
3893
|
+
table.insert(Events.Reliable[2], Listener)
|
|
3894
|
+
for Index, Arguments in Queue.Reliable[2] do
|
|
3895
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3896
|
+
end
|
|
3897
|
+
Queue.Reliable[2] = {}
|
|
3898
|
+
return function (): ()
|
|
3899
|
+
local Index = table.find(Events.Reliable[2], Listener)
|
|
3900
|
+
if Index ~= nil then
|
|
3901
|
+
table.remove(Events.Reliable[2], Index)
|
|
3902
|
+
end
|
|
3903
|
+
end
|
|
3904
|
+
end
|
|
3905
|
+
},
|
|
3906
|
+
CreatePuppets = {
|
|
3907
|
+
On = function(Listener: (Value: { { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } }) -> ()): () -> ()
|
|
3908
|
+
table.insert(Events.Reliable[3], Listener)
|
|
3909
|
+
for Index, Arguments in Queue.Reliable[3] do
|
|
3910
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3911
|
+
end
|
|
3912
|
+
Queue.Reliable[3] = {}
|
|
3913
|
+
return function (): ()
|
|
3914
|
+
local Index = table.find(Events.Reliable[3], Listener)
|
|
3915
|
+
if Index ~= nil then
|
|
3916
|
+
table.remove(Events.Reliable[3], Index)
|
|
3917
|
+
end
|
|
3918
|
+
end
|
|
3919
|
+
end
|
|
3920
|
+
},
|
|
3921
|
+
ReplicatePuppetStates = {
|
|
3922
|
+
On = function(Listener: (Value1: buffer, Value2: number) -> ()): () -> ()
|
|
3923
|
+
table.insert(Events.Unreliable[0], Listener)
|
|
3924
|
+
return function (): ()
|
|
3925
|
+
local Index = table.find(Events.Unreliable[0], Listener)
|
|
3926
|
+
if Index ~= nil then
|
|
3927
|
+
table.remove(Events.Unreliable[0], Index)
|
|
3928
|
+
end
|
|
3929
|
+
end
|
|
3930
|
+
end
|
|
3931
|
+
},
|
|
3932
|
+
DestroyPuppet = {
|
|
3933
|
+
On = function(Listener: (Value: number) -> ()): () -> ()
|
|
3934
|
+
table.insert(Events.Reliable[4], Listener)
|
|
3935
|
+
for Index, Arguments in Queue.Reliable[4] do
|
|
3936
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3937
|
+
end
|
|
3938
|
+
Queue.Reliable[4] = {}
|
|
3939
|
+
return function (): ()
|
|
3940
|
+
local Index = table.find(Events.Reliable[4], Listener)
|
|
3941
|
+
if Index ~= nil then
|
|
3942
|
+
table.remove(Events.Reliable[4], Index)
|
|
3943
|
+
end
|
|
3944
|
+
end
|
|
3945
|
+
end
|
|
3946
|
+
},
|
|
3947
|
+
CreateDirtyGroupsFromClient = {
|
|
3948
|
+
Fire = function(Value: {[string]: Part}): ()
|
|
3949
|
+
Shatterbox_WriteEVENT_CreateDirtyGroupsFromClient(Value)
|
|
3950
|
+
end
|
|
3951
|
+
},
|
|
3952
|
+
CreateDirtyGroupsFromServer = {
|
|
3953
|
+
On = function(Listener: (Value: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}) -> ()): () -> ()
|
|
3954
|
+
table.insert(Events.Reliable[6], Listener)
|
|
3955
|
+
for Index, Arguments in Queue.Reliable[6] do
|
|
3956
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3957
|
+
end
|
|
3958
|
+
Queue.Reliable[6] = {}
|
|
3959
|
+
return function (): ()
|
|
3960
|
+
local Index = table.find(Events.Reliable[6], Listener)
|
|
3961
|
+
if Index ~= nil then
|
|
3962
|
+
table.remove(Events.Reliable[6], Index)
|
|
3963
|
+
end
|
|
3964
|
+
end
|
|
3965
|
+
end
|
|
3966
|
+
},
|
|
3967
|
+
ReplicateState = {
|
|
3968
|
+
On = function(Listener: (Value1: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value2: {[string]: { { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } } }}, Value3: {[string]: boolean}, Value4: { { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? } }, Value5: {[string]: number}, Value6: {[string]: {[string]: boolean}}, Value7: {[string]: number}, Value8: {[string]: number}, Value9: {[string]: number}, Value10: {[number]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value11: number) -> ()): () -> ()
|
|
3969
|
+
table.insert(Events.Reliable[7], Listener)
|
|
3970
|
+
for Index, Arguments in Queue.Reliable[7] do
|
|
3971
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3972
|
+
end
|
|
3973
|
+
Queue.Reliable[7] = {}
|
|
3974
|
+
return function (): ()
|
|
3975
|
+
local Index = table.find(Events.Reliable[7], Listener)
|
|
3976
|
+
if Index ~= nil then
|
|
3977
|
+
table.remove(Events.Reliable[7], Index)
|
|
3978
|
+
end
|
|
3979
|
+
end
|
|
3980
|
+
end
|
|
3981
|
+
},
|
|
3982
|
+
ReplicateDestruction = {
|
|
3983
|
+
On = function(Listener: (Value1: string, Value2: { ID: string, CuttingPart: { CFrame: CFrame, Size: Vector3, Shape: number }, FilterTagged: { string }?, GridSize: number?, CleanupDelay: number?, SkipWalls: boolean?, SkipFloors: boolean?, SkipEncapsulatedVoxels: boolean?, OnVoxelDestruct: string?, UserData: any? }, Value3: {[string]: { CFrame: CFrame, Size: Vector3, Anchored: boolean, Color: Color3?, Material: number?, Transparency: number?, Reflectance: number?, MaterialVariant: string?, CollisionGroup: string?, LeftSurface: number?, RightSurface: number?, FrontSurface: number?, BackSurface: number?, TopSurface: number?, BottomSurface: number?, Textures: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number?, OffsetStudsU: number?, OffsetStudsV: number?, StudsPerTileU: number?, StudsPerTileV: number? } }?, Lights: { { ClassName: string, Brightness: number?, Color: Color3?, Shadows: boolean?, Range: number?, Angle: number?, Face: number? } }?, Decals: { { Color3: Color3?, ColorMap: string?, Transparency: number?, UVOffset: { number }?, UVScale: { number }?, ZIndex: number?, Face: number? } }?, Attributes: {[string]: any}, Tags: { string } }}, Value4: {[string]: boolean}?) -> ()): () -> ()
|
|
3984
|
+
table.insert(Events.Reliable[8], Listener)
|
|
3985
|
+
for Index, Arguments in Queue.Reliable[8] do
|
|
3986
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
3987
|
+
end
|
|
3988
|
+
Queue.Reliable[8] = {}
|
|
3989
|
+
return function (): ()
|
|
3990
|
+
local Index = table.find(Events.Reliable[8], Listener)
|
|
3991
|
+
if Index ~= nil then
|
|
3992
|
+
table.remove(Events.Reliable[8], Index)
|
|
3993
|
+
end
|
|
3994
|
+
end
|
|
3995
|
+
end
|
|
3996
|
+
},
|
|
3997
|
+
ClientInitComplete = {
|
|
3998
|
+
Fire = function(Value: nil): ()
|
|
3999
|
+
Shatterbox_WriteEVENT_ClientInitComplete(Value)
|
|
4000
|
+
end
|
|
4001
|
+
},
|
|
4002
|
+
SignalPrintState = {
|
|
4003
|
+
On = function(Listener: (Value: nil) -> ()): () -> ()
|
|
4004
|
+
table.insert(Events.Reliable[10], Listener)
|
|
4005
|
+
for Index, Arguments in Queue.Reliable[10] do
|
|
4006
|
+
task.spawn(Listener, table.unpack(Arguments))
|
|
4007
|
+
end
|
|
4008
|
+
Queue.Reliable[10] = {}
|
|
4009
|
+
return function (): ()
|
|
4010
|
+
local Index = table.find(Events.Reliable[10], Listener)
|
|
4011
|
+
if Index ~= nil then
|
|
4012
|
+
table.remove(Events.Reliable[10], Index)
|
|
4013
|
+
end
|
|
4014
|
+
end
|
|
4015
|
+
end
|
|
4016
|
+
},
|
|
4017
|
+
},
|
|
4018
|
+
})
|
|
4019
|
+
type BLINK_EVENTS_SYMBOL = typeof(Returns)
|
|
4020
|
+
return Returns :: BLINK_EVENTS_SYMBOL
|