View difference between Paste ID: 6yqhne95 and WmfgCN2u
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--||			   CREATED BY SHACKLUSTER
3
--\\====================================================//--
4
5
6
7
wait(0.2)
8
9
10
11
Player = game:GetService("Players").LocalPlayer
12
PlayerGui = Player.PlayerGui
13
Cam = workspace.CurrentCamera
14
Backpack = Player.Backpack
15
Character = Player.Character
16
Humanoid = Character.Humanoid
17
Mouse = Player:GetMouse()
18
RootPart = Character["HumanoidRootPart"]
19
Torso = Character["Torso"]
20
Head = Character["Head"]
21
RightArm = Character["Right Arm"]
22
LeftArm = Character["Left Arm"]
23
RightLeg = Character["Right Leg"]
24
LeftLeg = Character["Left Leg"]
25
RootJoint = RootPart["RootJoint"]
26
Neck = Torso["Neck"]
27
RightShoulder = Torso["Right Shoulder"]
28
LeftShoulder = Torso["Left Shoulder"]
29
RightHip = Torso["Right Hip"]
30
LeftHip = Torso["Left Hip"]
31
32
IT = Instance.new
33
CF = CFrame.new
34
VT = Vector3.new
35
RAD = math.rad
36
C3 = Color3.new
37
UD2 = UDim2.new
38
BRICKC = BrickColor.new
39
ANGLES = CFrame.Angles
40
EULER = CFrame.fromEulerAnglesXYZ
41
COS = math.cos
42
ACOS = math.acos
43
SIN = math.sin
44
ASIN = math.asin
45
ABS = math.abs
46
MRANDOM = math.random
47
FLOOR = math.floor
48
49
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
50
	local NEWMESH = IT(MESH)
51
	if MESH == "SpecialMesh" then
52
		NEWMESH.MeshType = MESHTYPE
53
		if MESHID ~= "nil" and MESHID ~= "" then
54
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
55
		end
56
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
57
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
58
		end
59
	end
60
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
61
	NEWMESH.Scale = SCALE
62
	NEWMESH.Parent = PARENT
63
	return NEWMESH
64
end
65
66
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
67
	local NEWPART = IT("Part")
68
	NEWPART.formFactor = FORMFACTOR
69
	NEWPART.Reflectance = REFLECTANCE
70
	NEWPART.Transparency = TRANSPARENCY
71
	NEWPART.CanCollide = false
72
	NEWPART.Locked = true
73
	NEWPART.Anchored = true
74
	if ANCHOR == false then
75
		NEWPART.Anchored = false
76
	end
77
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
78
	NEWPART.Name = NAME
79
	NEWPART.Size = SIZE
80
	NEWPART.Position = Torso.Position
81
	NEWPART.Material = MATERIAL
82
	NEWPART:BreakJoints()
83
	NEWPART.Parent = PARENT
84
	return NEWPART
85
end
86
87
--//=================================\\
88
--||		  CUSTOMIZATION
89
--\\=================================//
90
91
Player_Size = 1 --Size of the player.
92
Animation_Speed = 3
93
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
94
95
local Speed = 16
96
local Effects2 = {}
97
98
--//=================================\\
99
--|| 	  END OF CUSTOMIZATION
100
--\\=================================//
101
102
	local function weldBetween(a, b)
103
	    local weldd = Instance.new("ManualWeld")
104
	    weldd.Part0 = a
105
	    weldd.Part1 = b
106
	    weldd.C0 = CFrame.new()
107
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
108
	    weldd.Parent = a
109
	    return weldd
110
	end
