View difference between Paste ID: 4ybm3D4N and SEbda3SY
SHOW: | | - or go back to the newest paste.
1
--[[
2
    Smith and Wesson M&P 45, chambered in .45 ACP ammunition.
3
    The standard magazine holds 10 rounds, although magazines that could hold 14 rounds were also made but looked incredibly stupid.
4
    Credit to litozinnamon for the crosshairs and bullethole decals. I used them without permission. Not like I asked him, anyhow.
5
]]
6
7
plr=game:service'Players'.LocalPlayer
8
ch,char=plr.Character,plr.Character
9
hum=ch.Humanoid
10
tor,torso,rootpart,rj=ch.Torso,ch.Torso,ch.HumanoidRootPart,ch.HumanoidRootPart.RootJoint
11
m,mouse=plr:GetMouse(),plr:GetMouse()
12
cfn,ang,mr,int=CFrame.new,CFrame.Angles,math.rad,Instance.new
13
bc=BrickColor.new
14
head=ch.Head
15
cam=workspace.CurrentCamera
16
17
rj.C0=cfn()
18
rj.C1=cfn()
19
20
sheathed=false
21
jammed=false
22
23
24
25
26
27
28
29
30
31
32
33
local minimumsize = Vector3.new(0.7,0.7,0.7) --Minimumsize for a part to get divided,higher numbers = less detailed and bigger/less bricks
34
local surface_between_splitted_parts = 'SmoothNoOutlines' --the surface between splitted parts
35
--local fragmented = workspace:FindFirstChild("Fragmented")
36
local fragmentable = workspace --all fragmentable objects should be stored in here
37
local list = {}
38
local brickcount = 0
39
--local m = Instance.new("Hint",workspace)
40
local storage = {}
41
local fillup = 1000 --it constantly generates new parts until it reaches this number(hacky way to prevent lagspikes if there is a large explosion),change it to 0 if you don´t want it to generate (useless) parts.
42
local maximumstorage = 2000 --it will recycle parts if the number of parts in the storage doesnt exceed this number
43
local storage_position = Vector3.new(0,0,5000) --place them somewhere off the map
44
local stored_partsize = Vector3.new(1,1,1) --make them small
45
local parts_created_per_frame = 5 --number of parts being created per frame to fill up the storage
46
47
48
function fragmentate(cframe,size,color,explosion_position,explosion_blastradius,backsurface,bottomsurface,frontsurface,leftsurface,rightsurface,topsurface,transparency,reflectance)
49
	local xi = size.X >= minimumsize.X*(1+explosion_blastradius/16) and 2 or 1 --to reduce the lagg in large explosions we increase minimumsize based on the explosionradius...
50
	local yi = size.Y >= minimumsize.Y*(1+explosion_blastradius/16) and 2 or 1
51
	local zi = size.Z >= minimumsize.Z*(1+explosion_blastradius/16) and 2 or 1
52
	if xi == 1 and yi == 1 and zi == 1 or (cframe.p-explosion_position).magnitude > size.magnitude/2 + explosion_blastradius then --don´t fragmentate parts, that are too small to fragmentate or too far away from the explosion
53
		if xi == 1 and yi == 1 and zi == 1 then return end --optional
54
		if #storage > 0 then
55
			local p = storage[1]
56
			p.BrickColor = color
57
			p.Size = size
58
			p.BackSurface = backsurface
59
			p.BottomSurface = bottomsurface
60
			p.FrontSurface = frontsurface
61
			p.LeftSurface = leftsurface
62
			p.RightSurface = rightsurface
63
			p.TopSurface = topsurface
64
			p.Transparency = transparency
65
			p.CFrame = cframe
66
			p.Reflectance = reflectance
67
			table.remove(storage,1)
68
		else
69
			local p = Instance.new("Part",fragmentable)
70
			p.BrickColor = color
71
			p.FormFactor = "Custom"
72
			p.Size = size
73
			p.BackSurface = backsurface
74
			p.BottomSurface = bottomsurface
75
			p.FrontSurface = frontsurface
76
			p.LeftSurface = leftsurface
77
			p.RightSurface = rightsurface
78
			p.TopSurface = topsurface
79
			p.Transparency = transparency
80
		    if p.Transparency>0.285 then
81
			    p.Anchored = false
82
			else
83
			    p.Anchored=true
84
			    p.Material='Wood'
85
			end
86
			p.CFrame = cframe
87
			p.Reflectance = reflectance
88
		end
89
		--p:MakeJoints()
90
--		m.Text = m.Text+1
91
		return --stop the function
92
	end
93
	local mody = math.random(-125,125)/1000 --some randomization
94
	for y = 1,yi do
95
		if math.random()> 0.5 then
96
			local modx = math.random(-125,125)/1000
97
			for x = 1,xi do
98
				local modz = math.random(-125,125)/1000
99
				for z = 1,zi do --offset = x/xi-0.75+modx)
100
					fragmentate(cframe*CFrame.new(size.X*(xi==1 and 0 or x/xi-0.75+modx),size.Y*(yi==1 and 0 or y/yi-0.75+mody),size.Z*(zi==1 and 0 or z/zi-0.75+modz)), --maths
101
					Vector3.new(xi == 2 and size.X*(1-2*math.abs(x/xi-0.75+modx)) or size.X,yi == 2 and size.Y*(1-2*math.abs(y/yi-0.75+mody)) or size.Y,
102
					zi == 2 and size.Z*(1-2*math.abs(z/zi-0.75+modz)) or size.Z or agent767_was_here),color,explosion_position,explosion_blastradius,
103
					z~=zi and surface_between_splitted_parts or backsurface,y==2 and surface_between_splitted_parts or bottomsurface,
104
					z==2 and surface_between_splitted_parts or frontsurface,x==2 and surface_between_splitted_parts or leftsurface,x~=xi and surface_between_splitted_parts or rightsurface,
105
					y~=yi and surface_between_splitted_parts or topsurface,transparency,reflectance) 
106
				end
107
				
108
			end
109
		else
110
			local modz = math.random(-125,125)/1000
111
			for z = 1,zi do
112
				local modx = math.random(-125,125)/1000
113
				for x = 1,xi do
