Advertisement
Nico1702

Guardian Of The Light Script

Jul 15th, 2018
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 117.44 KB | None | 0 0
  1. print("Guardian of light loaded (edit by promlg112)")
  2. script.Name = "Banisher Gun V3 / 1"
  3. --//====================================================\\--
  4. --|| CREATED BY SHACKLUSTER
  5. --\\====================================================//--
  6.  
  7. script:ClearAllChildren()
  8. wait(0.2)
  9.  
  10. Player = game:GetService("Players").LocalPlayer
  11. PlayerGui = Player.PlayerGui
  12. Cam = workspace.CurrentCamera
  13. Backpack = Player.Backpack
  14. Character = Player.Character
  15. Humanoid = Character.Humanoid
  16. Mouse = Player:GetMouse()
  17. RootPart = Character["HumanoidRootPart"]
  18. Torso = Character["Torso"]
  19. Head = Character["Head"]
  20. RightArm = Character["Right Arm"]
  21. LeftArm = Character["Left Arm"]
  22. RightLeg = Character["Right Leg"]
  23. LeftLeg = Character["Left Leg"]
  24. RootJoint = RootPart["RootJoint"]
  25. Neck = Torso["Neck"]
  26. RightShoulder = Torso["Right Shoulder"]
  27. LeftShoulder = Torso["Left Shoulder"]
  28. RightHip = Torso["Right Hip"]
  29. LeftHip = Torso["Left Hip"]
  30. local TIME = 0
  31. local sick = Instance.new("Sound",Torso)
  32.  
  33. IT = Instance.new
  34. CF = CFrame.new
  35. VT = Vector3.new
  36. RAD = math.rad
  37. C3 = Color3.new
  38. UD2 = UDim2.new
  39. BRICKC = BrickColor.new
  40. ANGLES = CFrame.Angles
  41. EULER = CFrame.fromEulerAnglesXYZ
  42. COS = math.cos
  43. ACOS = math.acos
  44. SIN = math.sin
  45. ASIN = math.asin
  46. ABS = math.abs
  47. MRANDOM = math.random
  48. FLOOR = math.floor
  49.  
  50. --//=================================\\
  51. --|| USEFUL VALUES
  52. --\\=================================//
  53. local SKILLTEXTCOLOR = C3(1,1,1)
  54.  
  55. local naeeym2 = Instance.new("BillboardGui",Character)
  56. naeeym2.AlwaysOnTop = true
  57. naeeym2.Size = UDim2.new(5,35,2,35)
  58. naeeym2.StudsOffset = Vector3.new(0,2,0)
  59. naeeym2.Adornee = Character.Head
  60. naeeym2.Name = "Name"
  61. local tecks2 = Instance.new("TextLabel",naeeym2)
  62. tecks2.BackgroundTransparency = 1
  63. tecks2.TextScaled = true
  64. tecks2.BorderSizePixel = 0
  65. tecks2.Text = "Guardian of light"
  66. tecks2.Font = "Antique"
  67. tecks2.TextSize = 60
  68. tecks2.TextStrokeTransparency = 0
  69. tecks2.TextColor3 = Color3.new(0,0,0)
  70. tecks2.TextStrokeColor3 = Color3.new(0.2,0.2,0.2)
  71. tecks2.Size = UDim2.new(1,0,0.5,0)
  72. tecks2.Parent = naeeym2
  73.  
  74. Animation_Speed = 3
  75. local FORCERESET = false
  76. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  77. local Speed = 16
  78. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  79. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  80. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  81. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  82. local DAMAGEMULTIPLIER = 1
  83. local ANIM = "Idle"
  84. local ATTACK = false
  85. local EQUIPPED = false
  86. local HOLD = false
  87. local COMBO = 1
  88. local Rooted = false
  89. local SINE = 0
  90. local KEYHOLD = false
  91. local CHANGE = 2 / Animation_Speed
  92. local WALKINGANIM = false
  93. local VALUE1 = false
  94. local VALUE2 = false
  95. local ROBLOXIDLEANIMATION = IT("Animation")
  96. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  97. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  98. --ROBLOXIDLEANIMATION.Parent = Humanoid
  99. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  100. WEAPONGUI.Name = "BanishV3Gui"
  101. local Weapon = IT("Model")
  102. Weapon.Name = "Adds"
  103. local Effects = IT("Folder", Weapon)
  104. Effects.Name = "Effects"
  105. local ANIMATOR = Humanoid.Animator
  106. local ANIMATE = Character:FindFirstChild("Animate")
  107. local UNANCHOR = true
  108. local TOBANISH = {}
  109. script.Parent = PlayerGui
  110.  
  111. --//=================================\\
  112. --\\=================================//
  113.  
  114.  
  115. --//=================================\\
  116. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  117. --\\=================================//
  118.  
  119. ArtificialHB = Instance.new("BindableEvent", script)
  120. ArtificialHB.Name = "ArtificialHB"
  121.  
  122. script:WaitForChild("ArtificialHB")
  123.  
  124. frame = Frame_Speed
  125. tf = 0
  126. allowframeloss = false
  127. tossremainder = false
  128. lastframe = tick()
  129. script.ArtificialHB:Fire()
  130.  
  131. game:GetService("RunService").Heartbeat:connect(function(s, p)
  132. tf = tf + s
  133. if tf >= frame then
  134. if allowframeloss then
  135. script.ArtificialHB:Fire()
  136. lastframe = tick()
  137. else
  138. for i = 1, math.floor(tf / frame) do
  139. script.ArtificialHB:Fire()
  140. end
  141. lastframe = tick()
  142. end
  143. if tossremainder then
  144. tf = 0
  145. else
  146. tf = tf - frame * math.floor(tf / frame)
  147. end
  148. end
  149. end)
  150.  
  151. --//=================================\\
  152. --\\=================================//
  153.  
  154. --//=================================\\
  155. --|| SOME FUNCTIONS
  156. --\\=================================//
  157. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  158. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  159. end
  160.  
  161. function PositiveAngle(NUMBER)
  162. if NUMBER >= 0 then
  163. NUMBER = 0
  164. end
  165. return NUMBER
  166. end
  167.  
  168. function NegativeAngle(NUMBER)
  169. if NUMBER <= 0 then
  170. NUMBER = 0
  171. end
  172. return NUMBER
  173. end
  174.  
  175. function Swait(NUMBER)
  176. if NUMBER == 0 or NUMBER == nil then
  177. ArtificialHB.Event:wait()
  178. else
  179. for i = 1, NUMBER do
  180. ArtificialHB.Event:wait()
  181. end
  182. end
  183. end
  184.  
  185. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  186. local NEWMESH = IT(MESH)
  187. if MESH == "SpecialMesh" then
  188. NEWMESH.MeshType = MESHTYPE
  189. if MESHID ~= "nil" and MESHID ~= "" then
  190. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  191. end
  192. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  193. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  194. end
  195. end
  196. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  197. NEWMESH.Scale = SCALE
  198. NEWMESH.Parent = PARENT
  199. return NEWMESH
  200. end
  201.  
  202. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  203. local NEWPART = IT("Part")
  204. NEWPART.formFactor = FORMFACTOR
  205. NEWPART.Reflectance = REFLECTANCE
  206. NEWPART.Transparency = TRANSPARENCY
  207. NEWPART.CanCollide = false
  208. NEWPART.Locked = true
  209. NEWPART.Anchored = true
  210. if ANCHOR == false then
  211. NEWPART.Anchored = false
  212. end
  213. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  214. NEWPART.Name = NAME
  215. NEWPART.Size = SIZE
  216. NEWPART.Position = Torso.Position
  217. NEWPART.Material = MATERIAL
  218. NEWPART:BreakJoints()
  219. NEWPART.Parent = PARENT
  220. return NEWPART
  221. end
  222.  
  223. local function weldBetween(a, b)
  224. local weldd = Instance.new("ManualWeld")
  225. weldd.Part0 = a
  226. weldd.Part1 = b
  227. weldd.C0 = CFrame.new()
  228. weldd.C1 = b.CFrame:inverse() * a.CFrame
  229. weldd.Parent = a
  230. return weldd
  231. end
  232.  
  233.  
  234. function QuaternionFromCFrame(cf)
  235. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  236. local trace = m00 + m11 + m22
  237. if trace > 0 then
  238. local s = math.sqrt(1 + trace)
  239. local recip = 0.5 / s
  240. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  241. else
  242. local i = 0
  243. if m11 > m00 then
  244. i = 1
  245. end
  246. if m22 > (i == 0 and m00 or m11) then
  247. i = 2
  248. end
  249. if i == 0 then
  250. local s = math.sqrt(m00 - m11 - m22 + 1)
  251. local recip = 0.5 / s
  252. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  253. elseif i == 1 then
  254. local s = math.sqrt(m11 - m22 - m00 + 1)
  255. local recip = 0.5 / s
  256. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  257. elseif i == 2 then
  258. local s = math.sqrt(m22 - m00 - m11 + 1)
  259. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  260. end
  261. end
  262. end
  263.  
  264. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  265. local xs, ys, zs = x + x, y + y, z + z
  266. local wx, wy, wz = w * xs, w * ys, w * zs
  267. local xx = x * xs
  268. local xy = x * ys
  269. local xz = x * zs
  270. local yy = y * ys
  271. local yz = y * zs
  272. local zz = z * zs
  273. 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))
  274. end
  275.  
  276. function QuaternionSlerp(a, b, t)
  277. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  278. local startInterp, finishInterp;
  279. if cosTheta >= 0.0001 then
  280. if (1 - cosTheta) > 0.0001 then
  281. local theta = ACOS(cosTheta)
  282. local invSinTheta = 1 / SIN(theta)
  283. startInterp = SIN((1 - t) * theta) * invSinTheta
  284. finishInterp = SIN(t * theta) * invSinTheta
  285. else
  286. startInterp = 1 - t
  287. finishInterp = t
  288. end
  289. else
  290. if (1 + cosTheta) > 0.0001 then
  291. local theta = ACOS(-cosTheta)
  292. local invSinTheta = 1 / SIN(theta)
  293. startInterp = SIN((t - 1) * theta) * invSinTheta
  294. finishInterp = SIN(t * theta) * invSinTheta
  295. else
  296. startInterp = t - 1
  297. finishInterp = t
  298. end
  299. end
  300. 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
  301. end
  302.  
  303. function Clerp(a, b, t)
  304. local qa = {QuaternionFromCFrame(a)}
  305. local qb = {QuaternionFromCFrame(b)}
  306. local ax, ay, az = a.x, a.y, a.z
  307. local bx, by, bz = b.x, b.y, b.z
  308. local _t = 1 - t
  309. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  310. end
  311.  
  312. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  313. local frame = IT("Frame")
  314. frame.BackgroundTransparency = TRANSPARENCY
  315. frame.BorderSizePixel = BORDERSIZEPIXEL
  316. frame.Position = POSITION
  317. frame.Size = SIZE
  318. frame.BackgroundColor3 = COLOR
  319. frame.BorderColor3 = BORDERCOLOR
  320. frame.Name = NAME
  321. frame.Parent = PARENT
  322. return frame
  323. end
  324.  
  325. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  326. local label = IT("TextLabel")
  327. label.BackgroundTransparency = 1
  328. label.Size = UD2(1, 0, 1, 0)
  329. label.Position = UD2(0, 0, 0, 0)
  330. label.TextColor3 = TEXTCOLOR
  331. label.TextStrokeTransparency = STROKETRANSPARENCY
  332. label.TextTransparency = TRANSPARENCY
  333. label.FontSize = TEXTFONTSIZE
  334. label.Font = TEXTFONT
  335. label.BorderSizePixel = BORDERSIZEPIXEL
  336. label.TextScaled = false
  337. label.Text = TEXT
  338. label.Name = NAME
  339. label.Parent = PARENT
  340. return label
  341. end
  342.  
  343. function NoOutlines(PART)
  344. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  345. end
  346.  
  347. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  348. local NEWWELD = IT(TYPE)
  349. NEWWELD.Part0 = PART0
  350. NEWWELD.Part1 = PART1
  351. NEWWELD.C0 = C0
  352. NEWWELD.C1 = C1
  353. NEWWELD.Parent = PARENT
  354. return NEWWELD
  355. end
  356.  
  357. local S = IT("Sound")
  358. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  359. local NEWSOUND = nil
  360. coroutine.resume(coroutine.create(function()
  361. NEWSOUND = S:Clone()
  362. NEWSOUND.Parent = PARENT
  363. NEWSOUND.Volume = VOLUME
  364. NEWSOUND.Pitch = PITCH
  365. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  366. NEWSOUND:play()
  367. if DOESLOOP == true then
  368. NEWSOUND.Looped = true
  369. else
  370. repeat wait(1) until NEWSOUND.Playing == false
  371. NEWSOUND:remove()
  372. end
  373. end))
  374. return NEWSOUND
  375. end
  376.  
  377. function CFrameFromTopBack(at, top, back)
  378. local right = top:Cross(back)
  379. 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)
  380. end
  381.  
  382. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  383. function WACKYEFFECT(Table)
  384. local TYPE = (Table.EffectType or "Sphere")
  385. local SIZE = (Table.Size or VT(1,1,1))
  386. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  387. local TRANSPARENCY = (Table.Transparency or 0)
  388. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  389. local CFRAME = (Table.CFrame or Torso.CFrame)
  390. local MOVEDIRECTION = (Table.MoveToPos or nil)
  391. local ROTATION1 = (Table.RotationX or 0)
  392. local ROTATION2 = (Table.RotationY or 0)
  393. local ROTATION3 = (Table.RotationZ or 0)
  394. local MATERIAL = (Table.Material or "Neon")
  395. local COLOR = (Table.Color or C3(1,1,1))
  396. local TIME = (Table.Time or 45)
  397. local SOUNDID = (Table.SoundID or nil)
  398. local SOUNDPITCH = (Table.SoundPitch or nil)
  399. local SOUNDVOLUME = (Table.SoundVolume or nil)
  400. coroutine.resume(coroutine.create(function()
  401. local PLAYSSOUND = false
  402. local SOUND = nil
  403. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  404. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  405. PLAYSSOUND = true
  406. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  407. end
  408. EFFECT.Color = COLOR
  409. local MSH = nil
  410. if TYPE == "Sphere" then
  411. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  412. elseif TYPE == "Block" then
  413. MSH = IT("BlockMesh",EFFECT)
  414. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  415. elseif TYPE == "Wave" then
  416. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  417. elseif TYPE == "Ring" then
  418. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  419. elseif TYPE == "Slash" then
  420. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  421. elseif TYPE == "Round Slash" then
  422. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  423. elseif TYPE == "Swirl" then
  424. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  425. elseif TYPE == "Skull" then
  426. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  427. elseif TYPE == "Crystal" then
  428. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  429. end
  430. if MSH ~= nil then
  431. local MOVESPEED = nil
  432. if MOVEDIRECTION ~= nil then
  433. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  434. end
  435. local GROWTH = SIZE - ENDSIZE
  436. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  437. if TYPE == "Block" then
  438. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  439. else
  440. EFFECT.CFrame = CFRAME
  441. end
  442. for LOOP = 1, TIME+1 do
  443. Swait()
  444. MSH.Scale = MSH.Scale - GROWTH/TIME
  445. if TYPE == "Wave" then
  446. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  447. end
  448. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  449. if TYPE == "Block" then
  450. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  451. else
  452. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  453. end
  454. if MOVEDIRECTION ~= nil then
  455. local ORI = EFFECT.Orientation
  456. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  457. EFFECT.Orientation = ORI
  458. end
  459. end
  460. if PLAYSSOUND == false then
  461. EFFECT:remove()
  462. else
  463. repeat Swait() until SOUND.Playing == false
  464. EFFECT:remove()
  465. end
  466. else
  467. if PLAYSSOUND == false then
  468. EFFECT:remove()
  469. else
  470. repeat Swait() until SOUND.Playing == false
  471. EFFECT:remove()
  472. end
  473. end
  474. end))
  475. end
  476.  
  477. function MakeForm(PART,TYPE)
  478. if TYPE == "Cyl" then
  479. local MSH = IT("CylinderMesh",PART)
  480. elseif TYPE == "Ball" then
  481. local MSH = IT("SpecialMesh",PART)
  482. MSH.MeshType = "Sphere"
  483. elseif TYPE == "Wedge" then
  484. local MSH = IT("SpecialMesh",PART)
  485. MSH.MeshType = "Wedge"
  486. end
  487. end
  488.  
  489. Debris = game:GetService("Debris")
  490.  
  491. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  492. local DIRECTION = CF(StartPos,EndPos).lookVector
  493. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  494. end
  495.  
  496. function CharacterFade(COLOR,TIMER)
  497. coroutine.resume(coroutine.create(function()
  498. local FADE = IT("Model",Effects)
  499. for _, c in pairs(Character:GetChildren()) do
  500. if c.ClassName == "Part" and c ~= RootPart then
  501. local FADER = c:Clone()
  502. FADER.Color = COLOR
  503. FADER.CFrame = c.CFrame
  504. FADER.Parent = FADE
  505. FADER.Anchored = true
  506. FADER.Transparency = 0.25
  507. FADER:BreakJoints()
  508. FADER.Material = "Glass"
  509. FADER:ClearAllChildren()
  510. if FADER.Name == "Head" then
  511. FADER.Size = VT(1,1,1)
  512. end
  513. end
  514. end
  515. local TRANS = 0.75/TIMER
  516. for i = 1, TIMER do
  517. Swait()
  518. for _, c in pairs(FADE:GetChildren()) do
  519. if c.ClassName == "Part" then
  520. c.Transparency = c.Transparency + TRANS
  521. end
  522. end
  523. end
  524. FADE:remove()
  525. end))
  526. end
  527.  
  528. local PE=Instance.new("ParticleEmitter")
  529. PE.LightEmission=0.3
  530. PE.Size=NumberSequence.new(0)
  531. PE.Transparency=NumberSequence.new(0,1)
  532. PE.Rotation=NumberRange.new(0,360)
  533. PE.LockedToPart = false
  534. PE.Speed = NumberRange.new(0,0,0)
  535. PE.ZOffset = 0.3
  536. PE.Rate = 999
  537. PE.VelocitySpread = 25
  538. PE.Name = "Particles"
  539.  
  540. function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
  541. local particle = nil
  542. coroutine.resume(coroutine.create(function(PART)
  543. particle = PE:Clone()
  544. Swait()
  545. particle.Rate = 999
  546. particle.Parent = art
  547. particle.Acceleration = accel
  548. if type == "Fire" then
  549. local EyeSizes={
  550. NumberSequenceKeypoint.new(0,size,size/2),
  551. NumberSequenceKeypoint.new(1,size/4,size/8)
  552. }
  553. particle.Size = NumberSequence.new(EyeSizes)
  554. elseif type == "Smoke" then
  555. local EyeSizes={
  556. NumberSequenceKeypoint.new(0,size/5,0),
  557. NumberSequenceKeypoint.new(1,size*2,0.5)
  558. }
  559. particle.Size = NumberSequence.new(EyeSizes)
  560. elseif type == "Solid" then
  561. local EyeSizes={
  562. NumberSequenceKeypoint.new(0,size,0),
  563. NumberSequenceKeypoint.new(1,size,0)
  564. }
  565. particle.Size = NumberSequence.new(EyeSizes)
  566. end
  567. particle.Lifetime=NumberRange.new(lifetime)
  568. particle.Drag = drag
  569. if locked == true then
  570. particle.LockedToPart = true
  571. end
  572. particle.Speed = NumberRange.new(speed*0.8,speed)
  573. particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
  574. particle.Enabled = isenabledbydefault
  575. particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
  576. end))
  577. return particle
  578. end
  579.  
  580. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  581. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  582. end
  583.  
  584. function PositiveAngle(NUMBER)
  585. if NUMBER >= 0 then
  586. NUMBER = 0
  587. end
  588. return NUMBER
  589. end
  590.  
  591. function NegativeAngle(NUMBER)
  592. if NUMBER <= 0 then
  593. NUMBER = 0
  594. end
  595. return NUMBER
  596. end
  597.  
  598. function Swait(NUMBER)
  599. if NUMBER == 0 or NUMBER == nil then
  600. ArtificialHB.Event:wait()
  601. else
  602. for i = 1, NUMBER do
  603. ArtificialHB.Event:wait()
  604. end
  605. end
  606. end
  607.  
  608. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  609. local NEWMESH = IT(MESH)
  610. if MESH == "SpecialMesh" then
  611. NEWMESH.MeshType = MESHTYPE
  612. if MESHID ~= "nil" and MESHID ~= "" then
  613. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  614. end
  615. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  616. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  617. end
  618. end
  619. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  620. NEWMESH.Scale = SCALE
  621. NEWMESH.Parent = PARENT
  622. return NEWMESH
  623. end
  624.  
  625. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  626. local NEWPART = IT("Part")
  627. NEWPART.formFactor = FORMFACTOR
  628. NEWPART.Reflectance = REFLECTANCE
  629. NEWPART.Transparency = TRANSPARENCY
  630. NEWPART.CanCollide = false
  631. NEWPART.Locked = true
  632. NEWPART.Anchored = true
  633. if ANCHOR == false then
  634. NEWPART.Anchored = false
  635. end
  636. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  637. NEWPART.Name = NAME
  638. NEWPART.Size = SIZE
  639. NEWPART.Position = Torso.Position
  640. NEWPART.Material = MATERIAL
  641. NEWPART:BreakJoints()
  642. NEWPART.Parent = PARENT
  643. return NEWPART
  644. end
  645.  
  646. local function weldBetween(a, b)
  647. local weldd = Instance.new("ManualWeld")
  648. weldd.Part0 = a
  649. weldd.Part1 = b
  650. weldd.C0 = CFrame.new()
  651. weldd.C1 = b.CFrame:inverse() * a.CFrame
  652. weldd.Parent = a
  653. return weldd
  654. end
  655.  
  656.  
  657. function QuaternionFromCFrame(cf)
  658. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  659. local trace = m00 + m11 + m22
  660. if trace > 0 then
  661. local s = math.sqrt(1 + trace)
  662. local recip = 0.5 / s
  663. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  664. else
  665. local i = 0
  666. if m11 > m00 then
  667. i = 1
  668. end
  669. if m22 > (i == 0 and m00 or m11) then
  670. i = 2
  671. end
  672. if i == 0 then
  673. local s = math.sqrt(m00 - m11 - m22 + 1)
  674. local recip = 0.5 / s
  675. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  676. elseif i == 1 then
  677. local s = math.sqrt(m11 - m22 - m00 + 1)
  678. local recip = 0.5 / s
  679. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  680. elseif i == 2 then
  681. local s = math.sqrt(m22 - m00 - m11 + 1)
  682. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  683. end
  684. end
  685. end
  686.  
  687. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  688. local xs, ys, zs = x + x, y + y, z + z
  689. local wx, wy, wz = w * xs, w * ys, w * zs
  690. local xx = x * xs
  691. local xy = x * ys
  692. local xz = x * zs
  693. local yy = y * ys
  694. local yz = y * zs
  695. local zz = z * zs
  696. 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))
  697. end
  698.  
  699. function QuaternionSlerp(a, b, t)
  700. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  701. local startInterp, finishInterp;
  702. if cosTheta >= 0.0001 then
  703. if (1 - cosTheta) > 0.0001 then
  704. local theta = ACOS(cosTheta)
  705. local invSinTheta = 1 / SIN(theta)
  706. startInterp = SIN((1 - t) * theta) * invSinTheta
  707. finishInterp = SIN(t * theta) * invSinTheta
  708. else
  709. startInterp = 1 - t
  710. finishInterp = t
  711. end
  712. else
  713. if (1 + cosTheta) > 0.0001 then
  714. local theta = ACOS(-cosTheta)
  715. local invSinTheta = 1 / SIN(theta)
  716. startInterp = SIN((t - 1) * theta) * invSinTheta
  717. finishInterp = SIN(t * theta) * invSinTheta
  718. else
  719. startInterp = t - 1
  720. finishInterp = t
  721. end
  722. end
  723. 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
  724. end
  725.  
  726. function Clerp(a, b, t)
  727. local qa = {QuaternionFromCFrame(a)}
  728. local qb = {QuaternionFromCFrame(b)}
  729. local ax, ay, az = a.x, a.y, a.z
  730. local bx, by, bz = b.x, b.y, b.z
  731. local _t = 1 - t
  732. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  733. end
  734.  
  735. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  736. local frame = IT("Frame")
  737. frame.BackgroundTransparency = TRANSPARENCY
  738. frame.BorderSizePixel = BORDERSIZEPIXEL
  739. frame.Position = POSITION
  740. frame.Size = SIZE
  741. frame.BackgroundColor3 = COLOR
  742. frame.BorderColor3 = BORDERCOLOR
  743. frame.Name = NAME
  744. frame.Parent = PARENT
  745. return frame
  746. end
  747.  
  748. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  749. local label = IT("TextLabel")
  750. label.BackgroundTransparency = 1
  751. label.Size = UD2(1, 0, 1, 0)
  752. label.Position = UD2(0, 0, 0, 0)
  753. label.TextColor3 = TEXTCOLOR
  754. label.TextStrokeTransparency = STROKETRANSPARENCY
  755. label.TextTransparency = TRANSPARENCY
  756. label.FontSize = TEXTFONTSIZE
  757. label.Font = TEXTFONT
  758. label.BorderSizePixel = BORDERSIZEPIXEL
  759. label.TextScaled = false
  760. label.Text = TEXT
  761. label.Name = NAME
  762. label.Parent = PARENT
  763. return label
  764. end
  765.  
  766. function NoOutlines(PART)
  767. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  768. end
  769.  
  770. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  771. local NEWWELD = IT(TYPE)
  772. NEWWELD.Part0 = PART0
  773. NEWWELD.Part1 = PART1
  774. NEWWELD.C0 = C0
  775. NEWWELD.C1 = C1
  776. NEWWELD.Parent = PARENT
  777. return NEWWELD
  778. end
  779.  
  780. local S = IT("Sound")
  781. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  782. local NEWSOUND = nil
  783. coroutine.resume(coroutine.create(function()
  784. NEWSOUND = S:Clone()
  785. NEWSOUND.Parent = PARENT
  786. NEWSOUND.Volume = VOLUME
  787. NEWSOUND.Pitch = PITCH
  788. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  789. NEWSOUND:play()
  790. if DOESLOOP == true then
  791. NEWSOUND.Looped = true
  792. else
  793. repeat wait(1) until NEWSOUND.Playing == false
  794. NEWSOUND:remove()
  795. end
  796. end))
  797. return NEWSOUND
  798. end
  799.  
  800.  
  801. local EyeSizes={
  802. NumberSequenceKeypoint.new(0,2,0),
  803. NumberSequenceKeypoint.new(1,0,0)
  804. }
  805. local EyeTrans={
  806. NumberSequenceKeypoint.new(0,0.5,0),
  807. NumberSequenceKeypoint.new(1,1,0)
  808. }
  809. local PE=Instance.new("ParticleEmitter",nil)
  810. PE.LightEmission=.8
  811. PE.Color = ColorSequence.new(BRICKC("Lime green").Color,BRICKC("Lime green").Color)
  812. PE.Size=NumberSequence.new(EyeSizes)
  813. PE.Transparency=NumberSequence.new(EyeTrans)
  814. PE.Lifetime=NumberRange.new(0.35,1)
  815. PE.Rotation=NumberRange.new(0,360)
  816. PE.Rate=100
  817. PE.VelocitySpread = 10000
  818. PE.Acceleration = Vector3.new(0,85,0)
  819. PE.Drag = 5
  820. PE.Speed = NumberRange.new(0.1,5)
  821. PE.Texture="http://www.roblox.com/asset/?id=1460745664"
  822. PE.ZOffset = 0.5
  823. PE.Name = "PE"
  824. PE.Enabled = false
  825.  
  826. function Fire(art)
  827. local PARTICLES = PE:Clone()
  828. PARTICLES.Parent = art
  829. PARTICLES.Enabled = true
  830. return PARTICLES
  831. end
  832.  
  833. function CFrameFromTopBack(at, top, back)
  834. local right = top:Cross(back)
  835. 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)
  836. end
  837.  
  838. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  839. function WACKYEFFECT(Table)
  840. local TYPE = (Table.EffectType or "Sphere")
  841. local SIZE = (Table.Size or VT(1,1,1))
  842. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  843. local TRANSPARENCY = (Table.Transparency or 0)
  844. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  845. local CFRAME = (Table.CFrame or Torso.CFrame)
  846. local MOVEDIRECTION = (Table.MoveToPos or nil)
  847. local ROTATION1 = (Table.RotationX or 0)
  848. local ROTATION2 = (Table.RotationY or 0)
  849. local ROTATION3 = (Table.RotationZ or 0)
  850. local MATERIAL = (Table.Material or "Neon")
  851. local COLOR = (Table.Color or C3(1,1,1))
  852. local TIME = (Table.Time or 45)
  853. local SOUNDID = (Table.SoundID or nil)
  854. local SOUNDPITCH = (Table.SoundPitch or nil)
  855. local SOUNDVOLUME = (Table.SoundVolume or nil)
  856. coroutine.resume(coroutine.create(function()
  857. local PLAYSSOUND = false
  858. local SOUND = nil
  859. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Lime green"), "Effect", VT(1,1,1), true)
  860. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  861. PLAYSSOUND = true
  862. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  863. end
  864. EFFECT.Color = COLOR
  865. local MSH = nil
  866. if TYPE == "Sphere" then
  867. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  868. elseif TYPE == "Block" or TYPE == "Box" then
  869. MSH = IT("BlockMesh",EFFECT)
  870. MSH.Scale = SIZE
  871. elseif TYPE == "Wave" then
  872. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  873. elseif TYPE == "Ring" then
  874. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  875. elseif TYPE == "Slash" then
  876. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  877. elseif TYPE == "Round Slash" then
  878. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  879. elseif TYPE == "Swirl" then
  880. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  881. elseif TYPE == "Skull" then
  882. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  883. elseif TYPE == "Crystal" then
  884. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  885. end
  886. if MSH ~= nil then
  887. local MOVESPEED = nil
  888. if MOVEDIRECTION ~= nil then
  889. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  890. end
  891. local GROWTH = SIZE - ENDSIZE
  892. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  893. if TYPE == "Block" then
  894. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  895. else
  896. EFFECT.CFrame = CFRAME
  897. end
  898. for LOOP = 1, TIME+1 do
  899. Swait()
  900. MSH.Scale = MSH.Scale - GROWTH/TIME
  901. if TYPE == "Wave" then
  902. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  903. end
  904. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  905. if TYPE == "Block" then
  906. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  907. else
  908. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  909. end
  910. if MOVEDIRECTION ~= nil then
  911. local ORI = EFFECT.Orientation
  912. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  913. EFFECT.Orientation = ORI
  914. end
  915. end
  916. if PLAYSSOUND == false then
  917. EFFECT:remove()
  918. else
  919. repeat wait(1) until SOUND.Playing == false
  920. EFFECT:remove()
  921. end
  922. else
  923. if PLAYSSOUND == false then
  924. EFFECT:remove()
  925. else
  926. repeat Swait() until SOUND.Playing == false
  927. EFFECT:remove()
  928. end
  929. end
  930. end))
  931. end
  932.  
  933. function MakeForm(PART,TYPE)
  934. if TYPE == "Cyl" then
  935. local MSH = IT("CylinderMesh",PART)
  936. elseif TYPE == "Ball" then
  937. local MSH = IT("SpecialMesh",PART)
  938. MSH.MeshType = "Sphere"
  939. elseif TYPE == "Wedge" then
  940. local MSH = IT("SpecialMesh",PART)
  941. MSH.MeshType = "Wedge"
  942. end
  943. end
  944.  
  945. Debris = game:GetService("Debris")
  946.  
  947. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  948. local DIRECTION = CF(StartPos,EndPos).lookVector
  949. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  950. end
  951.  
  952. local HATWELD = nil
  953. function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
  954. PLAYMAINANIM = false
  955. if WhichPose == "Cast1" then
  956. for i=0, Time, 0.1 / Animation_Speed do
  957. Swait()
  958. if Magic == true then
  959. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  960. end
  961. if Gyro ~= nil and Gyro ~= false then
  962. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  963. end
  964. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
  965. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
  966. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  967. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  968. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  969. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  970. end
  971. elseif WhichPose == "Cast2" then
  972. for i=0, Time, 0.1 / Animation_Speed do
  973. Swait()
  974. if Magic == true then
  975. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  976. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  977. end
  978. if Gyro ~= nil and Gyro ~= false then
  979. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  980. end
  981. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  982. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  983. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  984. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  985. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  986. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  987. end
  988. elseif WhichPose == "RightArmUp" then
  989. for i=0, Time, 0.1 / Animation_Speed do
  990. Swait()
  991. if Magic == true then
  992. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  993. end
  994. if Gyro ~= nil and Gyro ~= false then
  995. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  996. end
  997. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
  998. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
  999. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1000. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1001. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1002. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1003. end
  1004. elseif WhichPose == "Taunt" then
  1005. for i=0, Time, 0.1 / Animation_Speed do
  1006. Swait()
  1007. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  1008. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  1009. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1010. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1011. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1012. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1013. end
  1014. HATWELD.Part0 = RightArm
  1015. HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
  1016. CreateSound(137473066,Torso,10,1,false)
  1017. for i=0, Time*2, 0.1 / Animation_Speed do
  1018. Swait()
  1019. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  1020. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  1021. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1022. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1023. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1024. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1025. end
  1026. for i=0, Time, 0.1 / Animation_Speed do
  1027. Swait()
  1028. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  1029. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
  1030. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1031. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1032. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1033. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1034. HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
  1035. end
  1036. HATWELD.Part0 = Head
  1037. HATWELD.C0 = CF(0,0.35,0)
  1038. elseif WhichPose == "Prepare key" then
  1039. for i=0, Time, 0.1 / Animation_Speed do
  1040. Swait()
  1041. if Gyro ~= nil and Gyro ~= false then
  1042. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1043. end
  1044. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
  1045. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
  1046. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1047. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1048. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1049. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1050. end
  1051. elseif WhichPose == "Turn key" then
  1052. for i=0, Time, 0.1 / Animation_Speed do
  1053. Swait()
  1054. if Gyro ~= nil and Gyro ~= false then
  1055. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  1056. end
  1057. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
  1058. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
  1059. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  1060. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  1061. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  1062. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  1063. end
  1064. end
  1065. PLAYMAINANIM = true
  1066. end
  1067.  
  1068. --Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
  1069. function Lightning(Table)
  1070. local Color = Table.Color or C3(1,1,1)
  1071. local StartPos = Table.Start or Torso.Position
  1072. local EndPos = Table.End or Mouse.Hit.p
  1073. local SegmentLength = Table.SegmentL or 2
  1074. local Thickness = Table.Thickness or 0.1
  1075. local Dissapear = Table.DoesFade or false
  1076. local Parent = Table.Ignore or Character
  1077. local MaxDist = Table.MaxDist or 400
  1078. local Branches = Table.Branches or false
  1079. local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
  1080. local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
  1081. local LIGHTNINGMODEL = IT("Model",Effects)
  1082. LIGHTNINGMODEL.Name = "Lightning"
  1083. local LastBolt = nil
  1084. for E = 1, DISTANCE do
  1085. local ExtraSize = (DISTANCE-E)/15
  1086. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Lime green"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
  1087. PART.Color = Color
  1088. MakeForm(PART,"Cyl")
  1089. if LastBolt == nil then
  1090. PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1091. else
  1092. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1093. end
  1094. LastBolt = PART
  1095. if Branches == true then
  1096. local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
  1097. if CHOICE == 1 then
  1098. local LASTBRANCH = nil
  1099. for i = 1, MRANDOM(2,5) do
  1100. local ExtraSize2 = ((DISTANCE-E)/25)/i
  1101. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Crimson"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
  1102. PART.Color = Color
  1103. MakeForm(PART,"Cyl")
  1104. if LASTBRANCH == nil then
  1105. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1106. else
  1107. PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  1108. end
  1109. LASTBRANCH = PART
  1110. end
  1111. end
  1112. end
  1113. end
  1114. if Dissapear == true then
  1115. coroutine.resume(coroutine.create(function()
  1116. for i = 1, 10 do
  1117. Swait()
  1118. for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
  1119. if c.ClassName == "Part" then
  1120. c.Transparency = i/10
  1121. end
  1122. end
  1123. end
  1124. LIGHTNINGMODEL:remove()
  1125. end))
  1126. elseif Dissapear == false then
  1127. Debris:AddItem(LIGHTNINGMODEL,0.1)
  1128. end
  1129. return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
  1130. end
  1131.  
  1132. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1133. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1134. end
  1135.  
  1136. function PositiveAngle(NUMBER)
  1137. if NUMBER >= 0 then
  1138. NUMBER = 0
  1139. end
  1140. return NUMBER
  1141. end
  1142.  
  1143. function NegativeAngle(NUMBER)
  1144. if NUMBER <= 0 then
  1145. NUMBER = 0
  1146. end
  1147. return NUMBER
  1148. end
  1149.  
  1150. function Swait(NUMBER)
  1151. if NUMBER == 0 or NUMBER == nil then
  1152. ArtificialHB.Event:wait()
  1153. else
  1154. for i = 1, NUMBER do
  1155. ArtificialHB.Event:wait()
  1156. end
  1157. end
  1158. end
  1159.  
  1160. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  1161. local NEWMESH = IT(MESH)
  1162. if MESH == "SpecialMesh" then
  1163. NEWMESH.MeshType = MESHTYPE
  1164. if MESHID ~= "nil" and MESHID ~= "" then
  1165. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  1166. end
  1167. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  1168. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  1169. end
  1170. end
  1171. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  1172. NEWMESH.Scale = SCALE
  1173. NEWMESH.Parent = PARENT
  1174. return NEWMESH
  1175. end
  1176.  
  1177. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  1178. local NEWPART = IT("Part")
  1179. NEWPART.formFactor = FORMFACTOR
  1180. NEWPART.Reflectance = REFLECTANCE
  1181. NEWPART.Transparency = TRANSPARENCY
  1182. NEWPART.CanCollide = false
  1183. NEWPART.Locked = true
  1184. NEWPART.Anchored = true
  1185. if ANCHOR == false then
  1186. NEWPART.Anchored = false
  1187. end
  1188. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  1189. NEWPART.Name = NAME
  1190. NEWPART.Size = SIZE
  1191. NEWPART.Position = Torso.Position
  1192. NEWPART.Material = MATERIAL
  1193. NEWPART:BreakJoints()
  1194. NEWPART.Parent = PARENT
  1195. return NEWPART
  1196. end
  1197.  
  1198. local function weldBetween(a, b)
  1199. local weldd = Instance.new("ManualWeld")
  1200. weldd.Part0 = a
  1201. weldd.Part1 = b
  1202. weldd.C0 = CFrame.new()
  1203. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1204. weldd.Parent = a
  1205. return weldd
  1206. end
  1207.  
  1208.  
  1209. function QuaternionFromCFrame(cf)
  1210. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1211. local trace = m00 + m11 + m22
  1212. if trace > 0 then
  1213. local s = math.sqrt(1 + trace)
  1214. local recip = 0.5 / s
  1215. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1216. else
  1217. local i = 0
  1218. if m11 > m00 then
  1219. i = 1
  1220. end
  1221. if m22 > (i == 0 and m00 or m11) then
  1222. i = 2
  1223. end
  1224. if i == 0 then
  1225. local s = math.sqrt(m00 - m11 - m22 + 1)
  1226. local recip = 0.5 / s
  1227. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1228. elseif i == 1 then
  1229. local s = math.sqrt(m11 - m22 - m00 + 1)
  1230. local recip = 0.5 / s
  1231. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1232. elseif i == 2 then
  1233. local s = math.sqrt(m22 - m00 - m11 + 1)
  1234. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1235. end
  1236. end
  1237. end
  1238.  
  1239. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1240. local xs, ys, zs = x + x, y + y, z + z
  1241. local wx, wy, wz = w * xs, w * ys, w * zs
  1242. local xx = x * xs
  1243. local xy = x * ys
  1244. local xz = x * zs
  1245. local yy = y * ys
  1246. local yz = y * zs
  1247. local zz = z * zs
  1248. 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))
  1249. end
  1250.  
  1251. function QuaternionSlerp(a, b, t)
  1252. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1253. local startInterp, finishInterp;
  1254. if cosTheta >= 0.0001 then
  1255. if (1 - cosTheta) > 0.0001 then
  1256. local theta = ACOS(cosTheta)
  1257. local invSinTheta = 1 / SIN(theta)
  1258. startInterp = SIN((1 - t) * theta) * invSinTheta
  1259. finishInterp = SIN(t * theta) * invSinTheta
  1260. else
  1261. startInterp = 1 - t
  1262. finishInterp = t
  1263. end
  1264. else
  1265. if (1 + cosTheta) > 0.0001 then
  1266. local theta = ACOS(-cosTheta)
  1267. local invSinTheta = 1 / SIN(theta)
  1268. startInterp = SIN((t - 1) * theta) * invSinTheta
  1269. finishInterp = SIN(t * theta) * invSinTheta
  1270. else
  1271. startInterp = t - 1
  1272. finishInterp = t
  1273. end
  1274. end
  1275. 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
  1276. end
  1277.  
  1278. function Clerp(a, b, t)
  1279. local qa = {QuaternionFromCFrame(a)}
  1280. local qb = {QuaternionFromCFrame(b)}
  1281. local ax, ay, az = a.x, a.y, a.z
  1282. local bx, by, bz = b.x, b.y, b.z
  1283. local _t = 1 - t
  1284. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1285. end
  1286.  
  1287. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1288. local frame = IT("Frame")
  1289. frame.BackgroundTransparency = TRANSPARENCY
  1290. frame.BorderSizePixel = BORDERSIZEPIXEL
  1291. frame.Position = POSITION
  1292. frame.Size = SIZE
  1293. frame.BackgroundColor3 = COLOR
  1294. frame.BorderColor3 = BORDERCOLOR
  1295. frame.Name = NAME
  1296. frame.Parent = PARENT
  1297. return frame
  1298. end
  1299.  
  1300. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1301. local label = IT("TextLabel")
  1302. label.BackgroundTransparency = 1
  1303. label.Size = UD2(1, 0, 1, 0)
  1304. label.Position = UD2(0, 0, 0, 0)
  1305. label.TextColor3 = TEXTCOLOR
  1306. label.TextStrokeTransparency = STROKETRANSPARENCY
  1307. label.TextTransparency = TRANSPARENCY
  1308. label.FontSize = TEXTFONTSIZE
  1309. label.Font = TEXTFONT
  1310. label.BorderSizePixel = BORDERSIZEPIXEL
  1311. label.TextScaled = false
  1312. label.Text = TEXT
  1313. label.Name = NAME
  1314. label.Parent = PARENT
  1315. return label
  1316. end
  1317.  
  1318. function NoOutlines(PART)
  1319. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1320. end
  1321.  
  1322. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1323. local NEWWELD = IT(TYPE)
  1324. NEWWELD.Part0 = PART0
  1325. NEWWELD.Part1 = PART1
  1326. NEWWELD.C0 = C0
  1327. NEWWELD.C1 = C1
  1328. NEWWELD.Parent = PARENT
  1329. return NEWWELD
  1330. end
  1331.  
  1332. local S = IT("Sound")
  1333. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  1334. local NEWSOUND = nil
  1335. coroutine.resume(coroutine.create(function()
  1336. NEWSOUND = S:Clone()
  1337. NEWSOUND.Parent = PARENT
  1338. NEWSOUND.Volume = VOLUME
  1339. NEWSOUND.Pitch = PITCH
  1340. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1341. NEWSOUND:play()
  1342. if DOESLOOP == true then
  1343. NEWSOUND.Looped = true
  1344. else
  1345. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  1346. NEWSOUND:remove()
  1347. end
  1348. end))
  1349. return NEWSOUND
  1350. end
  1351.  
  1352. function CFrameFromTopBack(at, top, back)
  1353. local right = top:Cross(back)
  1354. 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)
  1355. end
  1356.  
  1357. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1358. function WACKYEFFECT(Table)
  1359. local TYPE = (Table.EffectType or "Sphere")
  1360. local SIZE = (Table.Size or VT(1,1,1))
  1361. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  1362. local TRANSPARENCY = (Table.Transparency or 0)
  1363. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  1364. local CFRAME = (Table.CFrame or Torso.CFrame)
  1365. local MOVEDIRECTION = (Table.MoveToPos or nil)
  1366. local ROTATION1 = (Table.RotationX or 0)
  1367. local ROTATION2 = (Table.RotationY or 0)
  1368. local ROTATION3 = (Table.RotationZ or 0)
  1369. local MATERIAL = (Table.Material or "Neon")
  1370. local COLOR = (Table.Color or C3(1,1,1))
  1371. local TIME = (Table.Time or 45)
  1372. local SOUNDID = (Table.SoundID or nil)
  1373. local SOUNDPITCH = (Table.SoundPitch or nil)
  1374. local SOUNDVOLUME = (Table.SoundVolume or nil)
  1375. coroutine.resume(coroutine.create(function()
  1376. local PLAYSSOUND = false
  1377. local SOUND = nil
  1378. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  1379. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1380. PLAYSSOUND = true
  1381. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1382. end
  1383. EFFECT.Color = COLOR
  1384. local MSH = nil
  1385. if TYPE == "Sphere" then
  1386. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1387. elseif TYPE == "Block" then
  1388. MSH = IT("BlockMesh",EFFECT)
  1389. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  1390. elseif TYPE == "Wave" then
  1391. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1392. elseif TYPE == "Ring" then
  1393. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1394. elseif TYPE == "Slash" then
  1395. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1396. elseif TYPE == "Round Slash" then
  1397. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1398. elseif TYPE == "Swirl" then
  1399. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1400. elseif TYPE == "Skull" then
  1401. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1402. elseif TYPE == "Crystal" then
  1403. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1404. end
  1405. if MSH ~= nil then
  1406. local MOVESPEED = nil
  1407. if MOVEDIRECTION ~= nil then
  1408. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1409. end
  1410. local GROWTH = SIZE - ENDSIZE
  1411. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1412. if TYPE == "Block" then
  1413. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1414. else
  1415. EFFECT.CFrame = CFRAME
  1416. end
  1417. for LOOP = 1, TIME+1 do
  1418. Swait()
  1419. MSH.Scale = MSH.Scale - GROWTH/TIME
  1420. if TYPE == "Wave" then
  1421. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1422. end
  1423. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1424. if TYPE == "Block" then
  1425. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1426. else
  1427. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1428. end
  1429. if MOVEDIRECTION ~= nil then
  1430. local ORI = EFFECT.Orientation
  1431. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1432. EFFECT.Orientation = ORI
  1433. end
  1434. end
  1435. if PLAYSSOUND == false then
  1436. EFFECT:remove()
  1437. else
  1438. SOUND.Stopped:Connect(function()
  1439. EFFECT:remove()
  1440. end)
  1441. end
  1442. else
  1443. if PLAYSSOUND == false then
  1444. EFFECT:remove()
  1445. else
  1446. repeat Swait() until SOUND.Playing == false
  1447. EFFECT:remove()
  1448. end
  1449. end
  1450. end))
  1451. end
  1452.  
  1453. function MakeForm(PART,TYPE)
  1454. if TYPE == "Cyl" then
  1455. local MSH = IT("CylinderMesh",PART)
  1456. elseif TYPE == "Ball" then
  1457. local MSH = IT("SpecialMesh",PART)
  1458. MSH.MeshType = "Sphere"
  1459. elseif TYPE == "Wedge" then
  1460. local MSH = IT("SpecialMesh",PART)
  1461. MSH.MeshType = "Wedge"
  1462. end
  1463. end
  1464.  
  1465. function SpawnTrail(FROM,TO,BIG)
  1466. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
  1467. MakeForm(TRAIL,"Cyl")
  1468. local DIST = (FROM - TO).Magnitude
  1469. if BIG == true then
  1470. TRAIL.Size = VT(0.5,DIST,0.5)
  1471. else
  1472. TRAIL.Size = VT(0.25,DIST,0.25)
  1473. end
  1474. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  1475. coroutine.resume(coroutine.create(function()
  1476. for i = 1, 5 do
  1477. Swait()
  1478. TRAIL.Transparency = TRAIL.Transparency + 0.1
  1479. end
  1480. TRAIL:remove()
  1481. end))
  1482. end
  1483.  
  1484. Debris = game:GetService("Debris")
  1485.  
  1486. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1487. local DIRECTION = CF(StartPos,EndPos).lookVector
  1488. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1489. end
  1490.  
  1491. function turnto(position)
  1492. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1493. end
  1494.  
  1495. --//=================================\\
  1496. --|| WEAPON CREATION
  1497. --\\=================================//
  1498. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  1499. MakeForm(EYE,"Ball")
  1500. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
  1501. local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  1502. MakeForm(EYE2,"Ball")
  1503. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
  1504. local LASTPART = Head
  1505. for i = 1, 20 do
  1506. local MATH = (1-(i/25))
  1507. if LASTPART == Head then
  1508. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1509. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(15), RAD(-15)), CF(0, 0, 0))
  1510. LASTPART = Horn
  1511. Horn.Color = C3((i*3-3)/255,0,0)
  1512. else
  1513. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1514. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0, Horn.Size.Y/1.8, 0) * ANGLES(RAD(6), RAD(-0.3), RAD(0)), CF(0, 0, 0))
  1515. LASTPART = Horn
  1516. Horn.Color = C3((i*3-3)/255,0,0)
  1517. end
  1518. end
  1519. local LASTPART = Head
  1520. for i = 1, 20 do
  1521. local MATH = (1-(i/25))
  1522. if LASTPART == Head then
  1523. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1524. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(-0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(-15), RAD(15)), CF(0, 0, 0))
  1525. LASTPART = Horn
  1526. Horn.Color = C3((i*3-3)/255,0,0)
  1527. else
  1528. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1529. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0, Horn.Size.Y/1.8, 0) * ANGLES(RAD(6), RAD(0.3), RAD(0)), CF(0, 0, 0))
  1530. LASTPART = Horn
  1531. Horn.Color = C3((i*3-3)/255,0,0)
  1532. end
  1533. end
  1534.  
  1535. local Particle = IT("ParticleEmitter",nil)
  1536. Particle.Enabled = false
  1537. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  1538. Particle.LightEmission = 0.5
  1539. Particle.Rate = 150
  1540. Particle.ZOffset = 0.2
  1541. Particle.Rotation = NumberRange.new(-180, 180)
  1542. Particle.RotSpeed = NumberRange.new(-180, 180)
  1543. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  1544. Particle.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
  1545. local Particle2 = IT("ParticleEmitter",nil)
  1546. Particle2.Enabled = false
  1547. Particle2.Texture = "http://www.roblox.com/asset/?id=1369397597"
  1548. Particle2.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
  1549. Particle2.LightEmission = 0
  1550. Particle2.RotSpeed = NumberRange.new(0, 180)
  1551. Particle2.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  1552. Particle2.LightEmission = 1
  1553. Particle2.Rate = 20
  1554. Particle2.RotSpeed = NumberRange.new(-20, 20)
  1555. local Particle3 = IT("ParticleEmitter",nil)
  1556. Particle3.Enabled = false
  1557. Particle3.Texture = "http://www.roblox.com/asset/?id=1546470121"
  1558. Particle3.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
  1559. Particle3.LightEmission = 0
  1560. Particle3.RotSpeed = NumberRange.new(0, 180)
  1561. Particle3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.7),NumberSequenceKeypoint.new(0.3,.9),NumberSequenceKeypoint.new(1,1)})
  1562. Particle3.LightEmission = 1
  1563. Particle3.Rate = 20
  1564. Particle3.RotSpeed = NumberRange.new(-20, 20)
  1565. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  1566. function ParticleEmitter(Table)
  1567. local PRTCL = Particle:Clone()
  1568. local Speed = Table.Speed or 5
  1569. local Drag = Table.Drag or 0
  1570. local Size1 = Table.Size1 or 1
  1571. local Size2 = Table.Size2 or 5
  1572. local Lifetime1 = Table.Lifetime1 or 1
  1573. local Lifetime2 = Table.Lifetime2 or 1.5
  1574. local Parent = Table.Parent or Torso
  1575. local Emit = Table.Emit or 100
  1576. local Offset = Table.Offset or 360
  1577. local Acel = Table.Acel or VT(0,0,0)
  1578. local Enabled = Table.Enabled or false
  1579. PRTCL.Parent = Parent
  1580. PRTCL.Size = NumberSequence.new(Size1,Size2)
  1581. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1582. PRTCL.Speed = NumberRange.new(Speed)
  1583. PRTCL.VelocitySpread = Offset
  1584. PRTCL.Drag = Drag
  1585. PRTCL.Acceleration = Acel
  1586. if Enabled == false then
  1587. PRTCL:Emit(Emit)
  1588. Debris:AddItem(PRTCL,Lifetime2)
  1589. else
  1590. PRTCL.Enabled = true
  1591. end
  1592. return PRTCL
  1593. end
  1594. function ParticleEmitter2(Table)
  1595. local PRTCL2 = Particle2:Clone()
  1596. local LockedToPart = Table.LTP or true
  1597. local Speed = Table.Speed or 0
  1598. local Drag = Table.Drag or 0
  1599. local Size1 = Table.Size1 or 1
  1600. local Size2 = Table.Size2 or 2
  1601. local Lifetime1 = Table.Lifetime1 or 1
  1602. local Lifetime2 = Table.Lifetime2 or 1
  1603. local Parent = Table.Parent or Torso
  1604. local Emit = Table.Emit or 100
  1605. local Offset = Table.Offset or 360
  1606. local Acel = Table.Acel or VT(0,0,0)
  1607. local Enabled = Table.Enabled or false
  1608. PRTCL2.Parent = Parent
  1609. PRTCL2.Size = NumberSequence.new(Size1,Size2)
  1610. PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1611. PRTCL2.Speed = NumberRange.new(Speed)
  1612. PRTCL2.VelocitySpread = Offset
  1613. PRTCL2.Drag = Drag
  1614. PRTCL2.Acceleration = Acel
  1615. PRTCL2.Parent = Parent
  1616. PRTCL2.Size = NumberSequence.new(Size1,Size2)
  1617. PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1618. PRTCL2.Speed = NumberRange.new(Speed)
  1619. PRTCL2.VelocitySpread = Offset
  1620. PRTCL2.Drag = Drag
  1621. PRTCL2.Acceleration = Acel
  1622. PRTCL2.LockedToPart = true
  1623. if Enabled == false then
  1624. PRTCL2:Emit(Emit)
  1625. Debris:AddItem(PRTCL2,Lifetime2)
  1626. else
  1627. PRTCL2.Enabled = true
  1628. end
  1629. return PRTCL2
  1630. end
  1631. function ParticleEmitter3(Table)
  1632. local PRTCL3 = Particle2:Clone()
  1633. local Speed = Table.Speed or 0
  1634. local Drag = Table.Drag or 0
  1635. local Size1 = Table.Size1 or 1
  1636. local Size2 = Table.Size2 or 2
  1637. local Lifetime1 = Table.Lifetime1 or 1
  1638. local Lifetime2 = Table.Lifetime2 or 1
  1639. local Parent = Table.Parent or Torso
  1640. local Emit = Table.Emit or 100
  1641. local Offset = Table.Offset or 0
  1642. local Acel = Table.Acel or VT(0,0,0)
  1643. local Enabled = Table.Enabled or false
  1644. PRTCL3.Parent = Parent
  1645. PRTCL3.Size = NumberSequence.new(Size1,Size2)
  1646. PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1647. PRTCL3.Speed = NumberRange.new(Speed)
  1648. PRTCL3.VelocitySpread = Offset
  1649. PRTCL3.Drag = Drag
  1650. PRTCL3.Acceleration = Acel
  1651. PRTCL3.Parent = Parent
  1652. PRTCL3.Size = NumberSequence.new(Size1,Size2)
  1653. PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1654. PRTCL3.Speed = NumberRange.new(Speed)
  1655. PRTCL3.VelocitySpread = Offset
  1656. PRTCL3.Drag = Drag
  1657. PRTCL3.Acceleration = Acel
  1658. if Enabled == false then
  1659. PRTCL3:Emit(Emit)
  1660. Debris:AddItem(PRTCL3,Lifetime2)
  1661. else
  1662. PRTCL3.Enabled = true
  1663. end
  1664. return PRTCL3
  1665. end
  1666.  
  1667. local Particle = IT("ParticleEmitter",nil)
  1668. Particle.Enabled = false
  1669. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  1670. Particle.LightEmission = 0.5
  1671. Particle.Rate = 150
  1672. Particle.ZOffset = 0.2
  1673. Particle.Rotation = NumberRange.new(-180, 180)
  1674. Particle.RotSpeed = NumberRange.new(-180, 180)
  1675. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  1676. Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
  1677.  
  1678. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  1679. function ParticleEmitter(Table)
  1680. local PRTCL = Particle:Clone()
  1681. local Speed = Table.Speed or 5
  1682. local Drag = Table.Drag or 0
  1683. local Size1 = Table.Size1 or 1
  1684. local Size2 = Table.Size2 or 5
  1685. local Lifetime1 = Table.Lifetime1 or 1
  1686. local Lifetime2 = Table.Lifetime2 or 1.5
  1687. local Parent = Table.Parent or Torso
  1688. local Emit = Table.Emit or 100
  1689. local Offset = Table.Offset or 360
  1690. local Acel = Table.Acel or VT(0,0,0)
  1691. local Enabled = Table.Enabled or false
  1692. PRTCL.Parent = Parent
  1693. PRTCL.Size = NumberSequence.new(Size1,Size2)
  1694. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1695. PRTCL.Speed = NumberRange.new(Speed)
  1696. PRTCL.VelocitySpread = Offset
  1697. PRTCL.Drag = Drag
  1698. PRTCL.Acceleration = Acel
  1699. if Enabled == false then
  1700. PRTCL:Emit(Emit)
  1701. Debris:AddItem(PRTCL,Lifetime2)
  1702. else
  1703. PRTCL.Enabled = true
  1704. end
  1705. return PRTCL
  1706. end
  1707.  
  1708. local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
  1709. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
  1710. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  1711. MakeForm(Part,"Wedge")
  1712. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  1713. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
  1714. MakeForm(Part,"Wedge")
  1715. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
  1716. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
  1717. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1718. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
  1719. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1720. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
  1721. MakeForm(Part,"Cyl")
  1722. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1723. for i = 1, 8 do
  1724. local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
  1725. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  1726. end
  1727. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
  1728. MakeForm(Part,"Cyl")
  1729. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1730. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
  1731. MakeForm(Part,"Ball")
  1732. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1733. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
  1734. MakeForm(Part,"Wedge")
  1735. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
  1736. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
  1737. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1738. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
  1739. MakeForm(Part,"Cyl")
  1740. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1741. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
  1742. MakeForm(Part,"Cyl")
  1743. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1744. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
  1745. MakeForm(Part,"Cyl")
  1746. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1747. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  1748. MakeForm(Part,"Wedge")
  1749. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  1750. local LASTPART = Handle
  1751. for i = 1, 10 do
  1752. if LASTPART == Handle then
  1753. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
  1754. LASTPART = Part
  1755. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1756. else
  1757. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
  1758. CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
  1759. LASTPART = Part
  1760. end
  1761. end
  1762.  
  1763. local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
  1764. MakeForm(Barrel,"Cyl")
  1765. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  1766. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
  1767. MakeForm(Part,"Cyl")
  1768. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
  1769. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
  1770. MakeForm(Part,"Wedge")
  1771. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  1772. local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
  1773. MakeForm(Hole,"Cyl")
  1774. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
  1775. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
  1776. local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  1777. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
  1778. local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
  1779. local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  1780. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
  1781. coroutine.resume(coroutine.create(function()
  1782. while wait() do
  1783. GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
  1784. GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
  1785. end
  1786. end))
  1787.  
  1788. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  1789. --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  1790.  
  1791. for _, c in pairs(Weapon:GetDescendants()) do
  1792. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  1793. c.Material = "Glass"
  1794. c.Color = C3(0,0,0)
  1795. elseif c.ClassName == "Part" and c.Name == "Eye" then
  1796. c.Color = C3(1,0,0)
  1797. c.Material = "Neon"
  1798. end
  1799. end
  1800.  
  1801. Weapon.Parent = Character
  1802. for _, c in pairs(Weapon:GetChildren()) do
  1803. if c.ClassName == "Part" then
  1804. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1805. end
  1806. end
  1807.  
  1808. local BODY = {}
  1809. for _, c in pairs(Character:GetDescendants()) do
  1810. if c:IsA("BasePart") and c.Name ~= "Handle" then
  1811. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  1812. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1813. end
  1814. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency,c.Size,c.Name})
  1815. elseif c:IsA("JointInstance") then
  1816. table.insert(BODY,{c,c.Parent,nil,nil,nil,nil,nil})
  1817. end
  1818. end
  1819. function refit()
  1820. Character.Parent = workspace
  1821. for e = 1, #BODY do
  1822. if BODY[e] ~= nil then
  1823. local STUFF = BODY[e]
  1824. local PART = STUFF[1]
  1825. local PARENT = STUFF[2]
  1826. local MATERIAL = STUFF[3]
  1827. local COLOR = STUFF[4]
  1828. local TRANSPARENCY = STUFF[5]
  1829. --local SIZE = STUFF[6]
  1830. local NAME = STUFF[7]
  1831. if PART.ClassName == "Part" and PART ~= RootPart then
  1832. PART.Material = MATERIAL
  1833. PART.Transparency = TRANSPARENCY
  1834. PART.Name = NAME
  1835. end
  1836. if PART.Parent ~= PARENT then
  1837. Humanoid:remove()
  1838. PART.Parent = PARENT
  1839. Humanoid = IT("Humanoid",Character)
  1840. end
  1841. end
  1842. end
  1843. end
  1844.  
  1845. local SKILLTEXTCOLOR = C3(1,0,0)
  1846. local SKILLFONT = "Antique"
  1847. local SKILLTEXTSIZE = 7
  1848.  
  1849. Humanoid.Died:connect(function()
  1850. ATTACK = true
  1851. end)
  1852.  
  1853. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  1854. --[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  1855. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  1856. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  1857. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  1858. ]]
  1859. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
  1860. --[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
  1861. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
  1862. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
  1863. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
  1864. ]]
  1865. function printbye(Name)
  1866. local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
  1867. warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")
  1868. end
  1869.  
  1870. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23-.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  1871. local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50+.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  1872. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  1873. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  1874. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  1875.  
  1876. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[E] Warp", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  1877. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[X] Lock of truth", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  1878. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[Q] Lift", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
  1879. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[R] FINAL ATTACK", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
  1880.  
  1881. workspace.ChildAdded:connect(function(instance)
  1882. for BANISH = 1, #TOBANISH do
  1883. if TOBANISH[BANISH] ~= nil then
  1884. if instance.Name == TOBANISH[BANISH] then
  1885. coroutine.resume(coroutine.create(function()
  1886. printbye(instance.Name)
  1887. instance:ClearAllChildren()
  1888. Debris:AddItem(instance,0.0005)
  1889. end))
  1890. end
  1891. end
  1892. end
  1893. end)
  1894.  
  1895. --//=================================\\
  1896. --|| DAMAGING
  1897. --\\=================================//
  1898. function ApplyAoE(POSITION,RANGE,FLING,BURN)
  1899. local CHILDREN = workspace:GetDescendants()
  1900. for index, CHILD in pairs(CHILDREN) do
  1901. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1902. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1903. if HUM then
  1904. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1905. if TORSO then
  1906. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  1907. CHILD:BreakJoints()
  1908. if FLING ~= 0 then
  1909. for _, c in pairs(CHILD:GetChildren()) do
  1910. if c:IsA("BasePart") and c.Transparency == 0 then
  1911. if BURN == true then
  1912. Fire(c)
  1913. end
  1914. local bv = Instance.new("BodyVelocity")
  1915. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1916. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  1917. bv.Parent = c
  1918. Debris:AddItem(bv,0.05)
  1919. end
  1920. end
  1921. end
  1922. end
  1923. end
  1924. end
  1925. end
  1926. end
  1927. end
  1928.  
  1929. function Banish(Foe)
  1930. if Foe then
  1931. coroutine.resume(coroutine.create(function()
  1932. --if game.Players:FindFirstChild(Foe.Name) then
  1933. table.insert(TOBANISH,Foe.Name)
  1934. printbye(Foe.Name)
  1935. --end
  1936. Foe.Archivable = true
  1937. local CLONE = Foe:Clone()
  1938. Foe:Destroy()
  1939. CLONE.Parent = Effects
  1940. CLONE:BreakJoints()
  1941. local MATERIALS = {"Glass","Neon"}
  1942. for _, c in pairs(CLONE:GetDescendants()) do
  1943. if c:IsA("BasePart") then
  1944. if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
  1945. CreateSound(340722848, c, 10, 1, false)
  1946. end
  1947. c.Anchored = true
  1948. c.Transparency = c.Transparency + 0.2
  1949. c.Material = MATERIALS[MRANDOM(1,2)]
  1950. c.Color = C3(1,0,0)
  1951. if c.ClassName == "MeshPart" then
  1952. c.TextureID = ""
  1953. end
  1954. if c:FindFirstChildOfClass("SpecialMesh") then
  1955. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  1956. end
  1957. if c:FindFirstChildOfClass("Decal") then
  1958. c:FindFirstChildOfClass("Decal"):remove()
  1959. end
  1960. c.Name = "Banished"
  1961. c.CanCollide = false
  1962. else
  1963. c:remove()
  1964. end
  1965. end
  1966. local A = false
  1967. for i = 1, 35 do
  1968. if A == false then
  1969. A = true
  1970. elseif A == true then
  1971. A = false
  1972. end
  1973. for _, c in pairs(CLONE:GetDescendants()) do
  1974. if c:IsA("BasePart") then
  1975. c.Anchored = true
  1976. c.Material = MATERIALS[MRANDOM(1,2)]
  1977. c.Transparency = c.Transparency + 0.8/35
  1978. if A == false then
  1979. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  1980. elseif A == true then
  1981. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  1982. end
  1983. end
  1984. end
  1985. Swait()
  1986. end
  1987. CLONE:remove()
  1988. end))
  1989. end
  1990. end
  1991.  
  1992. function ApplyAoE(POSITION,RANGE,ISBANISH)
  1993. local CHILDREN = workspace:GetDescendants()
  1994. for index, CHILD in pairs(CHILDREN) do
  1995. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1996. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1997. if HUM then
  1998. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1999. if TORSO then
  2000. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2001. if ISBANISH == true then
  2002. Banish(CHILD)
  2003. else
  2004. if ISBANISH == "Gravity" then
  2005. HUM.PlatformStand = true
  2006. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  2007. local grav = Instance.new("BodyPosition",TORSO)
  2008. grav.D = 15
  2009. grav.P = 20000
  2010. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  2011. grav.position = TORSO.Position
  2012. grav.Name = "V3BanishForce"..Player.Name
  2013. else
  2014. TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
  2015. TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
  2016. end
  2017. else
  2018. HUM.PlatformStand = false
  2019. end
  2020. end
  2021. elseif ISBANISH == "Gravity" then
  2022. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  2023. TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
  2024. HUM.PlatformStand = false
  2025. end
  2026. end
  2027. end
  2028. end
  2029. end
  2030. end
  2031. end
  2032.  
  2033. --//=================================\\
  2034. --|| ATTACK FUNCTIONS AND STUFF
  2035. --\\=================================//
  2036. Player_Size = 1
  2037.  
  2038. function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine)
  2039. if DoesCourontine == false then
  2040. local Direction = CF(Part.Position,ToLocation)
  2041. local Distance = (Part.Position - ToLocation).magnitude
  2042. for i = 1, AmountOfTime do
  2043. Swait()
  2044. Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
  2045. Direction = Part.CFrame
  2046. end
  2047. Part:remove()
  2048. elseif DoesCourontine == true then
  2049. coroutine.resume(coroutine.create(function()
  2050. local Direction = CF(Part.Position,ToLocation)
  2051. local Distance = (Part.Position - ToLocation).magnitude
  2052. for i = 1, AmountOfTime do
  2053. Swait()
  2054. Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
  2055. Direction = Part.CFrame
  2056. end
  2057. Part:remove()
  2058. end))
  2059. end
  2060. end
  2061.  
  2062. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  2063. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  2064. wave.Color = COLOR
  2065. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  2066. wave.CFrame = CFRAME
  2067. coroutine.resume(coroutine.create(function(PART)
  2068. for i = 1, WAIT do
  2069. Swait()
  2070. mesh.Scale = mesh.Scale + GROW
  2071. wave.Transparency = wave.Transparency + (1/WAIT)
  2072. if wave.Transparency > 0.99 then
  2073. wave:remove()
  2074. end
  2075. end
  2076. end))
  2077. end
  2078.  
  2079. function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  2080. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  2081. wave.Color = COLOR
  2082. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  2083. wave.CFrame = CFRAME
  2084. coroutine.resume(coroutine.create(function(PART)
  2085. for i = 1, WAIT do
  2086. Swait()
  2087. mesh.Scale = mesh.Scale + GROW
  2088. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  2089. if DOESROT == true then
  2090. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  2091. end
  2092. wave.Transparency = wave.Transparency + (0.5/WAIT)
  2093. if wave.Transparency > 0.99 then
  2094. wave:remove()
  2095. end
  2096. end
  2097. end))
  2098. end
  2099.  
  2100. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  2101. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  2102. local mesh = nil
  2103. if KIND == "Base" then
  2104. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  2105. elseif KIND == "Thin" then
  2106. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  2107. elseif KIND == "Round" then
  2108. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  2109. end
  2110. wave.CFrame = CFRAME
  2111. coroutine.resume(coroutine.create(function(PART)
  2112. for i = 1, WAIT do
  2113. Swait()
  2114. mesh.Scale = mesh.Scale + GROW/10
  2115. wave.Transparency = wave.Transparency + (0.5/WAIT)
  2116. if wave.Transparency > 0.99 then
  2117. wave:remove()
  2118. end
  2119. end
  2120. end))
  2121. end
  2122.  
  2123. function killnearest(position,range,maxstrength)
  2124. for i,v in ipairs(workspace:GetChildren()) do
  2125. local body = v:GetChildren()
  2126. for part = 1, #body do
  2127. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  2128. if(body[part].Position - position).Magnitude < range then
  2129. if v.ClassName == "Model" then
  2130. v:BreakJoints()
  2131. end
  2132. --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
  2133. local bv = Instance.new("BodyVelocity")
  2134. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2135. bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
  2136. bv.Parent = body[part]
  2137. Debris:AddItem(bv,0.2)
  2138. end
  2139. end
  2140. end
  2141. if v.ClassName == "Part" then
  2142. if v.Anchored == false and (v.Position - position).Magnitude < range then
  2143. --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
  2144. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  2145. end
  2146. end
  2147. end
  2148. end
  2149.  
  2150. function Supernova()
  2151. local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7 * Player_Size, Character)
  2152. if HITFLOOR ~= nil then
  2153. local HITBODIES = {}
  2154. ATTACK = true
  2155. Rooted = true
  2156. local ABSOLUTE = CreatePart(3, Effects, "Neon", 0, 1, "Relly red", "Star", VT(0,0,0))
  2157. MakeForm(ABSOLUTE,"Ball")
  2158. CreateSound("429459101", ABSOLUTE, 10, 1)
  2159. for i=0, 4, 0.1 / Animation_Speed do
  2160. Swait()
  2161. ABSOLUTE.Size = ABSOLUTE.Size + VT(0.2,0.2,0.2)
  2162. ABSOLUTE.CFrame = RootPart.CFrame*CF(0,5+(ABSOLUTE.Size.Y/2),0)
  2163. ABSOLUTE.Transparency = ABSOLUTE.Transparency - 0.01
  2164. local CHARGE = CreatePart(3, Effects, "Neon", 0, 0, "Lime green", "Star", VT(1,1,1))
  2165. MakeForm(CHARGE,"Ball")
  2166. CHARGE.Color = C3(255,0,0)
  2167. CHARGE.CFrame = CF(RootPart.Position) * CF(MRANDOM(-15,15),-6,MRANDOM(-15,15))
  2168. FireArc(CHARGE,ABSOLUTE.Position,45,45,true)
  2169. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2170. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2171. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2172. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2173. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2174. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2175. end
  2176. CreateSound("907330103", Head, 10, 1.2)
  2177. for i = 1, 75 do
  2178. Swait()
  2179. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2180. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2181. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2182. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2183. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2184. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2185. end
  2186. coroutine.resume(coroutine.create(function()
  2187. for i = 1, 13 do
  2188. for e = 1, 8 do
  2189. Swait()
  2190. MagicSphere(VT(1,1,1),15,CF(ABSOLUTE.Position)*CF(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)),C3(255,0,0),VT(0,0,0))
  2191. CreateSwirl(ABSOLUTE.Size/2,15,CF(HITPOS),true,15,BRICKC"Reakky red".Color,VT(i,0.3,i)*2)
  2192. end
  2193. for i = 1, 5 do
  2194. Slice("Round",0,35,CF(ABSOLUTE.Position)*ANGLES(RAD(MRANDOM(-18,18)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-18,18))),C3(1,1,1),VT(i,0,i)/3)
  2195. Slice("Thin",i,55,ABSOLUTE.CFrame * CF(0,-1.1,0) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),C3(255,0,0),VT(0,0,0))
  2196. end
  2197. CreateSwirl(ABSOLUTE.Size/2,25,CF(ABSOLUTE.Position),true,-25,BRICKC"Relly red".Color,VT(i,i*2,i))
  2198. CreateSwirl(ABSOLUTE.Size/2,55,CF(ABSOLUTE.Position),true,25,C3(255,0,0),VT(i,i*2,i))
  2199. CreateSound("168586621", ABSOLUTE, 4, 0.8)
  2200. CreateSound("201858144", ABSOLUTE, 10, 0.8)
  2201. killnearest(ABSOLUTE.Position,i*18,i)
  2202. ABSOLUTE.Size = ABSOLUTE.Size*0.9
  2203. MagicSphere(ABSOLUTE.Size,25,CF(ABSOLUTE.Position),BRICKC"Relly red".Color,VT(i,i,i)/1.1)
  2204. MagicSphere(ABSOLUTE.Size,45,CF(ABSOLUTE.Position),C3(255,0,0),VT(i,i,i))
  2205. end
  2206. ABSOLUTE.Transparency = 1
  2207. Debris:AddItem(ABSOLUTE,10)
  2208. end))
  2209. ATTACK = false
  2210. Rooted = false
  2211. end
  2212. end
  2213.  
  2214.  
  2215. local ENERGYSOUND = 1417051162
  2216. local BEAMSOUND = 1417056781
  2217. local EXPLOSIONSOUND = 1417056081
  2218. local BasePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Lime green", "BraceletPart", VT(1.01,0.3,1.01),false)
  2219.  
  2220. function Charge(TIME,GYRO)
  2221. local SND = CreateSound(ENERGYSOUND,Torso,6,TIME,false)
  2222. local G = nil
  2223. if GYRO == true then
  2224. G = IT("BodyGyro",RootPart)
  2225. G.D = 250
  2226. G.P = 200000
  2227. G.MaxTorque = VT(math.huge,math.huge,math.huge)
  2228. end
  2229. for i=0, TIME, 0.1 / Animation_Speed do
  2230. Swait()
  2231. if G then
  2232. G.cframe = CF(RootPart.Position,Mouse.Hit.p)
  2233. end
  2234. WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(1.2,1.2,1.2), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BasePart.CFrame, MoveToPos = BasePart.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,-4).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2235. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2236. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2237. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2238. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2239. 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.15 / Animation_Speed)
  2240. 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.15 / Animation_Speed)
  2241. end
  2242. SND:remove()
  2243. if G then
  2244. return G
  2245. end
  2246. end
  2247.  
  2248. function Warp()
  2249. local HITFLOOR,HITPOS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 100, Character)
  2250. if HITFLOOR then
  2251. CharacterFade(C3(0.5,0,0),50)
  2252. HITPOS = HITPOS + VT(0,3.5,0)
  2253. local POS = RootPart.Position
  2254. RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p)
  2255. CreateSound(289556450,Torso,2,MRANDOM(8,13)/10,false)
  2256. end
  2257. end
  2258.  
  2259. function Prison_Key()
  2260. if Mouse.Target ~= nil then
  2261. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  2262. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  2263. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  2264. local GYRO = IT("BodyGyro",RootPart)
  2265. GYRO.D = 750
  2266. GYRO.P = 20000
  2267. GYRO.MaxTorque = VT(0,40000000,0)
  2268. local grav = Instance.new("BodyPosition",TORSO)
  2269. grav.D = 15
  2270. grav.P = 20000
  2271. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  2272. grav.position = TORSO.Position
  2273. local GYRO2 = IT("BodyGyro",TORSO)
  2274. GYRO2.D = 750
  2275. GYRO2.P = 20000
  2276. GYRO2.MaxTorque = VT(0,40000000,0)
  2277. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  2278. grav.Name = "Jail"
  2279. local LOCKPARTS = {}
  2280. ATTACK = true
  2281. Rooted = false
  2282. local LOCK = IT("Model",Effects)
  2283. LOCK.Name = "Lock"
  2284. local LOCK2 = IT("Model",LOCK)
  2285. LOCK2.Name = "Metal"
  2286. --CREATE LOCK--
  2287. local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
  2288. LOCK.PrimaryPart = BASE
  2289. BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
  2290. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
  2291. PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
  2292. MakeForm(PRT,"Cyl")
  2293. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
  2294. PRT.Color = C3(0,0,0)
  2295. PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
  2296. MakeForm(PRT,"Cyl")
  2297. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
  2298. PRT.Color = C3(0,0,0)
  2299. PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
  2300. for i = 1, 45 do
  2301. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  2302. PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
  2303. end
  2304. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  2305. PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
  2306. LOCK2.PrimaryPart = PRT
  2307. ---------------
  2308. local CHILDREN = LOCK:GetDescendants()
  2309. for index, CHILD in pairs(CHILDREN) do
  2310. if CHILD:IsA("BasePart") then
  2311. CHILD.Transparency = 1
  2312. end
  2313. end
  2314. for i = 1, 75 do
  2315. LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
  2316. Swait()
  2317. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  2318. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  2319. local CHILDREN = LOCK:GetDescendants()
  2320. for index, CHILD in pairs(CHILDREN) do
  2321. if CHILD:IsA("BasePart") then
  2322. CHILD.Transparency = CHILD.Transparency - 1/75
  2323. end
  2324. end
  2325. end
  2326. HUM.DisplayDistanceType = "None"
  2327. local KEY = IT("Model",Effects)
  2328. KEY.Name = "Key"
  2329. --CREATE KEY--
  2330. local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "KeyBase", VT(0.1, 1, 0.1),false)
  2331. KEY.PrimaryPart = KBASE
  2332. KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
  2333. local WLD = weldBetween(RightArm,KBASE)
  2334. for i = 1, 45 do
  2335. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.1, 0.1, 0.1),false)
  2336. PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
  2337. weldBetween(KBASE,PRT)
  2338. end
  2339. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.3, 0.1, 0.1),false)
  2340. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
  2341. weldBetween(KBASE,PRT)
  2342. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.3, 0.1, 0.1),false)
  2343. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
  2344. weldBetween(KBASE,PRT)
  2345. --------------
  2346. Rooted = true
  2347. Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
  2348. coroutine.resume(coroutine.create(function()
  2349. for i = 1, 10 do
  2350. Swait()
  2351. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  2352. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  2353. end
  2354. CreateSound(1149318312,BASE,5,1,false)
  2355. CreateSound(160772554,BASE,3,1,false)
  2356. LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
  2357. for i = 1, 4 do
  2358. WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = VT(1,1,1), Size2 = VT(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = BASE.CFrame*CF(1,1.45,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Really red".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2359. end
  2360. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = TORSO.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Really red".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
  2361. wait(1)
  2362. TORSO.Parent.Parent = LOCK
  2363. for i = 1, 75 do
  2364. Swait()
  2365. local CHILDREN = KEY:GetDescendants()
  2366. for index, CHILD in pairs(CHILDREN) do
  2367. if CHILD:IsA("BasePart") then
  2368. CHILD.Transparency = i/25
  2369. end
  2370. end
  2371. local CHILDREN = LOCK:GetDescendants()
  2372. for index, CHILD in pairs(CHILDREN) do
  2373. if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
  2374. CHILD.Transparency = CHILD.Transparency + 1/75
  2375. elseif CHILD.ClassName == "Decal" then
  2376. CHILD.Transparency = CHILD.Transparency + 1/75
  2377. end
  2378. end
  2379. end
  2380. TORSO.Parent:ClearAllChildren()
  2381. KEY:remove()
  2382. LOCK:remove()
  2383. end))
  2384. Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
  2385. GYRO:remove()
  2386. ATTACK = false
  2387. Rooted = false
  2388. end
  2389. end
  2390. end
  2391.  
  2392. function Lift()
  2393. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  2394. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  2395. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  2396. if TORSO and HUM.Health > 0 then
  2397. ATTACK = true
  2398. Rooted = false
  2399. local GYRO = IT("BodyGyro",RootPart)
  2400. GYRO.D = 275
  2401. GYRO.P = 20000
  2402. GYRO.MaxTorque = VT(0,40000,0)
  2403. for i=0, 0.8, 0.1 / Animation_Speed do
  2404. Swait()
  2405. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  2406. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2407. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2408. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2409. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.15, -0.5) * ANGLES(RAD(-15), RAD(0), RAD(85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2410. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2411. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2412. end
  2413. local MAGIC = ParticleEmitter({Speed = 5, Drag = 3, Size1 = 1.7, Size2 = 0, Lifetime1 = 1, Lifetime2 = 3, Parent = TORSO, Emit = 100, Offset = 360, Enabled = true})
  2414. MAGIC.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(1,0)})
  2415. local grav = Instance.new("BodyPosition",TORSO)
  2416. grav.D = 1500
  2417. grav.P = 20000
  2418. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  2419. grav.position = TORSO.Position+VT(0,15,0)
  2420. Debris:AddItem(grav,10)
  2421. Debris:AddItem(MAGIC,10)
  2422. CreateSound(902204346, Torso, 7, 1, false)
  2423. CreateSound(902204346, TORSO, 7, 1, false)
  2424. for i=0, 1, 0.1 / Animation_Speed do
  2425. Swait()
  2426. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  2427. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2428. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(125), RAD(-45), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2429. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(125), RAD(45), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2430. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2431. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2432. end
  2433. GYRO:remove()
  2434. ATTACK = false
  2435. Rooted = false
  2436. end
  2437. end
  2438. end
  2439.  
  2440. function TAUNT1()
  2441. ATTACK = true
  2442. Rooted = false
  2443. CreateSound(865772398, Torso, 6, 1, false)
  2444. for i=0, 0.1, 0.1 / Animation_Speed do
  2445. Swait()
  2446. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2447. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2448. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2449. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2450. end
  2451. for i=0, 1, 0.1 / Animation_Speed do
  2452. Swait()
  2453. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2454. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2455. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2456. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.4) * ANGLES(RAD(-25-3 * COS(SINE / 6)), RAD(25), RAD(90)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2457. end
  2458. for i=0, 1, 0.1 / Animation_Speed do
  2459. Swait()
  2460. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2461. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2462. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2463. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25-3 * COS(SINE / 6)), RAD(0), RAD(-90)) * ANGLES(RAD(0), RAD(90), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2464. end
  2465. ATTACK = false
  2466. Rooted = false
  2467. end
  2468.  
  2469. function TAUNT2()
  2470. ATTACK = true
  2471. Rooted = false
  2472. for i=0, 1, 0.1 / Animation_Speed do
  2473. Swait()
  2474. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2475. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2476. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2477. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.25 * COS(SINE / 12), 0.4) * ANGLES(RAD(-45), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2478. end
  2479. ATTACK = false
  2480. Rooted = false
  2481. end
  2482.  
  2483. function EMOTE()
  2484. ATTACK = true
  2485. Rooted = false
  2486. local LOOP = 0
  2487. for i=0, 0.1, 0.1 / Animation_Speed do
  2488. Swait()
  2489. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2490. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2491. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2492. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2493. end
  2494. for i=0, 3, 0.1 / Animation_Speed do
  2495. Swait()
  2496. LOOP = LOOP + 1
  2497. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2498. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2499. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2500. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.8, 0.4) * ANGLES(RAD(170), RAD(0), RAD(-25 - 25 * SIN(LOOP / 5))) * ANGLES(RAD(0), RAD(-45), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2501. end
  2502. for i=0, 0.1, 0.1 / Animation_Speed do
  2503. Swait()
  2504. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2505. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  2506. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2507. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2508. end
  2509. ATTACK = false
  2510. Rooted = false
  2511. end
  2512.  
  2513. function Banisher_Bullet()
  2514. ATTACK = true
  2515. Rooted = false
  2516. for i=0, 0.4, 0.1 / Animation_Speed do
  2517. Swait()
  2518. turnto(Mouse.Hit.p)
  2519. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  2520. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  2521. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  2522. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  2523. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2524. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2525. end
  2526. repeat
  2527. for i=0, 0.2, 0.1 / Animation_Speed do
  2528. Swait()
  2529. turnto(Mouse.Hit.p)
  2530. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  2531. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  2532. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  2533. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  2534. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2535. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2536. end
  2537. local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
  2538. SpawnTrail(Hole.Position,POS)
  2539. if HIT ~= nil then
  2540. if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
  2541. Banish(HIT.Parent)
  2542. end
  2543. end
  2544. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(1,1.5,1), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2545. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  2546. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  2547. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  2548. for i=0, 0.3, 0.1 / Animation_Speed do
  2549. Swait()
  2550. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  2551. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
  2552. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  2553. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  2554. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2555. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2556. end
  2557. until KEYHOLD == false
  2558. ATTACK = false
  2559. Rooted = false
  2560. end
  2561.  
  2562. function AttackTemplate()
  2563. ATTACK = true
  2564. Rooted = false
  2565. for i=0, 1, 0.1 / Animation_Speed do
  2566. Swait()
  2567. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2568. 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.15 / Animation_Speed)
  2569. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  2570. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  2571. 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.15 / Animation_Speed)
  2572. 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.15 / Animation_Speed)
  2573. end
  2574. ATTACK = false
  2575. Rooted = false
  2576. end
  2577.  
  2578. --//=================================\\
  2579. --|| ASSIGN THINGS TO KEYS
  2580. --\\=================================//
  2581.  
  2582. function MouseDown(Mouse)
  2583. HOLD = true
  2584. if ATTACK == false then
  2585. end
  2586. end
  2587.  
  2588. function MouseUp(Mouse)
  2589. HOLD = false
  2590. end
  2591.  
  2592. function KeyDown(Key)
  2593. KEYHOLD = true
  2594. if Key == "z" and ATTACK == false then
  2595. Banisher_Bullet()
  2596. end
  2597.  
  2598. if Key == "b" and ATTACK == false then
  2599. end
  2600.  
  2601. if Key == "t" and ATTACK == false then
  2602. TAUNT1()
  2603. end
  2604.  
  2605. if Key == "q" and ATTACK == false then
  2606. Lift()
  2607. end
  2608.  
  2609. if Key == "e" and ATTACK == false then
  2610. Warp()
  2611. end
  2612.  
  2613. if Key == "r" and ATTACK == false then
  2614. Supernova()
  2615. end
  2616.  
  2617. if Key == "x" and ATTACK == false then
  2618. Prison_Key()
  2619. end
  2620.  
  2621. if Key == "c" and ATTACK == false then
  2622. end
  2623.  
  2624. if Key == "v" and ATTACK == false then
  2625. end
  2626.  
  2627. if Key == "x" and ATTACK == false then
  2628. end
  2629. end
  2630.  
  2631. function KeyUp(Key)
  2632. KEYHOLD = false
  2633. end
  2634.  
  2635. Mouse.Button1Down:connect(function(NEWKEY)
  2636. MouseDown(NEWKEY)
  2637. end)
  2638. Mouse.Button1Up:connect(function(NEWKEY)
  2639. MouseUp(NEWKEY)
  2640. end)
  2641. Mouse.KeyDown:connect(function(NEWKEY)
  2642. KeyDown(NEWKEY)
  2643. end)
  2644. Mouse.KeyUp:connect(function(NEWKEY)
  2645. KeyUp(NEWKEY)
  2646. end)
  2647.  
  2648. --//=================================\\
  2649. --\\=================================//
  2650.  
  2651.  
  2652. function unanchor()
  2653. if UNANCHOR == true then
  2654. g = Character:GetChildren()
  2655. for i = 1, #g do
  2656. if g[i].ClassName == "Part" then
  2657. g[i].Anchored = false
  2658. end
  2659. end
  2660. end
  2661. end
  2662.  
  2663.  
  2664. --//=================================\\
  2665. --|| WRAP THE WHOLE SCRIPT UP
  2666. --\\=================================//
  2667.  
  2668. Humanoid.Changed:connect(function(Jump)
  2669. if Jump == "Jump" and (Disable_Jump == true) then
  2670. Humanoid.Jump = false
  2671. end
  2672. end)
  2673.  
  2674. while true do
  2675. Swait()
  2676. Humanoid.HipHeight = 1.5
  2677. script.Parent = WEAPONGUI
  2678. ANIMATE.Parent = nil
  2679. if Humanoid then
  2680. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  2681. IDLEANIMATION:Play()
  2682. end
  2683. SINE = SINE + CHANGE
  2684. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  2685. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  2686. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  2687. if ATTACK == false then
  2688. if TORSOVELOCITY < 1 then
  2689. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25)), 1 / Animation_Speed)
  2690. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 1 / Animation_Speed)
  2691. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(110), RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(35 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2692. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(140 - 12 * SIN(SINE / 12)), RAD(15 + 2.5 * SIN(SINE / 12)), RAD(-35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2693. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2694. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2695. elseif TORSOVELOCITY > 1 then
  2696. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25)), 1 / Animation_Speed)
  2697. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 1 / Animation_Speed)
  2698. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(110), RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(35 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2699. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(140 - 12 * SIN(SINE / 12)), RAD(15 + 2.5 * SIN(SINE / 12)), RAD(-35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2700. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2701. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2702. end
  2703. end
  2704. RightArmGrasp.C0 = Clerp(RightArmGrasp.C0, CF(0, -0.815+0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(90-4.5 * SIN(SINE / 12)), RAD(-1.5 * SIN(SINE / 12)), RAD(0)), 1 / Animation_Speed)
  2705. unanchor()
  2706. Humanoid.MaxHealth = "inf"
  2707. Humanoid.Health = "inf"
  2708. if Rooted == false then
  2709. Disable_Jump = false
  2710. Humanoid.WalkSpeed = Speed
  2711. elseif Rooted == true then
  2712. Disable_Jump = true
  2713. Humanoid.WalkSpeed = 0
  2714. end
  2715. for _, c in pairs(Character:GetDescendants()) do
  2716. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  2717. c.Material = "Neon"
  2718. c.Color = C3(1,1,1)
  2719. if c:FindFirstChildOfClass("SpecialMesh") then
  2720. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2721. end
  2722. if c == Head then
  2723. if c:FindFirstChild("face") then
  2724. c.face:remove()
  2725. end
  2726. end
  2727. elseif c.ClassName == "Part" and c.Name == "Eye" then
  2728. c.Color = C3(1,0,0)
  2729. c.Material = "Neon"
  2730. elseif c.ClassName == "CharacterMesh" or c.Name == "Body Colors" then
  2731. c:remove()
  2732. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  2733. c:remove()
  2734. end
  2735. end
  2736. refit()
  2737. Humanoid.Name = "Deadeyes"
  2738. sick.Parent = Torso
  2739. sick:resume()
  2740. sick.Volume = 5
  2741. sick.Pitch = 1
  2742. sick.SoundId = "rbxassetid://356064698"
  2743. if Head:FindFirstChildOfClass("Sound") then
  2744. Head:FindFirstChildOfClass("Sound"):remove()
  2745. end
  2746. end
  2747.  
  2748. --//=================================\\
  2749. --\\=================================//
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755. --//====================================================\\--
  2756. --|| END OF SCRIPT
  2757. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement