View difference between Paste ID: FHji2zUe and ZdzQdE3S
SHOW: | | - or go back to the newest paste.
1
--Mini Rocket Launcher Gifted by machontz, Local Script!
2
3-
myname = "shadowchd11"
3+
myname = "KeroroGunso2016"
4
me = game.Players[myname]
5
char = me.Character
6
name = "MiniRocketLauncher"
7
explodecolors = {"Really red", "Neon orange", "Bright red", "New Yeller", "Bright yellow", "Bright orange"}
8
sm = {"Really black", "Black"}
9
acceleratemax = 100
10
accelerateincrease = 0.55
11
MassDestruct = 100
12
MaxEnergy = 160
13
Energy = MaxEnergy
14
EnergyCost = 0.3
15
IncreaseEnergy = 10
16-
MaxSpeed = 120
16+
MaxSpeed = 300
17
MinSpeed = MaxSpeed/4
18
SpeedIncrease = 0.34
19
Speed = MinSpeed
20
21
function GiveHp(mass)
22
	return (mass*(mass/9.6)/9.6) + 8
23
end
24
25
function BrickDmg(d, part, pos)
26
	local dm = math.random(d/2.5,d/1.5)
27
	dm = (dm - (part.Position - pos.p).magnitude)
28
	if dm < 0 then dm = 0 end
29
	return dm
30
end
31
32
function CheckEnergy()
33
	if Energy > MaxEnergy then
34
		Energy = MaxEnergy
35
	elseif Energy < 0 then Energy = 0 end
36
end
37
38
hold = false
39
jethold = false
40
sel = false
41
abletofire = true
42-
JetsOn = false
42+
JetsOn = true
43-
Flying = false
43+
Flying = true 
44
order = 1
45
modes = {{"Normal", 6, 5400, 18, 32, 0.4, 7}, {"Accelerate", 7, 4200, 22, 5, 0.5, 9}, {"Machine gun", 4, 1400, 11, 65, 0.18, 3}, {"Blast", 11, 2000, 34, 23, 0.9, 13}}
46
mode = modes[order]
47
screenname = "MiniRocketGui"
48
necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) 
49
50
swoosh = Instance.new("Sound")
51
swoosh.Looped = true
52
swoosh.Volume = 0.4
53
swoosh.Pitch = 1.9
54
swoosh.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav"
55
56
bewm = Instance.new("Sound")
57
bewm.Looped = false
58
bewm.Volume = 0.7
59
bewm.Pitch = 1.5
60
bewm.SoundId = "http://www.roblox.com/asset/?id=2101148"
61
62
boom = Instance.new("Sound")
63
boom.Looped = false
64
boom.Volume = 0.5
65
boom.Pitch = 0.55
66
boom.SoundId = "http://www.roblox.com/asset/?id=2691586"
67
68
flys = Instance.new("Sound")
69
flys.Looped = true
70
flys.Volume = 0.8
71
flys.Pitch = 0.4
72
flys.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav"
73
74
function getnoobs(pos,dist)
75
	local stoof = {}
76
	local mods = {}
77
	for _,v in pairs(workspace:children()) do
78
		if v:IsA("BasePart") then
79
			if (v.Position - pos).magnitude < dist and v.Anchored == false then
80
				table.insert(stoof,v)
81
			end
82
		elseif v:IsA("Model") and v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v ~= char then
83
			if (v.Torso.Position - pos).magnitude < dist then
84
				table.insert(mods,v)
85
			end
86
		end
87
		for _,k in pairs(v:children()) do
88
			if k:IsA("BasePart") then
89
				if (k.Position - pos).magnitude < dist and k.Anchored == false then
90
					table.insert(stoof,k)
91
				end
92
			end
93
			for _,o in pairs(k:children()) do
94
				if o:IsA("BasePart") then
95
					if (o.Position - pos).magnitude < dist and o.Anchored == false then
96
						table.insert(stoof,o)
97
					end
98
				end
99
			end
100
		end
101
	end
102
	return stoof, mods
103
end
104
105
for i,v in pairs(me.PlayerGui:children()) do
106
	if v.Name == screenname then v:remove() end
107
end
108
109
screen = Instance.new("ScreenGui",me.PlayerGui)
110
screen.Name = screenname
111
112
fra = Instance.new("Frame",screen)
113
fra.Style = "RobloxRound"
114
fra.Size = UDim2.new(0,120,0,25)
115
fra.Position = UDim2.new(0.5,-60,0,0)
116
117
txt = Instance.new("TextLabel",fra)
118
txt.BackgroundTransparency = 1
119
txt.TextColor3 = Color3.new(1,1,1)
120
txt.Size = UDim2.new(1,0,1,0)
121
txt.Text = modes[order][1]
122
txt.FontSize = "Size12"
123
124
fra2 = Instance.new("Frame",screen)
125
fra2.BackgroundColor3 = Color3.new(0.1,0.2,0.4)
126
fra2.Size = UDim2.new(0,240,0,19)
127
fra2.Position = UDim2.new(0.5,-305,0,3)
128
129
energybar = Instance.new("Frame",fra2)
130
energybar.Size = UDim2.new(Energy/MaxEnergy,0,1,0)
131
energybar.BackgroundColor3 = Color3.new(0.1,0.3,0.9)
132
energybar.BorderSizePixel = 0
133
134
entext = Instance.new("TextLabel",fra2)
135
entext.BackgroundTransparency = 1
136
entext.TextColor3 = Color3.new(1,1,1)
137
entext.Size = UDim2.new(1,0,1,0)
138
entext.Text = Energy.."/"..MaxEnergy
139
entext.FontSize = "Size14"
140
141
sptext = Instance.new("TextLabel",fra)
142
sptext.BackgroundTransparency = 1
143
sptext.TextColor3 = Color3.new(1,1,1)
144
sptext.Position = UDim2.new(1.1,0,0.5,0)
145
sptext.Text = "0/0"
146
sptext.TextXAlignment = "Left"
147
sptext.FontSize = "Size14"
148
149
function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
150
part.Parent = parent
151
part.formFactor = form
152
part.CanCollide = collide
153
part.Transparency = tran
154
part.Reflectance = ref
155
part.Size = Vector3.new(x,y,z)
156
part.BrickColor = BrickColor.new(color)
157
part.TopSurface = 0
158
part.BottomSurface = 0
159
part.Anchored = anchor
160
part.Locked = true
161
part:BreakJoints()
162
end
163
164
function weld(w, p, p1, a, b, c, x, y, z)
165
w.Parent = p
166
w.Part0 = p
167
w.Part1 = p1
168
w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
169
end
170
171
function GetCF(pos1, pos2)
172
local pos4 = Vector3.new(pos2.X, pos1.Y, pos2.Z)
173
return CFrame.new(pos1, pos4)
174
end
175
176
rarm = char:findFirstChild("Right Arm")
177
larm = char:findFirstChild("Left Arm")
178
torso = char:findFirstChild("Torso")
179
hum = char:findFirstChild("Humanoid")
180
181
coroutine.resume(coroutine.create(function()
182
	while true do
183
		if Flying == false then
184
			Energy = Energy + IncreaseEnergy
185
		end
186
		CheckEnergy()
187
		local mag = torso.Velocity.magnitude
188
		local lolmag = mag
189
		local col = nil
190
		sptext.Text = math.floor(mag).."/"..MaxSpeed
191
		if lolmag > MaxSpeed then
192
			lolmag = MaxSpeed
193
			sptext.TextColor3 = Color3.new(1, 0, 0.2)
194
			sptext.Text = sptext.Text.."!!"
195
		else
196
			sptext.TextColor3 = Color3.new(lolmag/MaxSpeed, (lolmag/MaxSpeed)/1.7, 0)
197
		end
198
		energybar.Size = UDim2.new(Energy/MaxEnergy,0,1,0)
199
		entext.Text = math.floor(Energy).."/"..math.floor(MaxEnergy)
200
		wait()
201
	end
202
end))
203
204
flys.Parent = torso
205
206
bg = Instance.new("BodyGyro")
207
bg.P = 18000
208
bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
209
210
bv = Instance.new("BodyVelocity")
211
bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
212
213
for i,v in pairs(char:children()) do
214
	if v.Name == name then v:remove() end