114
					fragmentate(cframe*CFrame.new(size.X*(xi==1 and 0 or x/xi-0.75+modx),size.Y*(yi==1 and 0 or y/yi-0.75+mody),size.Z*(zi==1 and 0 or z/zi-0.75+modz)),
115
					Vector3.new(xi == 2 and size.X*(1-2*math.abs(x/xi-0.75+modx)) or size.X,yi == 2 and size.Y*(1-2*math.abs(y/yi-0.75+mody)) or size.Y,
116
					zi == 2 and size.Z*(1-2*math.abs(z/zi-0.75+modz)) or size.Z),color,explosion_position,explosion_blastradius,
117
					z~=zi and surface_between_splitted_parts or backsurface,y==2 and surface_between_splitted_parts or bottomsurface,
118
					z==2 and surface_between_splitted_parts or frontsurface,x==2 and surface_between_splitted_parts or leftsurface,x~=xi and surface_between_splitted_parts or rightsurface,
119
					y~=yi and surface_between_splitted_parts or topsurface,transparency,reflectance)
120
				end
121
			end
122
		end
123
	end				
124
end
125
126
function start_fragmentation(position,radius)
127
	local search = Region3.new(position-Vector3.new(radius,radius,radius)*1.1,position+Vector3.new(radius,radius,radius)*1.1)
128
	repeat
129
	local finish = false
130
	local parts = workspace:FindPartsInRegion3WithIgnoreList(search,list,100) --maximum number of parts that FindPartsInRegion3 can find is 100, so we have to do this to find them all
131
	for i = 1,#parts do
132
		table.insert(list,1,parts[i])
133
	end
134
	finish = true
135
	until #parts < 100 and finish
136
	print(#list)
137
	local t = tick()
138
	for i = 1,#list do
139
		local p = list[i]
140
		if p:IsDescendantOf(fragmentable) and p:GetMass()<3000 and p.Transparency>0.285 and p.Name~='Base' and p:IsDescendantOf(ch)==false then
141
			fragmentate(p.CFrame,p.Size,p.BrickColor,position,radius,p.BackSurface,p.BottomSurface,p.FrontSurface,p.LeftSurface,p.RightSurface,p.TopSurface,p.Transparency,p.Reflectance)
142
			if #storage < maximumstorage and p.Shape == "Block" then --recycle them
143
				p.Anchored = false
144
				p.FormFactor = "Custom"
145
				p.Size = stored_partsize
146
				p.Position = storage_position
147
				table.insert(storage,1,p)
148
			else --storage is full
149
				p:Destroy()
150
			end
151
--			m.Text = m.Text-1
152
	    end
153
		if p:IsDescendantOf(fragmentable) and p:GetMass()<53000 and p.Transparency<0.05 and p.Name~='Base' and tostring(p.Material)=='Enum.Material.Wood' and p:IsDescendantOf(ch)==false then
154
			fragmentate(p.CFrame,p.Size,p.BrickColor,position,radius,p.BackSurface,p.BottomSurface,p.FrontSurface,p.LeftSurface,p.RightSurface,p.TopSurface,p.Transparency,p.Reflectance)
155
			if #storage < maximumstorage and p.Shape == "Block" then --recycle them
156
				p.Anchored = true
157
				p.Material='Wood'
158
				p.FormFactor = "Custom"
159
				p.Size = stored_partsize
160
				p.Position = storage_position
161
				table.insert(storage,1,p)
162
			else --storage is full
163
				p:Destroy()
164
			end
165
--			m.Text = m.Text-1
166
		end
167
	end	
168
	list = {}
169
--	print(tick()-t)
170
end
171
172
--[[
173
spawn(function()
174
    while wait() do --oh noes,a loop! So inefficient!
175
    	if #storage < fillup then
176
    		for i = 1, parts_created_per_frame do --creates parts to fill up the storage
177
    			local p = Instance.new("Part",fragmentable)
178
    			p.Anchored = false
179
    			p.FormFactor = "Custom"
180
    			p.Size = stored_partsize
181
    			p.Position = storage_position
182
    			table.insert(storage,1,p)
183
    		end
184
    	end
185
    end
186
end)
187
]]
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
--local blankn=22416261
212
213
--172121567
214
215
crosshairs={
216
    {38140824};
217
    {38140833};
218
    {38140839};
219
    {38140843};
220
    {38140852};
221
    {38140910};
222
    {38140915};
223
    {38140923};
224
    {38140928};
225
    {38140931};
226
    {38208259};
227
    {38208275};
228
    {38208284};
229
    {38208303};
230
    {38208310};
231
    {38208325};
232
    {38208330};
233
    {38208352};
234
    {38208359};
235
    {38208377}
236
}
237
238
bulletholes={
239
    172274695;
240
    172274721
241
}
242
243
for _,v in pairs(crosshairs) do
244
    game:service'ContentProvider':Preload('rbxassetid://' .. tostring(v[1]-1)) 
245
end
246
247
currentIco=2
248
switchIco=function(num)
249
    if num<20 then
250
    else
251
        num=20
252
    end
253
    mouse.Icon='rbxassetid://' .. tostring(crosshairs[num][1]-1)
254
    currentIco=num
255
end
256
257
switchIco(currentIco)
258
259
heldDown=false
260
261
spreadint=1
262
--[[Settings]]--
263
recoil=false -- Set to true for added realism
264-
magCapacity=9999 -- How much a magazine can hold at once
264+
magCapacity=20 -- How much a magazine can hold at once
265-
magAmmo=9999 -- How much ammo is in the mag
265+
magAmmo=20 -- How much ammo is in the mag
266
crosshairSpread=0
267
spread=0
268
pAmmunition=true -- more damage if true
269
270
271
jamRate=99999 -- How often the gun jams(the more the less) (no less than 1)
272
273
primaryColor='Lime green'
274
secondaryColor='Lime green'
275
276
slideReflectance=0.01
277
slideMaterial='Neon'
278
279
--[[Attachments]]--
280
281
silencer=true
282
highCapMag=false -- High capacity magazine
283
laser=true
284
automatic=true
285
grip=true
286
287
288
getSound=function(id)
289
    game:service'ContentProvider':Preload('rbxassetid'..tostring(id))
290
    local s=int("Sound",ch.Head)
291
    s.SoundId='rbxassetid://' .. tostring(id)
292
    s.Volume=1
293
    return s
294
end
295
296
local fireSound=getSound(348993071--[[10209842]])
297
fireSound.Pitch=1.3
298
fireSound.Volume=10
299
--1.8
300
301
local releaseSound=getSound(10209813)
302
releaseSound.Pitch=4
303
304
local reloadSound=getSound(10209636)
305
reloadSound.Pitch=3
306
307
local magazinelockSound=getSound(152206337)
308
magazinelockSound.Pitch=1.4
309
310
local slideBackSound=getSound(152206263)
311
slideBackSound.Pitch=2.5
312
313
local slideForwardSound=getSound(152206302)
314
slideForwardSound.Pitch=2.5
315
316
local emptySound=getSound(2697295)
317
emptySound.Pitch=5
318
319
local glassBreakSound=getSound(144884907)
320
321
local woodImpact=getSound(142082171)
322
323
local fleshImpact=getSound(144884872)
324
fleshImpact.Pitch=1.7
325
326
if ch:findFirstChild("Tec-99") then
327
    ch['Tec-99']:Destroy()
328
end
329
330
local tube=int("Model",ch)
331
tube.Name='Tec-99'
332
local hopper=Instance.new('HopperBin',plr.Backpack)
333
hopper.Name=tube.Name
334
Weld = function(p0,p1,x,y,z,rx,ry,rz,par)--recommend to use this with my weld. use this function only with arm lockers.
335
    p0.Position = p1.Position
336
    local w = Instance.new('Motor',par or p0)
337
    w.Part0 = p1
338
    w.Part1 = p0
339
    w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
340
    w.MaxVelocity = .1
341
    return w
342
end
343
function clerp(c1,c2,sp)
344
    local R1,R2,R3 = c1:toEulerAnglesXYZ()
345
    local R21,R22,R23 = c2:toEulerAnglesXYZ()
346
    return CFrame.new(
347
    c1.X + (c2.X-c1.X)*sp,
348
    c1.Y + (c2.Y-c1.Y)*sp,
349
    c1.Z + (c2.Z-c1.Z)*sp)*CFrame.Angles(
350
    R1 + (R21-R1)*sp,
351
    R2 + (R22-R2)*sp,
352
    R3 + (R23-R3)*sp
353
    )
354
end
355
356
tweenTable={}
357
Tween = function(Weld, Stop, Step,a)
358
ypcall(function()
359
    local func = function()
360
        local Start = Weld.C1
361
        local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
362
        local Stop = Stop
363
        local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
364
        if not Step then Step=0.1 end
365
        table.insert(tweenTable,{th=0,Weld=Weld,Step=Step,Start=Start,X1=X1,Y1=Y1,Z1=Z1,Stop=Stop,X2=X2,Y2=Y2,Z2=Z2}) 
366
    end
367
        if a then coroutine.wrap(func)() else func() end
368
end)
369
end
370
weld=function(p0,p1,c0)
371
    local w=Instance.new("Weld",p0)
372
    w.Part0=p0
373
    w.Part1=p1
374
    w.C0=c0
375
    return w
376
end
377
cp=function(parent,color,size,anchored,cancollide)
378
    local newp=Instance.new("Part",parent)
379
    newp.TopSurface='SmoothNoOutlines'
380
    newp.BottomSurface='SmoothNoOutlines'
381
    newp.FrontSurface='SmoothNoOutlines'
382
    newp.BackSurface='SmoothNoOutlines'
383
    newp.RightSurface='SmoothNoOutlines'
384
    newp.LeftSurface='SmoothNoOutlines'
385
    newp.FormFactor="Custom"
386
    newp.BrickColor=bc(color)
387
    newp.Size=size
388
    newp.Anchored=anchored
389
    newp.CanCollide=cancollide
390
    newp:BreakJoints()
391
    return newp
392
end
393
394
initializeJoints=function()
395
    rabr = cp(tube,'White',Vector3.new(1,1,1),false,false) rabr.Transparency = 1 rabr.Name='Locker'
396
    rabr.Position = torso.Position
397
    rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = tube rw.Name = 'rw'
398
    w = Instance.new("Weld",tube)
399
    w.Part0,w.Part1 = ch['Right Arm'],rabr
400
    w.C1 = CFrame.new(0,-.5,0)
401
    labr = cp(tube,'White',Vector3.new(1,1,1),false,false) labr.Transparency = 1 labr.Name='Locker'
402
    labr.Position = torso.Position
403
    lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = tube lw.Name = 'lw'
404
    ww = Instance.new("Weld",tube)
405
    ww.Part0,ww.Part1 = ch['Left Arm'],labr
406
    ww.C1 = CFrame.new(0,-.5,0)
407
end
408
409
initializeJoints()
410
411
--[[ leg locks
412
rabl = cp(tube,'White',Vector3.new(1,1,1),false,false) rabl.Transparency = 1 rabl.Name='Locker'
413
rabl.Position = torso.Position
414
rwl = Weld(rabl,torso,0.5,-1.5,0,0,0,0) rwl.Parent = tube rwl.Name = 'rwl'
415
wl = Instance.new("Weld",tube)
416
wl.Part0,wl.Part1 = ch['Right Leg'],rabl
417
wl.C1 = CFrame.new(0,-.5,0)
418
labl = cp(tube,'White',Vector3.new(1,1,1),false,false) labl.Transparency = 1 labl.Name='Locker'
419
labl.Position = torso.Position
420
lwl = Weld(labl,torso,-0.5,-1.5,0,0,0,0) lwl.Parent = tube lwl.Name = 'lwl'
421
wwl = Instance.new("Weld",tube)
422
wwl.Part0,wwl.Part1 = ch['Left Leg'],labl
423
wwl.C1 = CFrame.new(0,-.5,0)
424
]]
425
--weld(ch['HumanoidRootPart'],torso,cfn())
426
427
428
local counter=Instance.new('ScreenGui',plr.PlayerGui)
429
local frame=Instance.new('Frame',counter)
430
frame.Size=UDim2.new(0.25,0,0.3,0)
431
432
frame.Position=UDim2.new(0.1,0,0.4,0)
433
frame.BackgroundTransparency=1
434
435
local ammocounter=Instance.new('TextLabel',frame)
436
ammocounter.Size=UDim2.new(1,0,0.3,0)
437
ammocounter.Position=UDim2.new(0,0,0.2,0)
438
ammocounter.BackgroundTransparency=1
439
ammocounter.TextColor3=BrickColor.new('White').Color
440
ammocounter.Font='SourceSansBold'
441
ammocounter.FontSize='Size18'
442
ammocounter.Text=''
443
ammocounter.TextXAlignment='Left'
444
445
446
local bg = Instance.new("BodyGyro",rootpart)
447
bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
448
bg.P = 10000
449
bg.D = 100
450
451
452
cyl=function(prt)
453
    local c=int("CylinderMesh",prt)
454
    return c
455
end
456
blo=function(prt)
457
    local c=int("BlockMesh",prt)
458
    return c
459
end
460
461
if laser then
462
    aLaser=cp(tube,'Really red',Vector3.new(0.2,0.2,0.2))
463
    aLaser.Transparency=1
464
    cyl(aLaser).Scale=Vector3.new(0.25,1,0.25)
465
    aLaser.Anchored=true
466
end
467
468
local handle=cp(tube,primaryColor,Vector3.new(0.2,0.6,0.3))
469
blo(handle).Scale=Vector3.new(1.15,0.9,1)
470
local mw=weld(ch['Right Arm'],handle,cfn(-0.4,-1,-0.19)*ang(mr(-101.5),0,0)*cfn()*ang(0,mr(-30),mr(-5)))
471
472
local framepiece1=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.9))
473
blo(framepiece1).Scale=Vector3.new(1.15,0.5,1)
474
weld(handle,framepiece1,cfn(0,0.354,-0.3)*ang(mr(11.5),0,0))
475
476
local barrel=cp(tube,'Medium stone grey',Vector3.new(0.2,0.2,0.2))
477
cyl(barrel).Scale=Vector3.new(0.7,1.2,0.7)
478
weld(framepiece1,barrel,cfn(0,0.15,-0.1)*ang(mr(-90),0,0))
479
    
