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