111
112
--//=================================\\
113
--|| 	      USEFUL VALUES
114
--\\=================================//
115
116
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
117
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
118
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
119
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
120
local CHANGEDEFENSE = 0
121
local CHANGEDAMAGE = 0
122
local CHANGEMOVEMENT = 0
123
local ANIM = "Idle"
124
local ATTACK = false
125
local EQUIPPED = false
126
local HOLD = false
127
local COMBO = 1
128
local Rooted = false
129
local SINE = 0
130
local KEYHOLD = false
131
local CHANGE = 2 / Animation_Speed
132
local WALKINGANIM = false
133
local WALK = 0
134
local VALUE1 = false
135
local VALUE2 = false
136
local ROBLOXIDLEANIMATION = IT("Animation")
137
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
138
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
139
--ROBLOXIDLEANIMATION.Parent = Humanoid
140
local WEAPONGUI = IT("ScreenGui", PlayerGui)
141
WEAPONGUI.Name = "Weapon GUI"
142
local Weapon = IT("Model")
143
Weapon.Name = "Adds"
144
local Effects = IT("Folder", Weapon)
145
Effects.Name = "Effects"
146
local ANIMATOR = Humanoid.Animator
147
local ANIMATE = Character.Animate
148
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
149
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
150
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
151
local HITBLOCKSOUNDS = {"199148933", "199148947"}
152
local UNANCHOR = true
153
154
local SKILLTEXTCOLOR = C3(0,0,0)
155
156
local SONGS = {"251074756","203547439","1260890742","462506896","251999524","1110421128"}
157
local SONGPLAYING = false
158
local SELECTEDSONG = 1
159
160
--//=================================\\
161
--\\=================================//
162
163
164
--//=================================\\
165
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
166
--\\=================================//
167
168
ArtificialHB = Instance.new("BindableEvent", script)
169
ArtificialHB.Name = "ArtificialHB"
170
171
script:WaitForChild("ArtificialHB")
172
173
frame = Frame_Speed
174
tf = 0
175
allowframeloss = false
176
tossremainder = false
177
lastframe = tick()
178
script.ArtificialHB:Fire()
179
180
game:GetService("RunService").Heartbeat:connect(function(s, p)
181
	tf = tf + s
182
	if tf >= frame then
183
		if allowframeloss then
184
			script.ArtificialHB:Fire()
185
			lastframe = tick()
186
		else
187
			for i = 1, math.floor(tf / frame) do
188
				script.ArtificialHB:Fire()
189
			end
190
		lastframe = tick()
191
		end
192
		if tossremainder then
193
			tf = 0
194
		else
195
			tf = tf - frame * math.floor(tf / frame)
196
		end
197
	end
198
end)
199
200
--//=================================\\
201
--\\=================================//
202
203
204
205
206
207
--//=================================\\
208
--|| 	      SOME FUNCTIONS
209
--\\=================================//
210
211
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
212
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
213
end
214
215
function PositiveAngle(NUMBER)
216
	if NUMBER >= 0 then
217
		NUMBER = 0
218
	end
219
	return NUMBER
220
end
221
222
function NegativeAngle(NUMBER)
223
	if NUMBER <= 0 then
224
		NUMBER = 0
225
	end
226
	return NUMBER
227
end
228
229
function Swait(NUMBER)
230
	if NUMBER == 0 or NUMBER == nil then
231
		ArtificialHB.Event:wait()
232
	else
233
		for i = 1, NUMBER do
234
			ArtificialHB.Event:wait()
235
		end
236
	end
237
end
238
239
function QuaternionFromCFrame(cf)
240
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
241
	local trace = m00 + m11 + m22
242
	if trace > 0 then 
243
		local s = math.sqrt(1 + trace)
244
		local recip = 0.5 / s
245
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
246
	else
247
		local i = 0
248
		if m11 > m00 then
249
			i = 1
250
		end
251
		if m22 > (i == 0 and m00 or m11) then
252
			i = 2
253
		end
254
		if i == 0 then
255
			local s = math.sqrt(m00 - m11 - m22 + 1)
256
			local recip = 0.5 / s
257
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
258
		elseif i == 1 then
259
			local s = math.sqrt(m11 - m22 - m00 + 1)
260
			local recip = 0.5 / s
261
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
262
		elseif i == 2 then
263
			local s = math.sqrt(m22 - m00 - m11 + 1)
264
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
265
		end
266
	end
267
end
268
 
269
function QuaternionToCFrame(px, py, pz, x, y, z, w)
270
	local xs, ys, zs = x + x, y + y, z + z
271
	local wx, wy, wz = w * xs, w * ys, w * zs
272
	local xx = x * xs
273
	local xy = x * ys
274
	local xz = x * zs
275
	local yy = y * ys
276
	local yz = y * zs
277
	local zz = z * zs
278
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
279
end
280
 
281
function QuaternionSlerp(a, b, t)
282
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
283
	local startInterp, finishInterp;
284
	if cosTheta >= 0.0001 then
285
		if (1 - cosTheta) > 0.0001 then
286
			local theta = ACOS(cosTheta)
287
			local invSinTheta = 1 / SIN(theta)
288
			startInterp = SIN((1 - t) * theta) * invSinTheta
289
			finishInterp = SIN(t * theta) * invSinTheta
290
		else
291
			startInterp = 1 - t
292
			finishInterp = t
293
		end
294
	else
295
		if (1 + cosTheta) > 0.0001 then
296
			local theta = ACOS(-cosTheta)
297
			local invSinTheta = 1 / SIN(theta)
298
			startInterp = SIN((t - 1) * theta) * invSinTheta
299
			finishInterp = SIN(t * theta) * invSinTheta
300
		else
301
			startInterp = t - 1
302
			finishInterp = t
303
		end
304
	end
305
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
306
end
307
308
function Clerp(a, b, t)
309
	local qa = {QuaternionFromCFrame(a)}
310
	local qb = {QuaternionFromCFrame(b)}
311
	local ax, ay, az = a.x, a.y, a.z
312
	local bx, by, bz = b.x, b.y, b.z
313
	local _t = 1 - t
314
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
315
end
316
317
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
318
	local frame = IT("Frame")
319
	frame.BackgroundTransparency = TRANSPARENCY
320
	frame.BorderSizePixel = BORDERSIZEPIXEL
321
	frame.Position = POSITION
322
	frame.Size = SIZE
323
	frame.BackgroundColor3 = COLOR
324
	frame.BorderColor3 = BORDERCOLOR
325
	frame.Name = NAME
326
	frame.Parent = PARENT
327
	return frame
328
end
329
330
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
331
	local label = IT("TextLabel")
332
	label.BackgroundTransparency = 1
333
	label.Size = UD2(1, 0, 1, 0)
334
	label.Position = UD2(0, 0, 0, 0)
335
	label.TextColor3 = TEXTCOLOR
336
	label.TextStrokeTransparency = STROKETRANSPARENCY
337
	label.TextTransparency = TRANSPARENCY
338
	label.FontSize = TEXTFONTSIZE
339
	label.Font = TEXTFONT
340
	label.BorderSizePixel = BORDERSIZEPIXEL
341
	label.TextScaled = false
342
	label.Text = TEXT
343
	label.Name = NAME
344
	label.Parent = PARENT
345
	return label
346
end
347
348
function NoOutlines(PART)
349
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
350
end
351
352
353
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
354
	local NEWWELD = IT(TYPE)
355
	NEWWELD.Part0 = PART0
356
	NEWWELD.Part1 = PART1
357
	NEWWELD.C0 = C0
358
	NEWWELD.C1 = C1
359
	NEWWELD.Parent = PARENT
360
	return NEWWELD
361
end
362
363
function CreateSound(ID, PARENT, VOLUME, PITCH, DEBRISTIME)
364
	local NEWSOUND = nil
365
	coroutine.resume(coroutine.create(function()
366
		NEWSOUND = IT("Sound", PARENT)
367
		NEWSOUND.Volume = VOLUME
368
		NEWSOUND.Pitch = PITCH
369
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
370
		Swait()
371
		NEWSOUND:play()
372
		NEWSOUND.Name = "Audio"
373
		if DEBRISTIME ~= nil then
374
			game:GetService("Debris"):AddItem(NEWSOUND, DEBRISTIME)
375
		end
376
	end))
377
	return NEWSOUND
378
end
379
380
function CFrameFromTopBack(at, top, back)
381
	local right = top:Cross(back)
382
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
383
end
384
385
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
386
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
387
	local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
388
	wave.CFrame = CFRAME
389
	coroutine.resume(coroutine.create(function(PART)
390
		for i = 1, WAIT do
391
			Swait()
392
			mesh.Scale = mesh.Scale + GROW
393
			wave.Transparency = wave.Transparency + (1/WAIT)
394
			if wave.Transparency > 0.99 then
395
				wave:remove()
396
			end
397
		end
398
	end))
399
end
400
401
function MagicBlock(SIZE,WAIT,CFRAME,COLOR,GROW)
402
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(SIZE,SIZE,SIZE), true)
403
	local mesh = IT("BlockMesh",wave)
404
	wave.CFrame = CFRAME