480
local sbarrel=cp(tube,'Really black',Vector3.new(0.2,0.3,0.2))
481
cyl(sbarrel).Scale=Vector3.new(0.7,1.5,0.7)
482
weld(barrel,sbarrel,cfn(0,0.35,0))
483
local hole=cp(tube,'White',Vector3.new(0.2,0.2,0.2))
484
hole.Transparency=1
485
weld(sbarrel,hole,cfn(0,0.2,0))
486
local flash=int('PointLight',hole)
487
flash.Enabled=false
488
flash.Range=10
489
flash.Color=BrickColor.new('Neon orange').Color
490
491
    
492
local slide1=cp(tube,secondaryColor,Vector3.new(0.2,0.2,0.4))
493
slide1.CanCollide=false
494
blo(slide1).Scale=Vector3.new(0.7,1,1.1)
495
slideweld1=weld(framepiece1,slide1,cfn(0,0.15,0.23))
496
slide1.Reflectance=slideReflectance
497
slide1.Material=slideMaterial
498
499
local slide2=cp(tube,secondaryColor,Vector3.new(0.2,0.2,0.4))
500
slide2.CanCollide=false
501
blo(slide2).Scale=Vector3.new(0.7,1,1.1)
502
slideweld2=weld(slide1,slide2,cfn(0,0,-0.666))
503
slide2.Reflectance=slideReflectance
504
slide2.Material=slideMaterial
505
    
506
local slideside1=cp(tube,secondaryColor,Vector3.new(0.2,0.2,1.1))
507
slideside1.CanCollide=true
508
blo(slideside1).Scale=Vector3.new(0.25,1,1)
509
weld(slide1,slideside1,cfn(-0.09,0,-0.335))
510
slideside1.Reflectance=slideReflectance
511
slideside1.Material=slideMaterial
512
513
local slideside2=cp(tube,secondaryColor, Vector3.new(0.2,0.2,0.4))
514
slideside2.CanCollide=true
515
blo(slideside2).Scale=Vector3.new(0.25,1,1.1)
516
weld(slide1,slideside2,cfn(0.09,0,0))
517
slideside2.Reflectance=slideReflectance
518
slideside2.Material=slideMaterial
519
520
local slideside3=cp(tube,secondaryColor, Vector3.new(0.2,0.2,0.3))
521
slideside3.CanCollide=true
522
blo(slideside3).Scale=Vector3.new(0.25,0.6,0.78)
523
weld(slideside2,slideside3,cfn(0,-0.04,-0.335))
524
slideside3.Reflectance=slideReflectance
525
slideside3.Material=slideMaterial
526
527
local slideside4=cp(tube,secondaryColor, Vector3.new(0.2,0.2,0.4))
528
blo(slideside4).Scale=Vector3.new(0.25,1,1.1)
529
weld(slide2,slideside4,cfn(0.09,0,0))
530
slideside4.Reflectance=slideReflectance
531
slideside4.Material=slideMaterial
532
533
local mgs=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
534
blo(mgs).Scale=Vector3.new(1.15,0.425,0.245)
535
weld(handle,mgs,cfn(0,-0.3,0.125))
536
537
--[[Trigger]]--
538
local tp1=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
539
blo(tp1).Scale=Vector3.new(0.6,0.1,0.8)
540
weld(framepiece1,tp1,cfn(0,-0.22,0.13))
541
542
local tp2=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
543
blo(tp2).Scale=Vector3.new(0.6,0.1,1.19)
544
weld(framepiece1,tp2,cfn(0,-0.14,-0.0265)*ang(mr(45),0,0))
545
546
local trigger1=cp(tube,'Really black',Vector3.new(0.2,0.2,0.2))
547
blo(trigger1).Scale=Vector3.new(0.3,0.4,0.16)
548
weld(framepiece1,trigger1,cfn(0,-0.07,0.09))
549
    
550
local trigger2=cp(tube,'Really black',Vector3.new(0.2,0.2,0.2))
551
blo(trigger2).Scale=Vector3.new(0.3,0.3,0.16)
552
weld(trigger1,trigger2,cfn(0,-0.06,-0.015)*ang(mr(30),0,0))
553
    
554
    
555
--[[Magazine]]--
556
557
local magh=cp(tube,'Really black',Vector3.new(0.2,0.5,0.2))
558
blo(magh).Scale=Vector3.new(0.6,1,1)
559
local magweld=weld(handle,magh,cfn(0,-0.025,0))
560
    