215
end
216
217
launcher = Instance.new("Model")
218
launcher.Name = name
219
220
221
--[[LAUNCHER
222
LAUNCHER
223
LAUNCHER
224
LAUNCHER
225
LAUNCHER
226
LAUNCHER
227
LAUNCHER
228
LAUNCHER
229
]]
230
231
main = Instance.new("Part")
232
prop( main, launcher, false, 0, 0, 1.1, 0.6, 1.1, "Dark grey", false, "Custom" )
233
mainmesh = Instance.new("SpecialMesh",main)
234
mainmesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
235
mainmesh.Scale = Vector3.new(1.2,1.2,7)
236
weaponweld = Instance.new("Weld")
237
weld( weaponweld, rarm, main, math.pi / 2, 0, 0, 0, -0.3, 0 )
238
239
neck = Instance.new("Part")
240
prop( neck, launcher, false, 0, 0, 0.6, 1, 0.6, "Medium grey", false, "Custom" )
241
Instance.new("CylinderMesh",neck)
242
neckweld = Instance.new("Weld")
243
weld( neckweld, main, neck, 0, 0, 0, 0, 0, 0.1 )
244
245
pew = Instance.new("Part")
246
prop( pew, launcher, false, 0, 0, 0.9, 0.9, 1.5, "Dark grey", false, "Custom" )
247
Instance.new("SpecialMesh",pew).MeshType = "Sphere"
248
mehweld = Instance.new("Weld")
249
weld( mehweld, neck, pew, 0, 0, 0, 0, 0, -0.3 )
250
251
tube = Instance.new("Part")
252
prop( tube, launcher, false, 0, 0, 0.9, 0.9, 1.5, "Medium grey", false, "Custom" )
253
local tubemesh = mainmesh:clone()
254
tubemesh.Parent = tube
255
tubemesh.Scale = Vector3.new(0.9,0.9,8)
256
lolweld = Instance.new("Weld")
257
weld( lolweld, pew, tube, 0, 0, 0, 0, 0, 0.7 )
258
259
bewm.Parent = tube
260
261
missile = Instance.new("Part")
262
prop( missile, launcher, false, 0, 0, 0.1, 1.2, 0.1, "Really red", false, "Custom" )
263
local sp = Instance.new("SpecialMesh",missile)
264
sp.MeshType = "Sphere" sp.Scale = Vector3.new(0.6,1,0.6)
265
missweld = Instance.new("Weld")
266
weld( missweld, tube, missile, math.pi/2, 0, 0, 0, 0, -0.1 )
267
268
for x = -0.31, -0.15, 0.15 do
269
for i=0,360,60 do
270
local miss = Instance.new("Part")
271
prop( miss, launcher, false, 0, 0, 0.1, 1.2, 0.1, "Bright red", false, "Custom" )
272
local sp = Instance.new("SpecialMesh",miss)
273
sp.MeshType = "Sphere" sp.Scale = Vector3.new(0.6,1,0.6)
274
local miweld = Instance.new("Weld")
275
miweld.C0 = CFrame.Angles(0,math.rad(i),0)
276
weld( miweld, missile, miss, 0, 0, 0, x, 0, 0 )
277
end
278
end
279
280
--[[JET
281
JET
282
JET
283
JET
284
JET
285
JET
286
]]
287
288
Jets = {}
289
290
for i = -0.5, 0.5, 1 do
291
	local p = Instance.new("Part")
292
	prop(p, launcher, false, 0, 0, 1.2, 2.1, 0.2, "Medium grey", false, "Custom")
293
	local wl = Instance.new("Weld")
294
	weld(wl, torso, p, 0, 0, i, -i/1.3, 0, -0.5)
295
	
296
	local jet = Instance.new("Part")
297
	prop(jet, launcher, false, 0, 0, 0.6, 1.7, 0.6, "Dark grey", false, "Custom")
298
	Instance.new("CylinderMesh",jet)
299
	local wa = Instance.new("Weld")
300
	weld(wa, p, jet, 0, 0, -i, i*4, 1.2, -1)
301
	
302
	local ho = Instance.new("Part")