405
	coroutine.resume(coroutine.create(function(PART)
406
		for i = 1, WAIT do
407
			Swait()
408
			mesh.Scale = mesh.Scale + GROW
409
			wave.CFrame = CFRAME * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
410
			wave.Transparency = wave.Transparency + (1/WAIT)
411
			if wave.Transparency > 0.99 then
412
				wave:remove()
413
			end
414
		end
415
	end))
416
end
417
418
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
419
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
420
	local mesh = nil
421
	if KIND == "Base" then
422
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
423
	elseif KIND == "Thin" then
424
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
425
	elseif KIND == "Round" then
426
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
427
	end
428
	wave.CFrame = CFRAME
429
	coroutine.resume(coroutine.create(function(PART)
430
		for i = 1, WAIT do
431
			Swait()
432
			mesh.Scale = mesh.Scale + GROW/10
433
			wave.Transparency = wave.Transparency + (0.5/WAIT)
434
			if wave.Transparency > 0.99 then
435
				wave:remove()
436
			end
437
		end
438
	end))
439
end
440
441
function MakeForm(PART,TYPE)
442
	if TYPE == "Cyl" then
443
		local MSH = IT("CylinderMesh",PART)
444
	elseif TYPE == "Ball" then
445
		local MSH = IT("SpecialMesh",PART)
446
		MSH.MeshType = "Sphere"
447
	elseif TYPE == "Wedge" then
448
		local MSH = IT("SpecialMesh",PART)
449
		MSH.MeshType = "Wedge"
450
	end
451
end
452
453
function CheckTableForString(Table, String)
454
	for i, v in pairs(Table) do
455
		if string.find(string.lower(String), string.lower(v)) then
456
			return true
457
		end
458
	end
459
	return false
460
end
461
462
function CheckIntangible(Hit)
463
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
464
	if Hit and Hit.Parent then
465
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
466
			return true
467
		end
468
	end
469
	return false
470
end
471
472
Debris = game:GetService("Debris")
473
474
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
475
	local Direction = CFrame.new(StartPos, Vec).lookVector
476
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
477
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
478
	if RayHit and CheckIntangible(RayHit) then
479
		if DelayIfHit then
480
			wait()
481
		end
482
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
483
	end
484
	return RayHit, RayPos, RayNormal
485
end
486
487
function turnto(position)
488
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
489
end
490
491
--//=================================\\
492
--||	     WEAPON CREATION
493
--\\=================================//
494
495
496
for _, c in pairs(Weapon:GetChildren()) do
497
	if c.ClassName == "Part" then
498
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
499
	end