561
local bottom=cp(tube,'Really black',Vector3.new(0.2,0.2,0.3))
562
blo(bottom).Scale=Vector3.new(1.15,0.385,0.8)
563
bottomweld=weld(magh,bottom,cfn(0,-0.28,-0.015))
564
    
565
if highCapMag then
566
    magweld:Destroy()    
567
    magh.Size=Vector3.new(0.2,0.7,0.2)
568
    magweld=weld(handle,magh,cfn(0,-0.125,0))
569
    bottomweld:Destroy()
570
    bottomweld=weld(magh,bottom,cfn(0,-0.38,-0.015))
571
    magCapacity=magCapacity+23
572
    magAmmo=magAmmo+23
573
end
574
    
575
--[[Sights]]--
576
local backsight1=cp(tube,'Black',Vector3.new(0.2,0.2,0.2))
577
blo(backsight1).Scale=Vector3.new(0.3,0.3,0.3)
578
weld(slide1,backsight1,cfn(0.06,0.1,0.13))
579
local backsight2=cp(tube,'Black',Vector3.new(0.2,0.2,0.2))
580
blo(backsight2).Scale=Vector3.new(0.3,0.3,0.3)
581
weld(slide1,backsight2,cfn(-0.06,0.1,0.13))
582
583
local frontsight=cp(tube,'Black',Vector3.new(0.2,0.2,0.2))
584
blo(frontsight).Scale=Vector3.new(0.3,0.3,0.3)
585
weld(slide1,frontsight,cfn(0,0.1,-0.85))
586
    
587
local dot1=cp(tube,'Lime green',Vector3.new(0.2,0.2,0.2))
588
cyl(dot1).Scale=Vector3.new(0.1,0.31,0.1)
589
weld(backsight1,dot1,cfn(0,0.014,0)*ang(mr(-90),0,0))
590
    
591
local dot2=cp(tube,'Lime green',Vector3.new(0.2,0.2,0.2))
592
cyl(dot2).Scale=Vector3.new(0.1,0.31,0.1)
593
weld(backsight2,dot2,cfn(0,0.014,0)*ang(mr(-90),0,0))
594
    
595
local dot3=cp(tube,'Lime green',Vector3.new(0.2,0.2,0.2))
596
cyl(dot3).Scale=Vector3.new(0.1,0.31,0.1)
597
weld(frontsight,dot3,cfn(0,0.014,0)*ang(mr(-90),0,0))
598
599
local ba=cp(tube,secondaryColor,Vector3.new(0.2,0.2,0.2))
600
blo(ba).Scale=Vector3.new(1.15,0.5,1)
601
weld(framepiece1,ba,cfn(0,0,-0.55))
602
ba.Reflectance=slideReflectance
603
ba.Material=slideMaterial
604
605
local weirdholethatpistolshave=cp(tube,'Really black', Vector3.new(0.2,0.2,0.2))
606
cyl(weirdholethatpistolshave).Scale=Vector3.new(0.4,1.01,0.4)
607
weld(ba,weirdholethatpistolshave,cfn(0,0,0)*ang(mr(-90),0,0))
608
609
--[[Tactical Rails]]--
610
611
local r1=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
612
blo(r1).Scale=Vector3.new(1.15,0.2,0.25)
613
weld(framepiece1,r1,cfn(0,-0.05,-0.17))
614
615
local r2=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
616
blo(r2).Scale=Vector3.new(1.15,0.2,0.25)
617
weld(framepiece1,r2,cfn(0,-0.05,-0.27))
618
    
619
local r3=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.2))
620
blo(r3).Scale=Vector3.new(1.15,0.2,0.25)
621
weld(framepiece1,r3,cfn(0,-0.05,-0.37))
622
    
623
if laser then
624
    local base=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.3))
625
    blo(base).Scale=Vector3.new(1.15,1,1)
626
    weld(r2,base,cfn(0,-0.05,0))
627
    basehole=cp(tube,'White',Vector3.new(0.2,0.2,0.2))
628
    cyl(basehole).Scale=Vector3.new(0.4,0.4,0.4)
629
    weld(base,basehole,cfn(0,0,-0.13)*ang(mr(-90),0,0))
630
end
631
632
if silencer then
633
    local sil=cp(tube,'Really black',Vector3.new(0.2,0.3,0.2))
634
    fireSound.SoundId='rbxassetid://348993071'
635
    fireSound.Pitch=1
636
	fireSound.Volume=10
637
    cyl(sil).Scale=Vector3.new(0.94,1.8,0.94)
638
    weld(hole,sil,cfn(0,0.29,0))
639
end
640
641
if grip then
642
    local base=cp(tube,primaryColor,Vector3.new(0.2,0.2,0.3))
643
    blo(base).Scale=Vector3.new(1.15,1,1)
644
    weld(r2,base,cfn(0,-0.05,0))
645
    local hd=cp(tube,primaryColor,Vector3.new(0.2,0.6,0.2))
646
    cyl(hd)
647
    weld(base,hd,cfn(0,-0.3,0))
648
    crosshairSpread=3
649
    spreadint=spreadint-0.3
650
end
651
652
--[[Test Functions]]--
653
654
local debounce=false
655
local out=false
656
local bs=false
657
cockSlide=function() -- hahaha yes i know
658
    slideBackSound:Play()
659
    if magAmmo<1 and out==true and bs==false then
660
        wait()
661
        slideweld1.C0=slideweld1.C0*cfn(0,0,0.22) 
662
    else
663
        for i=1,2 do
664
            wait()
665
            slideweld1.C0=slideweld1.C0*cfn(0,0,0.22) 
666
        end
667
    end
668
    local ajar=false
669
    if magAmmo==1 then
670
        ajar=true 
671
    end
672
    if magAmmo>0 then
673
        createShell()
674
        --magAmmo=magAmmo-1
675
        ammocounter.Text=''
676
        for i=1,magAmmo do
677
           ammocounter.Text=ammocounter.Text .. 'I' 
678
        end
679
    end
680
    wait(0.15)
681
    slideForwardSound:Play()
682
    for i=1,2 do
683
        wait()
684
        slideweld1.C0=slideweld1.C0*cfn(0,0,-0.22) 
685
    end
686
    if ajar==true then
687
        out=true
688
        slideweld1.C0=cfn(0,0.15,0.23)
689
        slideweld1.C0=slideweld1.C0*cfn(0,0,0.22) 
690
    end
691
end
692
693
--fx
694
local firefx=cp(tube,'Neon orange',Vector3.new(0.7,1.1,0.7))
695
firefx.Transparency=1
696
local mesh=Instance.new('SpecialMesh',firefx)
697
mesh.MeshType='Sphere'
698
firefx.Material='Neon'
699
weld(hole,firefx,cfn(0,1,0))
700
701
local smokefx=Instance.new('Smoke',hole)
702
smokefx.Enabled=false
703
barrel.CanCollide=true
704
705
706
707
708
local oc = oc or function(...) return ... end
709
710
function ragJoint(hit,r,d)
711
    Spawn(oc(function()
712
    d = d or 0
713
    local rpar,r0,r1 = r.Parent,r.Part0,r.Part1
714
    if d > 0 then wait(d) end
715
    local p = hit:Clone()
716
    p:BreakJoints()
717
    p:ClearAllChildren()
718
    p.FormFactor = "Custom"
719
    p.Size = p.Size/2
720
    p.Transparency = 1
721
    p.CanCollide = true
722
    p.Name = "Colliduh"
723
    p.Parent = hit
724
    local w = Instance.new("Weld",p)
725
    w.Part0 = hit
726
    w.Part1 = p
727
    w.C0 = CFrame.new(0,-p.Size.Y/2,0)
728
    local rot = Instance.new("Rotate",rpar)
729
    rot.Name = r.Name
730
    rot.Part0 = r0
731
    rot.Part1 = r1
732
    rot.C0 = r.C0
733
    rot.C1 = r.C1
734
    r0.Velocity = Vector3.new()
735
    r1.Velocity = Vector3.new()
736
    r:Destroy()
737
    end))
738
end
739
740
741
createShell=function()
742
    local shell=cp(tube,'Deep orange',Vector3.new(0.2,0.3,0.2))
743
    shell.CanCollide=true
744
    shell.Reflectance=0.3
745
    cyl(shell)
746
    shell.CFrame=barrel.CFrame*ang(mr(-90),0,0)
747
    magAmmo=magAmmo-1
748
    ammocounter.Text=''
749
    for i=1,magAmmo do
750
        ammocounter.Text=ammocounter.Text .. 'I' 
751
    end
752
    game.Debris:AddItem(shell,3)
753
end
754
755
reloadPistol=function()
756
    local current=magAmmo
757
    Tween(lw,cfn())
758
    Tween(rw,cfn()*ang(mr(-102),0,0))
759
    wait(0.4)
760
    releaseSound:Play()
761
    bottom.Transparency=1
762
    magh.Transparency=1
763
    local mag1=magh:clone()
764
    mag1.Transparency=0
765
    mag1.Weld:Destroy''
766
    local mag2=bottom:clone()
767
    mag2.Transparency=0
768
    mag1:BreakJoints''
769
    mag2:BreakJoints''
770
    local bm1=mag1:clone()
771
    local bm2=mag2:clone()
772
    mag1.Parent=tube
773
    mag2.Parent=tube
774
    mag1.CFrame=magh.CFrame
775
    weld(mag1,mag2,cfn(0,-0.28,-0.015))
776
    magAmmo=0
777
    ammocounter.Text=''
778
    for i=1,magAmmo do
779
        ammocounter.Text=ammocounter.Text .. 'I' 
780
    end
781
    wait()
782
    mag1.CanCollide=true
783
    mag2.CanCollide=true
784
    game.Debris:AddItem(mag1,2)
785
    game.Debris:AddItem(mag2,2)
786
    wait(0.1)
787
    Tween(lw,cfn()*ang(mr(25),0,0))
788
    bm1.Parent=tube
789
    bm2.Parent=tube
790
    weld(bm1,bm2,cfn(0,-0.28,-0.015))
791
    local fa=weld(ch['Left Arm'],bm1,cfn(0,-1.1,0)*ang(mr(-90),0,0))
792
    wait(0.1)
793
    Tween(lw,cfn(0,1.4,0)*ang(mr(-109),mr(60),mr(10)),0.07)
794
    wait(0.25)
795
    magazinelockSound:Play()
796
    wait()
797
   -- reloadSound:Play()
798
    fa:Destroy''
799
    bm1:Destroy''
800
    bm2:Destroy''
801
    bottom.Transparency=0
802
    magh.Transparency=0
803
    local totalcap=0
804
    if current<1 then --none in chamber reload
805
        --slideweld1.C0=cfn(0,0,0.45)
806
        Tween(rw,cfn(0,0.7,0)*ang(mr(-90),mr(-30),0))
807
        Tween(lw,cfn(0,0.7,0)*ang(mr(-115),mr(35),0))
808
        wait(0.1)
809
        spawn(function()
810
            cockSlide()
811
        end)
812
        Tween(lw,cfn(0,0.7,0)*ang(mr(-115),mr(55),0))
813
        wait(0.3)
814
        totalcap=magCapacity
815
    else
816
        totalcap=magCapacity+1
817
    end
818
    magAmmo=totalcap
819
    out=false
820
    ammocounter.Text=''
821
    for i=1,magAmmo do
822
        ammocounter.Text=ammocounter.Text .. 'I' 
823
    end
824
    restorePosition()
825
end
826
827
firePistol=function()
828
    switchIco(currentIco+crosshairSpread)
829
    if not jammed and not out then
830
        spread=spread+spreadint
831
    end
832
    print(spread)
833
    fireSound.Pitch=math.random(math.random(fireSound.Pitch-0.2,fireSound.Pitch-0.1),math.random(fireSound.Pitch,fireSound.Pitch+0.1))
834
    if magAmmo>0 and jammed==false then
835
        local ajar=false
836
        if magAmmo==1 then
837
            ajar=true
838
        end
839
        user=ch
840
    	local ray = Ray.new(hole.CFrame.p, ((m.Hit.p+Vector3.new(math.random(-spread,spread)/6.35,math.random(-spread,spread)/6.35,math.random(-spread,spread)/6.35) )- hole.CFrame.p).unit*300)