303
	prop(ho, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Medium grey", false, "Custom")
304
	local wad = Instance.new("Weld")
305
	weld(wad, jet, ho, math.pi/2, 0, 0, 0, 0.78, 0)
306
	
307
	local jets = Instance.new("Part")
308
	prop(jets, launcher, false, 0, 0.05, 0.8, 1.4, 0.8, "Dark grey", false, "Custom")
309
	Instance.new("SpecialMesh",jets)
310
	local wa2 = Instance.new("Weld")
311
	weld(wa2, ho, jets, 0, 0, 0, 0, 0.5, 0)
312
	
313
	local gas = Instance.new("Part")
314
	prop(gas, launcher, false, 0, 0, 1, 0.5, 1, "Medium grey", false, "Custom")
315
	Instance.new("SpecialMesh",gas)
316
	local wa3 = Instance.new("Weld")
317
	weld(wa3, jets, gas, 0, 0, 0, 0, 0.7, 0)
318
	
319
	table.insert(Jets, {wa2, gas, jets})
320
	
321
	for o = -0.3, 0.4, 0.6 do
322
		local p2 = Instance.new("Part")
323
		prop(p2, launcher, false, 0, 0.05, 0.8, 2.1, 0.2, "Dark grey", false, "Custom")
324
		local w2 = Instance.new("Weld")
325
		weld(w2, p, p2, -1.1, 0, o*1.6, -o*2.2, -1.26, -0.6)
326
		local p3 = Instance.new("Part")
327
		prop(p3, launcher, false, 0, 0, 1.3, 0.7, 0.4, "Bright red", false, "Custom")
328
		local w3 = Instance.new("Weld")
329
		weld(w3, p2, p3, 0, 0, 0, 0, -0.75, 0)
330
	end
331
end
332
333
rb = Instance.new("Part")
334
prop( rb, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
335
rh = Instance.new("Weld")
336
weld( rh, torso, rb, 0, 0, 0, -1.5, -0.5, 0)
337
338
lb = Instance.new("Part")
339
prop( lb, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
340
lh = Instance.new("Weld")
341
weld( lh, torso, lb, 0, 0, 0, 1.5, -0.5, 0)
342
343
rw = Instance.new("Weld")
344
weld(rw,rb,nil,0,0,0,0,0.5,0)
345
346
lw = Instance.new("Weld")
347
weld(lw,lb,nil,0,0,0,0,0.5,0)
348
349
rightbattle = nil
350
leftbattle = nil
351
352
launcher.Parent = char
353
354
selectmotion = function()
355
	rw.Part1 = rarm
356
	lw.Part1 = larm
357
	coroutine.resume(coroutine.create(function()
358
	for x = 0, 0.6, 0.1 do
359
		neckweld.C0 = CFrame.new(0,x*1.2,x/1.5)
360
		mehweld.C0 = CFrame.new(0,x,0)
361
		wait()
362
	end
363
	end))
364
	for i=0,90,10 do
365
		rw.C0 = CFrame.Angles(math.rad(i),0,0) * CFrame.new(math.rad(-i/3),math.rad(-i/4),0)
366
		lw.C0 = CFrame.Angles(math.rad(i),0,math.rad(i/2)) * CFrame.new(math.rad(i/3),math.rad(-i/1.7),0)
367
		wait()
368
	end
369
	if rightbattle == nil then
370
		rightbattle = rw.C0
371
		leftbattle = lw.C0
372
	end
373
end
374
375
deselmotion = function()
376
	coroutine.resume(coroutine.create(function()
377
	for x = 0.6, 0, -0.1 do
378
		neckweld.C0 = CFrame.new(0,x*1.2,x)
379
		mehweld.C0 = CFrame.new(0,x,0)
380
		wait()
381
	end
382
	end))
383
	for i=90,0,-10 do
384
		rw.C0 = CFrame.Angles(math.rad(i),0,0) * CFrame.new(math.rad(-i/3),math.rad(-i/4),0)
385
		lw.C0 = CFrame.Angles(math.rad(i),0,math.rad(i/2)) * CFrame.new(math.rad(i/3),math.rad(-i/1.7),0)
386
		wait()
387
	end
388
	rw.Part1 = nil
389
	lw.Part1 = nil
390
end
391
392
effect = function()
393
	local pos = tube.CFrame * CFrame.new(0,0,-0.8)
394
	local p = Instance.new("Part")
395
	prop( p, workspace, false, 0, 0, 1, 1, 1, "Neon orange", true, "Custom" )
396
	p.CFrame = pos
397
	local pwn = Instance.new("SpecialMesh",p)
398
	pwn.Scale = Vector3.new(0.5,0.4,0.5)
399
	pwn.MeshId = "http://www.roblox.com/asset/?id=20329976"
400
	for i=0.2,1.5,0.3 do
401
		pwn.Scale = Vector3.new(i,i/1.4,i)
402
		p.CFrame = pos * CFrame.Angles(-math.pi/2,i,0)
403
		p.Transparency = (i/1.5)-0.2
404
		wait()
405
	end
406
	p:remove()
407
end
408
409
movearm = function()
410
	bewm:play()
411
	local rp, lp = rw.C0, lw.C0
412
	for i=0,30,30/2 do
413
		rw.C0 = rp * CFrame.Angles(math.rad(i/3),0,0) * CFrame.new(0,math.rad(i/3),0)
414
		lw.C0 = lp * CFrame.Angles(math.rad(i/5),0,0) * CFrame.new(0,math.rad(i/5),0)
415
		wait()
416
	end
417
	for i=30,0,-30/3 do
418
		rw.C0 = rp * CFrame.Angles(math.rad(i/3),0,0) * CFrame.new(0,math.rad(i/3),0)
419
		lw.C0 = lp * CFrame.Angles(math.rad(i/5),0,0) * CFrame.new(0,math.rad(i/5),0)
420
		wait()
421
	end
422
end
423
424
explode = function(p,s,mo)
425
	s:stop()
426
	local exdmg = mo[4]
427
	local exdist = mo[2]
428
	local expl = Instance.new("Model",workspace)
429
	expl.Name = "xS explode"
430
	local pos = CFrame.new(p.Position)
431
	local parts, hums = getnoobs(pos.p, exdist)
432
	local p = Instance.new("Part")
433
	prop(p,expl,false,1,0,1,1,1,1,true,"Brick")
434
	p.CFrame = pos
435
	local poo = boom:clone()
436
	poo.Parent = p
437
	poo:play()
438
	for i,v in pairs(parts) do
439
		local minus = BrickDmg(exdmg, v, pos)
440
		if v:GetMass() < MassDestruct and v.Parent:findFirstChild("Humanoid") == nil and v.Parent ~= launcher then
441
			local hp = v:findFirstChild("Hp")
442
			if hp ~= nil then
443
				hp.Value = hp.Value - minus
444
				if hp.Value <= 0 then
445
					v:breakJoints()
446
				end
447
			else
448
				local lol = Instance.new("IntValue")
449
				lol.Name = "Hp"
450
				lol.Value = GiveHp(v:GetMass())
451
				lol.Parent = v
452
				lol.Changed:connect(function()
453
					if lol.Value <= 0 then
454
						v:breakJoints()
455
					end
456
				end)
457
				lol.Value = lol.Value - minus
458
			end
459
		end
460
		local teehee = minus*1.2
461
		v.Velocity = CFrame.new(pos.p, v.Position).lookVector * teehee
462
		v.RotVelocity = Vector3.new(math.random(-teehee,teehee), math.random(-teehee,teehee), math.random(-teehee,teehee))
463
	end
464
	for i,v in pairs(hums) do
465
		v.Humanoid.Health = v.Humanoid.Health - math.random(exdmg/1.3,exdmg*1.3)
466
	end
467
	for i=1,math.random(7,14) do
468
		local spike = Instance.new("Part")
469
		prop( spike, workspace, false, 0, 0, 1, 1, 1, explodecolors[math.random(1,#explodecolors)], true, "Custom" )
470
		local a,b,c = math.random(-32,32)/10, math.random(-32,32)/10, math.random(-32,32)/10
471
		spike.CFrame = pos * CFrame.Angles(a,b,c) * CFrame.new(0,exdist/6,0)
472
		local mes = Instance.new("SpecialMesh",spike)
473
		mes.MeshId = "http://www.roblox.com/asset/?id=1033714"
474
		mes.Scale = Vector3.new(math.random(exdist*1.3,exdist*2.5)/10,math.random(exdist*5,exdist*10)/10,math.random(exdist*1.3,exdist*2.5)/10)
475
		local cf = spike.CFrame
476
		coroutine.resume(coroutine.create(function()
477
			local wah = exdist*1.2
478
			for y=0,wah,math.random(wah/12,wah/7) do
479
				wait()
480
				spike.CFrame = cf * CFrame.new(0,y,0)
481
				spike.Transparency = (y/wah) - 0.08
482
			end
483
			spike:remove()
484
		end))
485
	end
486
	coroutine.resume(coroutine.create(function()
487
	for i=1,math.random(2,6) do
488
		wait()
489
		local siz = math.random((exdist/3)*10, (exdist/1.8)*10)/10
490
		local pk = Instance.new("Part")
491
		prop(pk, workspace, false, 0.1, 0, 1, 1, 1, explodecolors[math.random(1,#explodecolors)], true, "Custom" )
492
		pk.CFrame = pos * CFrame.new(math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25)
493
		local ms = Instance.new("SpecialMesh",pk)
494
		ms.MeshType = "Sphere"
495
		ms.Scale = Vector3.new(siz,siz,siz)
496
		coroutine.resume(coroutine.create(function()
497
			for x=0.1, 1, 0.15 do
498
				wait()
499
				pk.Transparency = x
500
			end
501
			pk:remove()
502
		end))
503
	end
504
	end))
505
	coroutine.resume(coroutine.create(function()
506
		for b=1,math.random(6,13) do
507
			wait()
508
			local siz = math.random((exdist/4)*10, (exdist/2.8)*10)/10
509
			local pk = Instance.new("Part")
510
			prop(pk, workspace, false, 0.1, 0, 1, 1, 1, sm[math.random(1,#sm)], true, "Custom" )
511
			pk.CFrame = pos * CFrame.new(math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25)
512
			local ms = Instance.new("SpecialMesh",pk)
513
			ms.MeshType = "Sphere"
514
			ms.Scale = Vector3.new(siz,siz,siz)
515
			local trul = pk.CFrame
516
			coroutine.resume(coroutine.create(function()
517
				for x=0.1, 1, 0.2 do
518
					wait()
519
					pk.Transparency = x
520
					pk.CFrame = trul * CFrame.Angles(math.random(-35,35)/100,math.random(-35,35)/100,math.random(-35,35)/100) * CFrame.new(0,x*4,0)
521
				end
522
				pk:remove()
523
			end))
524
		end
525
	end))
526
	wait(1)
527
	expl:remove()
528
end
529
530
function smoke(p)
531
	while p.Parent ~= nil do
532
		wait(0.11)
533
		local siz = math.random(4,12)/10
534
		local sp = Instance.new("Part")
535
		prop(sp,workspace,false,0.1,0,siz,siz,siz,sm[math.random(1,#sm)],true,"Custom")
536
		sp.CFrame = p.CFrame * CFrame.new(0,0,0.8) * CFrame.Angles(math.random(-6,6)/10, math.random(-6,6)/10, math.random(-6,6)/10)
537
		local sme = Instance.new("SpecialMesh",sp)
538
		sme.MeshType = "Sphere"
539
		local c = sp.CFrame
540
		coroutine.resume(coroutine.create(function()
541
			for i=0.1, 1, 0.2 do
542
				wait()
543
				sp.CFrame = c * CFrame.new(0,0,i*4)
544
				sp.Transparency = i
545
				sme.Scale = Vector3.new(1+i,1+i,1+i)
546
			end
547
			sp:remove()
548
		end))
549
	end
550
end
551
552
function smokejet(p)
553
	while Flying do
554
		wait(0.06)
555
		for _,v in pairs(p) do
556
			local siz = math.random(5,15)/10
557
			local sp = Instance.new("Part")
558
			prop(sp,workspace,false,0.1,0,siz,siz,siz,sm[math.random(1,#sm)],true,"Custom")
559
			sp.CFrame = v[2].CFrame * CFrame.new(0,-0.3,0) * CFrame.Angles(math.random(-6,6)/10, math.random(-6,6)/10, math.random(-6,6)/10)
560
			local sme = Instance.new("SpecialMesh",sp)
561
			sme.MeshType = "Sphere"
562
			local fi = Instance.new("Part")
563
			prop(fi,workspace,false,0.1,0,siz,siz,siz,explodecolors[math.random(1,#explodecolors)],true,"Custom")
564
			fi.CFrame = v[2].CFrame * CFrame.new(0,-0.3,0)* CFrame.Angles(math.pi,0,0) * CFrame.Angles(math.random(-3,3)/10, math.random(-3,3)/10, math.random(-3,3)/10)
565
			local fmes = Instance.new("SpecialMesh",fi)
566
			fmes.Scale = Vector3.new(0.4,0.5,0.4)
567
			fmes.MeshId = "http://www.roblox.com/asset/?id=20329976"
568
			local c, c2 = sp.CFrame, fi.CFrame
569
			coroutine.resume(coroutine.create(function()
570
				for i=0.1, 2, 0.18 do
571
					wait()
572
					sp.CFrame = c * CFrame.new(0,-i*3,0) + Vector3.new(0,i*4,0)
573
					sp.Transparency = i/2.2
574
					fi.Transparency = i/2
575
					fi.CFrame = c2 * CFrame.new(0,i*2,0)
576
					fmes.Scale = Vector3.new(0.4+(i/1.8),0.5+(i/1.8),0.4+(i/1.8))
577
					sme.Scale = Vector3.new(1+(i/1.4),1+(i/1.4),1+(i/1.4))
578
				end
579
				sp:remove()
580
				fi:remove()
581
			end))
582
		end
583
	end
584
end
585
586
fly = function()
587
	if Flying == false and JetsOn == false and Energy >= EnergyCost then
588
	bv.Parent = torso
589
	Flying = true
590
	coroutine.resume(coroutine.create(function()
591
	smokejet(Jets, Flying)
592
	end))
593
	flys:play()
594
	Speed = MinSpeed
595
	while jethold do
596
		if Energy <= 0 then break end
597
		if Speed < MaxSpeed then
598
			Speed = Speed + SpeedIncrease
599
		else Speed = MaxSpeed end
600
		local cf = Jets[1][3].CFrame * CFrame.Angles(math.pi/2,0,0)
601
		bv.velocity = cf.lookVector * Speed
602
		Energy = Energy - EnergyCost
603
		wait()
604
		bv.velocity = Vector3.new(0,0,0)
605
	end
606
	local ha = math.random(1,2) if ha == 1 then flys:stop() else flys:pause() end
607
	bv.Parent = nil
608
	bv.velocity = Vector3.new(0,0,0)
609
	Speed = MinSpeed
610
	wait(0.3)
611
	Flying = false
612
	end
613
end
614
615
fire = function(mousepos, pos, target)
616
617
	local moda = mode
618
	
619
	if Energy >= moda[7] then
620
	Energy = Energy - moda[7]
621
	coroutine.resume(coroutine.create(effect))
622
	local hitable = true
623
	local pewm = Instance.new("Part")
624
	prop( pewm, nil, false, 0, 0, 0.4, 0.4, 0.7, "Medium grey", false, "Custom" )
625
	Instance.new("SpecialMesh",pewm).MeshType = "Sphere"
626
627
	local projectile = Instance.new("Part")
628
	prop( projectile, workspace, false, 0, 0, 0.3, 0.3, 1.3, "Bright red", false, "Custom" )
629
	Instance.new("SpecialMesh",projectile).MeshType = "Sphere"
630
631
	local wi = Instance.new("Weld")
632
	weld(wi,projectile,nil,0,0,0,0,0,-0.4)
633
634
	local swo = swoosh:clone()
635
	swo.Parent = projectile
636
	swo:play()
637
	local bv = nil
638
	local sped = 0
639
640
	coroutine.resume(coroutine.create(function() wait(0.8) smoke(projectile) end))
641
	coroutine.resume(coroutine.create(function() wait(7) if projectile.Parent ~= nil then coroutine.resume(coroutine.create(function() explode(projectile, swo, moda) end)) projectile:remove() end end))
642
	coroutine.resume(coroutine.create(movearm))
643
	coroutine.resume(coroutine.create(function()
644
		repeat wait() until bv ~= nil
645
		if moda[1] == "Accelerate" then
646
			for i = moda[5], acceleratemax, accelerateincrease do
647
				sped = i
648
				wait()
649
			end
650
		else
651
			sped = moda[5]
652
		end
653
	end))
654
	projectile.Touched:connect(function(hit)
655
		if hit.CanCollide == true and hit:GetMass() >= 3.5 and hitable then
656
			coroutine.resume(coroutine.create(function() hitable = false explode(projectile, swo, moda) end))
657
			projectile:remove()
658
		end
659
	end)
660
	projectile.CFrame = pos * CFrame.new(0,0,-1)
661
	pewm.Parent = projectile
662
	pewm.CFrame = projectile.CFrame
663
	wi.Part1 = pewm
664
	local bg = Instance.new("BodyGyro")
665
	bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
666
	bg.P = moda[3]
667
	bg.Parent = projectile
668
	bg.cframe = CFrame.new(projectile.Position, projectile.CFrame * CFrame.new(0,0,-10).p)
669
	bv = Instance.new("BodyVelocity")
670
	bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
671
	bv.velocity = projectile.CFrame.lookVector * sped
672
	bv.Parent = projectile
673
	if target ~= nil then
674
		local lolpos = target.CFrame:pointToObjectSpace(mousepos)
675
		repeat
676
			wait()
677
			bg.cframe = CFrame.new(projectile.Position, target.CFrame * CFrame.new(lolpos).p)
678
			bv.velocity = projectile.CFrame.lookVector * sped
679
		until (projectile.Position - target.CFrame * CFrame.new(lolpos).p).magnitude < 2
680
		if hitable then
681
			hitable = false
682
			coroutine.resume(coroutine.create(function() explode(projectile, swo, moda) end))
683
			projectile:remove()
684
		end
685
	else
686
		local lolaha = mousepos
687
		projectile.CFrame = CFrame.new(pos.p, mousepos)
688
		repeat
689
			wait()
690
			bv.velocity = projectile.CFrame.lookVector * sped
691
			bg.cframe = CFrame.new(projectile.Position, lolaha)
692
		until projectile.Parent == nil
693
	end
694
	end
695
end
696
697
if script.Parent.className ~= "HopperBin" then
698
	h = Instance.new("HopperBin",me.Backpack)
699
	h.Name = "MiniRocket"
700
	script.Parent = h
701
end
702
703
bin = script.Parent
704
705
function select(mouse)
706
	selectmotion()
707
	mouse.Icon = "http://www.roblox.com/asset/?id=45117007"
708
	sel = true
709
	coroutine.resume(coroutine.create(function()
710
		for i=1,4 do
711
			bg.Parent = nil
712
			wait()
713
			bg.Parent = torso
714
		end
715
	end))
716
	coroutine.resume(coroutine.create(function()
717
		while sel do 
718
			local po = torso.Position+Vector3.new(0,0.85,0)
719
			local offset=(po.Y-mouse.Hit.p.Y)/60 
720
			local mag=(po-mouse.Hit.p).magnitude/80 
721
			offset=offset/mag 
722
			torso.Neck.C0 = necko * CFrame.Angles(offset,0,0) 
723
			rw.C0 = rightbattle * CFrame.Angles(-offset, 0,0) 
724
			lw.C0 = leftbattle * CFrame.Angles(-offset,0,0) 
725
			for i,v in pairs(Jets) do
726
				v[1].C0 = CFrame.Angles(offset,0,0) 
727
			end
728
			bg.cframe = GetCF(torso.Position, mouse.Hit.p)
729
			wait() 
730
		end --Fenrier was here o3o
731
		rw.C0 = rightbattle
732
		lw.C0 = leftbattle
733
		torso.Neck.C0 = necko
734
	end))
735
	mouse.Button1Down:connect(function()
736
		hold = true
737
		while hold do
738
			coroutine.resume(coroutine.create(function() fire(mouse.Hit.p, tube.CFrame, mouse.Target) end))
739
			for i=0,mode[6],0.03 do
740
				if hold == false then break end
741
				wait()
742
			end
743
		end
744
	end)
745
	mouse.Button1Up:connect(function() hold = false end)
746
	mouse.KeyDown:connect(function(key)
747
		key = key:lower()
748
		if key == "e" then
749
			order = order + 1
750
			if order > #modes then
751
				order = 1
752
			end
753
			mode = modes[order]
754
			txt.Text = mode[1]
755
		elseif key == "q" then
756
			order = order - 1
757
			if order < 1 then
758
				order = #modes
759
			end
760
			mode = modes[order]
761
			txt.Text = mode[1]
762
		elseif key == string.char(48) then
763
			jethold = true
764
			fly()
765
		end
766
	end)
767
	mouse.KeyUp:connect(function(key)
768
		key = key:lower()
769
		if key == string.char(48) then
770
			jethold = false
771
		end
772
	end)
773
end
774
775
function desel()
776
	sel = false
777
	bg.Parent = nil
778
	deselmotion()
779
end
780
781
bin.Selected:connect(select)
782
bin.Deselected:connect(desel)