500
end
501
502
local Radio = CreatePart(3, Weapon, "Marble", 0, 0, "Pearl", "RAD-io", VT(1.01,0.2,1.01),false)
503
CreateWeldOrSnapOrMotor("Weld", Radio, Torso, Radio, CF(0, 0, 1) * ANGLES(RAD(0), RAD(180), RAD(45)), CF(0, 0, 0))
504
local RADIOMESH = CreateMesh("SpecialMesh", Radio, "FileMesh", "212302951", "212303049", VT(10,10,10), VT(0,0,0))
505
506
Weapon.Parent = Character
507
508
Humanoid.Died:connect(function()
509
	ATTACK = true
510
end)
511
512
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1 , 2, UD2(0.10, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
513
local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.60, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
514
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
515
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
516
517
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] sitt", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 1")
518
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] most worrying indeed", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 2")
519
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Toggle Radio", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 3")
520
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Select Song", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 4")
521
522
local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
523
local INFOTEXT = CreateLabel(INFOFRAME, "Say 'AddSong:ID' to add a song to the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
524
525
local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.1, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
526
local INFOTEXT = CreateLabel(INFOFRAME, "Say 'RemoveSong:Number' to remove a song from the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
527
528
529
--//=================================\\
530
--||	ATTACK FUNCTIONS AND STUFF
531
--\\=================================//
532
function DetonateOtherBomb(HITBOMB)
533
	HITBOMB.Transparency = 1
534
	Debris:AddItem(HITBOMB,5)
535
	local SOUND = IT("Sound",HITBOMB)
536
	SOUND.Volume = 5
537
	SOUND.SoundId = "rbxasset://sounds\\Rocket shot.wav"
538
	SOUND:Play()
539
	local BOOM = EXPLOSION:Clone()
540
	BOOM.Parent = HITBOMB
541
	BOOM.Position = HITBOMB.Position
542
	for e = 1, 4 do
543
		for i = 1, HITBOMB.Size2.Value*2 do
544
			local POSITION = CF(HITBOMB.Position)*CF(0,0,0)*ANGLES(RAD(0),RAD(e*90),RAD(0))*CF(i*8,0,0).p
545
			local FRAME = CF(HITBOMB.Position)*CF(0,0,0)*ANGLES(RAD(0),RAD(e*90),RAD(0))*CF(i*8,0,0).lookVector
546
			local BOOM = EXPLOSION:Clone()
547
			BOOM.Parent = HITBOMB
548
			BOOM.Position = POSITION
549
			for _, c in pairs(Effects:GetChildren()) do
550
				if (c.Position - POSITION).Magnitude < 5+c.Size.Z/2 and c.Transparency == 0 then
551
					DetonateOtherBomb(c)
552
				end
553
			end
554
		end
555
	end
556
end
557
558
function Bombs()
559
	ATTACK = true
560
	Rooted = true
561
	for i=0, 0.5, 0.1 / Animation_Speed do
562
		Swait()
563
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
564
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.5 / Animation_Speed)
565
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
566
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(35)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
567
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
568
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
569
	end
570
	local BOMB = CreatePart(3, Effects, "Neon", 0, 0, "Pearl", "BOMB", VT(1,1,1))
571
	local MESH = CreateMesh("SpecialMesh", BOMB, "FileMesh", "fonts/timebomb.mesh", "textures/bombtex.png", VT(1,1,1), VT(0,0,0))
572
	local LOOP = 0
573
	local SIZE = 1
574
	local GROW = 1
575
	BOMB.CFrame = Torso.CFrame*CF(0,SIZE,-1.2-SIZE)*ANGLES(RAD(-90),RAD(0),RAD(0))
576
	while true do
577
		Swait()
578
		if HOLD == false then
579
			break
580
		end
581
		LOOP = LOOP + 1
582
		BOMB.CFrame = Torso.CFrame*CF(0,SIZE,-1.2-SIZE)*ANGLES(RAD(-90),RAD(0),RAD(0))
583
		if LOOP == 50 and SIZE < 2.8 then
584
			LOOP = 0
585
			GROW = GROW + 1
586
			CreateSound("260433895", BOMB, 3, 1)
587
			for i = 1, 30 do
588
				Swait()
589
				SIZE = SIZE + 0.035
590
				BOMB.CFrame = Torso.CFrame*CF(0,SIZE,-1.2-SIZE)*ANGLES(RAD(-90),RAD(0),RAD(0))
591
				MESH.Scale = MESH.Scale * (1+(i)/800)
592
			end
593
			for i = 1, 10 do
594
				Swait()
595
				SIZE = SIZE +- 0.03
596
				BOMB.CFrame = Torso.CFrame*CF(0,SIZE,-1.2-SIZE)*ANGLES(RAD(-90),RAD(0),RAD(0))
597
				MESH.Scale = MESH.Scale * (1-(i)/800)
598
			end
599
		end
600
	end
601
	local VALUE = IT("NumberValue",BOMB)
602
	VALUE.Name = "Size2"
603
	VALUE.Value = GROW
604
	BOMB.Size = MESH.Scale
605
	for i=1, 50 do
606
		Swait()
607
		BOMB.CFrame = Torso.CFrame*CF(0,SIZE-(i/15),-1.2-SIZE)*ANGLES(RAD(-90),RAD(0),RAD(0))
608
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
609
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
610
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -1) * ANGLES(RAD(35), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
611
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -1) * ANGLES(RAD(35), RAD(0), RAD(35)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
612
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
613
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
614
	end
615
	local SOUND = IT("Sound",BOMB)
616
	SOUND.Volume = 5
617
	SOUND.SoundId = "rbxassetid://1283290053"
618
	coroutine.resume(coroutine.create(function()
619
		for i = 1, 15 do
620
			if BOMB.Transparency == 1 then
621
				break
622
			end
623
			wait(1.5-(i/5))
624
			if BOMB.Transparency == 1 then
625
				break
626
			end
627
			MESH.Scale = MESH.Scale + VT(0.2,0.2,0.2)
628
			MESH.VertexColor = VT(1,0,0)
629
			SOUND:Play()
630
			if BOMB.Transparency == 1 then
631
				break
632
			end
633
			wait((1-(i/5))/5)
634
			if BOMB.Transparency == 1 then
635
				break
636
			end
637
			MESH.Scale = MESH.Scale - VT(0.2,0.2,0.2)
638
			MESH.VertexColor = VT(1,1,1)
639
		end
640
		if BOMB.Transparency == 0 then
641
			local SOUND = IT("Sound",BOMB)
642
			SOUND.Volume = 5
643
			SOUND.SoundId = "rbxasset://sounds\\Rocket shot.wav"
644
			SOUND:Play()
645
			BOMB.Transparency = 1
646
			Debris:AddItem(BOMB,5)
647
			local POSITION = BOMB.Position
648
			local BOOM = EXPLOSION:Clone()
649
			BOOM.Parent = BOMB
650
			BOOM.Position = POSITION
651
			for e = 1, 4 do
652
				for i = 1, GROW*2 do
653
					local POSITION = CF(BOMB.Position)*CF(0,0,0)*ANGLES(RAD(0),RAD(e*90),RAD(0))*CF(i*8,0,0).p
654
					local FRAME = CF(BOMB.Position)*CF(0,0,0)*ANGLES(RAD(0),RAD(e*90),RAD(0)).lookVector
655
					local BOOM = EXPLOSION:Clone()
656
					BOOM.Parent = BOMB
657
					BOOM.Position = POSITION
658
					local HITBOMB = Raycast(BOMB.Position, FRAME, GROW*8, BOMB)
659
					for _, c in pairs(Effects:GetChildren()) do
660
						if (c.Position - POSITION).Magnitude < 5+c.Size.Z/2 and c.Transparency == 0 then
661
							DetonateOtherBomb(c)
662
						end
663
					end
664
				end
665
			end
666
		end
667
	end))
668
	ATTACK = false
669
	Rooted = false
670
end
671
672
673
function onChatted(msg)
674
	if msg:sub(1,8) == "AddSong:" then
675
		local ID = msg:sub(9)
676
		table.insert(SONGS,ID)
677
		SELECTEDSONG = #SONGS
678
	end
679
	if msg:sub(1,11) == "RemoveSong:" then
680
		local ID = msg:sub(12)
681
		if ID <= #SONGS then
682
			table.remove(SONGS,ID)
683
		end
684
	end
685
end
686
Player.Chatted:connect(onChatted)
687
function sitt()
688
	local SITT = CreateSound("1395818498", Torso, 10, 1, 30)
689
	ATTACK = true
690
	repeat Swait() until SITT.TimePosition > 18.5
691
	VALUE1 = true
692
	ATTACK = false
693
end
694
695
function mostworryingindeed()
696
	ATTACK = true
697
	VALUE2 = true
698
	CreateSound("1112042117", Torso, 10, 1, 6)
699
	for i = 1, 35 do
700
		Swait()
701
		RightArm.Transparency = RightArm.Transparency + 1/35
702
		LeftArm.Transparency = LeftArm.Transparency + 1/35
703
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
704
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
705
	end
706
	for i = 1, 150 do
707
		Swait()
708
		RightArm.Transparency = RightArm.Transparency - 1/100
709
		LeftArm.Transparency = LeftArm.Transparency - 1/100
710
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.2, 1, -0.1) * ANGLES(RAD(155), RAD(-25), RAD(-12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
711
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2, 1, -0.1) * ANGLES(RAD(155), RAD(25), RAD(12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
712
	end
713
	RightArm.Transparency = 0
714
	LeftArm.Transparency = 0
715
	local SITT = CreateSound("1395854043", Torso, 10, 1, 6)
716
	Swait(2)
717
	repeat Swait() until SITT.Playing == false
718
	VALUE2 = false
719
	ATTACK = false
720
end
721
722
--//=================================\\
723
--||	  ASSIGN THINGS TO KEYS
724
--\\=================================//
725
726
function MouseDown(Mouse)
727
	if ATTACK == false then
728
	end
729
end
730
731
function MouseUp(Mouse)
732
HOLD = false
733
end
734
735
function KeyDown(Key)
736
	KEYHOLD = true
737
	if Key == "z" and ATTACK == false then
738
		if VALUE1 == false then
739
			sitt()
740
		else
741
			VALUE1 = false
742
		end
743
	end
744
745
	if Key == "b" and ATTACK == false then
746
		mostworryingindeed()
747
	end
748
749
	if Key == "x" and ATTACK == false then
750
		Bombs()
751
	end
752
753
	if Key == "c" and ATTACK == false then
754
		if SONGPLAYING == false then
755
			SONGPLAYING = true
756
			local SONG = CreateSound(SONGS[SELECTEDSONG], Radio, 1, 1, nil)
757
			SONG.Looped = true
758
		else
759
			if Radio:FindFirstChild("Audio") then
760
				Radio.Audio:remove()
761
			end
762
			SONGPLAYING = false
763
		end
764
	end
765
766
	if Key == "v" and ATTACK == false then
767
		SELECTEDSONG = SELECTEDSONG + 1
768
	end
769
end
770
771
function KeyUp(Key)
772
	KEYHOLD = false
773
end
774
775
	Mouse.Button1Down:connect(function(NEWKEY)
776
		MouseDown(NEWKEY)
777
	end)
778
	Mouse.Button1Up:connect(function(NEWKEY)
779
		MouseUp(NEWKEY)
780
	end)
781
	Mouse.KeyDown:connect(function(NEWKEY)
782
		KeyDown(NEWKEY)
783
	end)
784
	Mouse.KeyUp:connect(function(NEWKEY)
785
		KeyUp(NEWKEY)
786
	end)
787
788
--//=================================\\
789
--\\=================================//
790
791
792
function unanchor()
793
	if UNANCHOR == true then
794
		g = Character:GetChildren()
795
		for i = 1, #g do
796
			if g[i].ClassName == "Part" then
797
				g[i].Anchored = false
798
			end
799
		end
800
	end
801
end
802
803
804
--//=================================\\
805
--||	WRAP THE WHOLE SCRIPT UP
806
--\\=================================//
807
808
Humanoid.Changed:connect(function(Jump)
809
	if Jump == "Jump" and (Disable_Jump == true) then
810
		Humanoid.Jump = false
811
	end
812
end)
813
814
while true do
815
	Swait()
816
	ANIMATE.Parent = nil
817
	local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
818
	IDLEANIMATION:Play()
819
	SINE = SINE + CHANGE
820
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
821
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
822
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
823
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
824
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
825
	if VALUE1 == false then
826
		if VALUE2 == false then
827
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
828
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
829
		end
830
		HipHeight = 3
831
		Rooted = false
832
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.35 * COS(SINE / 42)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
833
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
834
		RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
835
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
836
	else
837
		if VALUE2 == false then
838
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
839
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
840
		end
841
		Rooted = true
842
		HipHeight = 0
843
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1.5) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
844
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
845
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
846
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1/ Animation_Speed)
847
	end
848
	unanchor()
849
	Humanoid.MaxHealth = "inf"
850
	Humanoid.Health = "inf"
851
	if Rooted == false then
852
		Disable_Jump = false
853
		Humanoid.WalkSpeed = Speed
854
	elseif Rooted == true then
855
		Disable_Jump = true
856
		Humanoid.WalkSpeed = 0
857
	end
858
	if SELECTEDSONG > #SONGS then
859
		SELECTEDSONG = 1
860
	end
861
	if SONGPLAYING == true then
862
		local SONG = Radio:FindFirstChild("Audio")
863
		if SONG ~= nil then
864
			SONG.Playing = true
865
			if SONG.SoundId ~= "rbxassetid://"..SONGS[SELECTEDSONG] then
866
				SONG.SoundId = "rbxassetid://"..SONGS[SELECTEDSONG]
867
				SONG:Play()
868
			end
869
			RADIOMESH.Scale = VT(3,3,3)+(VT(1,1,1)*SONG.PlaybackLoudness/100)
870
		end
871
	else
872
		RADIOMESH.Scale = VT(3,3,3)
873
	end
874
end
875
876
--//=================================\\
877
--\\=================================//
878
879
880
881
882
883
--//====================================================\\--
884
--||			  		 END OF SCRIPT
885
--\\====================================================//--