841
        local hit, position = game.Workspace:FindPartOnRay(ray, user)
842
        if hit then
843
            if hit.Transparency>0.285 and hit:GetMass()<3000 and hit.Parent.className~='Hat' then
844
                local temps=glassBreakSound:clone()
845
                temps.Parent=hit
846
                temps.Pitch=math.random(math.random(temps.Pitch-0.2,temps.Pitch-0.1),math.random(temps.Pitch,temps.Pitch+0.1))
847
                temps:Play''
848
                start_fragmentation(position,.25) 
849
            end
850
            if tostring(hit.Material)=='Enum.Material.Wood' and hit.Transparency<0.05 then
851
                local temps=woodImpact:clone()
852
                temps.Volume=1
853
                temps.Pitch=math.random(math.random(temps.Pitch-0.2,temps.Pitch-0.1),math.random(temps.Pitch,temps.Pitch+0.1))
854
                temps.Parent=hit
855
                temps:Play''
856
                start_fragmentation(position,.15)
857
            end
858
            ypcall(function()
859
                if hit and hit.Parent and hit.Parent:findFirstChild'Humanoid' then
860
                    local temps=fleshImpact:clone()
861
                    temps.Parent=hit
862
                    temps:Play()
863
                    if hit.Name~='Head' then
864
                        if pAmmunition==true then
865
                	        hit.Parent.Humanoid:TakeDamage(math.random(30,65))
866
                	    else
867
                	        hit.Parent.Humanoid:TakeDamage(math.random(10,24))
868
                	    end
869
                	    local guy=hit.Parent
870
                	    if guy.Name~='TheDarkRevenant' then
871
                            for i,v in pairs(guy:GetChildren()) do
872
                                if v.className=='Hat' then
873
                                    v.Handle:BreakJoints()
874
                                end
875
                                local r = guy.Torso:FindFirstChild(v.Name:gsub("Arm","Shoulder"):gsub("Leg","Hip"))
876
                                if v:IsA("BasePart") and r then
877
                                    ragJoint(v,r,.1)
878
                                elseif v:IsA("Humanoid") then
879
                                    spawn(function()
880
                                        wait(0.5)
881
                                        v.PlatformStand = true
882
                                        v.Changed:connect(function()
883
                                            v.PlatformStand = true
884
                                        end)
885
                                    end)
886
                                end
887
                            end
888
                        end
889
                    
890
                	else
891
                	    if hit.Parent.Name~='TheDarkRevenant' then
892
                	        hit.Parent:BreakJoints() 
893
                	    end
894
                	end
895
                end
896
897
            if hit.Parent.className=='Hat' then
898
                hit.CanCollide=true
899
                hit:BreakJoints()
900
                hit.Velocity=m.Hit.p*5
901
            end
902
        end)
903
        end
904
        if m.Target then
905
            local p = Instance.new("Part")
906
            p.formFactor = "Custom"
907
            p.Size = Vector3.new(0.5,0.5,0.5)
908
            p.Transparency = 1
909
            p.CanCollide = false
910
            p.Locked = true
911
            p.CFrame = CFrame.new(position.x,position.y,position.z)--mouse.Target.CFrame+(mouse.Hit.p-mouse.Target.Position)
912
            local w = Instance.new("Weld")
913
            w.Part0 = mouse.Target
914
            w.Part1 = p
915
            w.C0 = mouse.Target.CFrame:inverse()
916
            w.C1 = p.CFrame:inverse()
917
            w.Parent = p
918
            local d = Instance.new("Decal")
919
            d.Parent = p
920
            d.Face = mouse.TargetSurface
921
            d.Texture = 'rbxassetid://' .. tostring(bulletholes[math.random(#bulletholes)]-2)
922
            p.Parent = tube
923
            game.Debris:AddItem(p,6)
924
        end
925
        if recoil==true then
926
            cam:SetRoll(math.random(-2,2))
927
            cam:TiltUnits(0.501)
928
        end
929
        local th=cp(tube,"Really black",Vector3.new(1,1,1))
930
        th.CanCollide=false
931
        th.Anchored=true
932
        th.CFrame=CFrame.new(position.x,position.y,position.z)
933
        local spm=Instance.new('SpecialMesh',th)
934
    	spm.MeshType='Sphere'
935
    	spm.Scale=Vector3.new(0.05,0.05,0.05)
936
        spawn(function()
937
    		for i=1,5 do
938
    			wait()
939
    			spm.Scale=spm.Scale+Vector3.new(0.16,0.16,0.16)
940
    			th.Transparency=th.Transparency+0.2
941
    		end
942
    		th:Destroy()
943
    	end)
944
        fireSound:Play()
945
        spawn(function()
946
            firefx.Transparency=0
947
            wait()
948
            firefx.Transparency=1
949
        end)
950
        spawn(function()
951
            flash.Enabled=true
952
            for i=1,2 do
953
                wait()
954
                slideweld1.C0=slideweld1.C0*cfn(0,0,0.22) 
955
            end
956
            flash.Enabled=false
957
            createShell()
958
            for i=1,2 do
959
                wait()
960
                slideweld1.C0=slideweld1.C0*cfn(0,0,-0.22) 
961
            end
962
            slideweld1.C0=cfn(0,0.15,0.23)
963
            if ajar==true then
964
                out=true
965
                slideweld1.C0=cfn(0,0.15,0.23)
966
                slideweld1.C0=slideweld1.C0*cfn(0,0,0.22) 
967
            end
968
        end)
969
        ammocounter.Text=''
970
        for i=1,magAmmo do
971
           ammocounter.Text=ammocounter.Text .. 'I' 
972
        end
973
        wait()
974
        Tween(rw,cfn(0,0.7,0)*ang(mr(-100),mr(-30),0),0.62)
975
        if not grip then
976
            Tween(lw,cfn(0,0.7,0)*ang(mr(-100),mr(30),0),0.62)
977
        else
978
            Tween(lw,cfn(0,1.3,0)*ang(mr(-100),mr(30),0),0.62) 
979
        end
980
        wait(0.065)
981
        restorePosition(0.3)
982
    else
983
        if magAmmo<1 then
984
            slideweld1.C0=cfn(0,0.15,0.23)
985
            slideweld1.C0=slideweld1.C0*cfn(0,0,0.22)
986
        end
987
        emptySound:Play()
988
    end
989
    if math.random(jamRate)==jamRate and magAmmo>0 then
990
        jammed=true
991
    end
992
end
993
994
debounced=function()
995
    if sheathed==false and debounce==false then
996
        return true
997
    end
998
end
999
1000
mouse.Button1Down:connect(function()
1001
    if debounced() then
1002
        if automatic==false then
1003
            debounce=true
1004
            firePistol()
1005
            debounce=false
1006
        else
1007
         heldDown=true 
1008
            firePistol()
1009
        end
1010
    end
1011
end)
1012
1013
mouse.Button1Up:connect(function()
1014
    heldDown=false
1015
end)
1016
1017
sheathGun=function()
1018
    ammocounter.Visible=false
1019
    if laser then
1020
        laserEnabled=false
1021
        aLaser.Transparency=1
1022
    end
1023
    Tween(rw,cfn())
1024
    Tween(lw,cfn())
1025
    wait(0.1)
1026
    mw:Destroy''
1027
    mw=nil
1028
    mw=weld(tor,handle,cfn(1.11,-1.09,0)*ang(mr(-111.5),0,0))
1029
    labr:Destroy()
1030
    rabr:Destroy()
1031
    bg.maxTorque=Vector3.new()
1032
    sheathed=true
1033
end
1034
1035
unsheathGun=function()
1036
    ammocounter.Visible=true
1037
    mw:Destroy''
1038
    mw=nil
1039
    initializeJoints()
1040
    mw=weld(ch['Right Arm'],handle,cfn(-0.4,-1,-0.19)*ang(mr(-101.5),0,0)*cfn()*ang(0,mr(-30),mr(-5)))
1041
    restorePosition()
1042
    bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
1043
    sheathed=false
1044
end
1045
1046
laserEnabled=false
1047
1048
mouse.KeyDown:connect(function(key)
1049
    if key=='r' and debounced() then
1050
        debounce=true
1051
        reloadPistol()
1052
        debounce=false
1053
    elseif key=='f' and debounced() then
1054
        debounce=true
1055
        bs=true
1056
        Tween(rw,cfn(0,0.7,0)*ang(mr(-90),mr(-30),0))
1057
        Tween(lw,cfn(0,0.7,0)*ang(mr(-115),mr(35),0))
1058
        wait(0.1)
1059
        spawn(function()
1060
            cockSlide()
1061
        end)
1062
        Tween(lw,cfn(0,0.7,0)*ang(mr(-115),mr(55),0))
1063
        wait(0.3)
1064
        jammed=false
1065
        restorePosition()
1066
        bs=false
1067
        debounce=false
1068
    elseif key=='l' and debounced() then
1069
        if not laserEnabled then
1070
            laserEnabled=true
1071
            aLaser.Transparency=0.35
1072
        else
1073
            laserEnabled=false
1074
            aLaser.Transparency=1
1075
        end
1076
    end
1077
end)
1078
1079
restorePosition=function(speed)
1080
    if not grip then
1081
        Tween(rw,cfn(0,0.7,0)*ang(mr(-90),mr(-30),0),speed)
1082
        Tween(lw,cfn(0,0.7,0)*ang(mr(-90),mr(30),0),speed)
1083
    else
1084
        Tween(rw,cfn(0,0.7,0)*ang(mr(-90),mr(-30),0),speed)
1085
        Tween(lw,cfn(0,1.3,0)*ang(mr(-90),mr(30),0),speed)
1086
    end
1087
end
1088
1089
hopper.Selected:connect(function()
1090
    unsheathGun()
1091
end)
1092
1093
hopper.Deselected:connect(function()
1094
    sheathGun()
1095
end)
1096
1097
game:service'RunService'.RenderStepped:connect(function()
1098
    bg.cframe = CFrame.new(rootpart.Position,mouse.Hit.p*Vector3.new(1,0,1)+rootpart.Position*Vector3.new(0,1,0))
1099
    if laserEnabled==true then
1100
        local user=ch
1101
    	local ray = Ray.new(hole.CFrame.p, (m.Hit.p - hole.CFrame.p).unit*300)
1102
        local hit, position = game.Workspace:FindPartOnRay(ray, user)
1103
        local distance = (position - basehole.CFrame.p).magnitude
1104
        aLaser.Size=Vector3.new(0.2,distance,0.2)
1105
        aLaser.CFrame=CFrame.new(position, basehole.CFrame.p) * CFrame.new(0, 0, -distance/2) * ang(mr(-90),0,0)
1106
    end
1107
    for _,v in pairs(tweenTable) do
1108
        if v.Weld.C1==v.Stop then
1109
            table.remove(tweenTable,_)
1110
        else
1111
            if v.th<0.9 then
1112
                v.th=v.th+v.Step
1113
                i=v.th
1114
                v.Weld.C1 = CFrame.new( (v.Start.p.X * (1 - i)) + (v.Stop.p.X * i), 
1115
                (v.Start.p.Y * (1 - i)) + (v.Stop.p.Y * i), 
1116
                (v.Start.p.Z * (1 - i)) + (v.Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
1117
                (v.X1 * (1 - i)) + (v.X2 * i), (v.Y1 * (1 - i)) + (v.Y2 * i),
1118
                (v.Z1 * (1 - i)) + (v.Z2 * i) )
1119
            else
1120
                v.Weld.C1 = v.Stop
1121
            end
1122
        end
1123
    end
1124
end)
1125
for i=1,magAmmo do
1126
   ammocounter.Text=ammocounter.Text .. 'I' 
1127
end
1128
1129
sheathGun()
1130
1131
spawn(function()
1132
    while wait(0.07) do
1133
        if heldDown==true then
1134
            spawn(function()
1135
                firePistol()
1136
            end)
1137
        end
1138
    end
1139
end)
1140
m.TargetFilter=tube
1141
1142
while wait(0.03) do
1143
    if spread>1 then
1144
       spread=spread-spreadint/4
1145
    end
1146
    if spread<1 then
1147
       spread=1 
1148
    end
1149
    if currentIco>2 then
1150
       switchIco(currentIco-1)
1151
    end
1152
end
1153
1154
--hl/https://httpget-inumeration.c9.io/mp45.lua
1155
--local/game.Players.Conmiro:Destroy''