Advertisement
sawgamer1

Untitled

Jul 11th, 2018
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 122.16 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. Character = Player.Character
  3. local txt = Instance.new("BillboardGui", Character)
  4. txt.Adornee = Character.Head
  5. txt.Name = "_status"
  6. txt.Size = UDim2.new(2, 0, 1.2, 0)
  7. txt.StudsOffset = Vector3.new(-9, 8, 0)
  8. local text = Instance.new("TextLabel", txt)
  9. text.Size = UDim2.new(10, 0, 7, 0)
  10. text.FontSize = "Size24"
  11. text.TextScaled = true
  12. text.TextTransparency = 0
  13. text.BackgroundTransparency = 1
  14. text.TextTransparency = 0
  15. text.TextStrokeTransparency = 0
  16. text.Font = "Antique"
  17. text.TextStrokeColor3 = Color3.new(196, 40, 28)
  18. text.Text = "The Corrupted Doctor"
  19. script.Name = "The Corrupted Doctor"
  20. --//====================================================\\--
  21. --|| CREATED BY SHACKLUSTER-EDITED BY PROMLG112 and sawgamer1
  22. --\\====================================================//--
  23. local chara = Character
  24.  
  25. function chat(...)
  26. local txxt = {...}
  27. local ch = coroutine.wrap(function()
  28. if chara:FindFirstChild("Chatt")~= nil then
  29. Character:FindFirstChild("Chatt"):destroy()
  30. end
  31. local txt = Instance.new("BillboardGui", chara)
  32. txt.Adornee = chara.Head
  33. txt.Name = "Chatt"
  34. txt.Size = UDim2.new(2, 0, 1.2, 0)
  35. txt.StudsOffset = Vector3.new(-9, 7, 0)
  36. local text = Instance.new("TextLabel", txt)
  37. text.Size = UDim2.new(10, 0, 7, 0)
  38. text.TextSize = 32
  39. text.Font = Enum.Font.Antique
  40. text.TextScaled = false
  41. text.BackgroundTransparency = 1
  42. text.TextColor3 = Color3.new(0,0,0)
  43. text.TextStrokeTransparency = 0
  44. text.TextStrokeColor3 = Color3.new(0/0, 0/0, 0/0)
  45. text.Text = ""
  46. txxt = table.concat(txxt,"\t")
  47. for i = 1, #txxt do
  48. text.Text = txxt:sub(1,i)
  49.  
  50. end
  51. wait(2)
  52. for trans = 0,1,00.1 do
  53. text.TextTransparency = trans
  54. text.TextStrokeTransparency = trans
  55. wait()
  56. end
  57. wait()
  58. txt:destroy()
  59. end)
  60.  
  61. ch(...)
  62. end
  63. Player.Chatted:connect(chat)
  64.  
  65. wait(0.2)
  66.  
  67. Player = game:GetService("Players").LocalPlayer
  68. PlayerGui = Player.PlayerGui
  69. Cam = workspace.CurrentCamera
  70. Backpack = Player.Backpack
  71. Character = Player.Character
  72. Humanoid = Character.Humanoid
  73. Mouse = Player:GetMouse()
  74. RootPart = Character["HumanoidRootPart"]
  75. Torso = Character["Torso"]
  76. Head = Character["Head"]
  77. RightArm = Character["Right Arm"]
  78. LeftArm = Character["Left Arm"]
  79. RightLeg = Character["Right Leg"]
  80. LeftLeg = Character["Left Leg"]
  81. RootJoint = RootPart["RootJoint"]
  82. Neck = Torso["Neck"]
  83. RightShoulder = Torso["Right Shoulder"]
  84. LeftShoulder = Torso["Left Shoulder"]
  85. RightHip = Torso["Right Hip"]
  86. LeftHip = Torso["Left Hip"]
  87.  
  88. for i,v in pairs(Character:GetChildren()) do
  89. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then
  90. v:Destroy()
  91. end
  92. end
  93.  
  94. for i,v in pairs(Character:GetChildren()) do
  95. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  96. v:Destroy()
  97. end
  98. end
  99.  
  100. local Shirt = Instance.new("Shirt",Character)
  101. local Pants = Instance.new("Pants",Character)
  102. Shirt.ShirtTemplate = "rbxassetid://648758131"
  103. Pants.PantsTemplate = "rbxassetid://472675863"
  104.  
  105. local sick = Instance.new("Sound",Character)
  106. sick.SoundId = "rbxassetid://155334395"
  107. sick.Looped = true
  108. sick.Pitch = 1
  109. sick.Volume = 1.3
  110. sick:Play()
  111.  
  112. IT = Instance.new
  113. CF = CFrame.new
  114. VT = Vector3.new
  115. RAD = math.rad
  116. C3 = Color3.new
  117. UD2 = UDim2.new
  118. BRICKC = BrickColor.new
  119. ANGLES = CFrame.Angles
  120. EULER = CFrame.fromEulerAnglesXYZ
  121. COS = math.cos
  122. ACOS = math.acos
  123. SIN = math.sin
  124. ASIN = math.asin
  125. ABS = math.abs
  126. MRANDOM = math.random
  127. FLOOR = math.floor
  128. local CLOAKED = false
  129. local KILLINSTINCT = 0
  130. --//=================================\\
  131. --|| SOME OTHER STUFF
  132. --\\=================================//
  133. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  134. ff.Visible = false
  135. Humanoid.Name = "God Mode"
  136.  
  137. --//=================================\\
  138. --|| CUSTOMIZATION
  139. --\\=================================//
  140.  
  141. Player_Size = 1 --Size of the player.
  142. Animation_Speed = 3
  143. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  144.  
  145. local Speed = 16
  146. local Effects2 = {}
  147.  
  148. --//=================================\\
  149. --|| END OF CUSTOMIZATION
  150. --\\=================================//
  151.  
  152. local function weldBetween(a, b)
  153. local weldd = Instance.new("ManualWeld")
  154. weldd.Part0 = a
  155. weldd.Part1 = b
  156. weldd.C0 = CFrame.new()
  157. weldd.C1 = b.CFrame:inverse() * a.CFrame
  158. weldd.Parent = a
  159. return weldd
  160. end
  161. --//=================================\\
  162. --|| USEFUL VALUES
  163. --\\=================================//
  164.  
  165. Animation_Speed = 3
  166. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  167. local Speed = 16
  168. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  169. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  170. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  171. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  172. local DAMAGEMULTIPLIER = 1
  173. local ANIM = "Idle"
  174. local ATTACK = false
  175. local EQUIPPED = false
  176. local HOLD = false
  177. local CLOCKTARGET = nil
  178. local CLOCKSPEED = 2.5
  179. local CLOCKLOOP = 0
  180. local COMBO = 1
  181. local Rooted = false
  182. local SINE = 0
  183. local KEYHOLD = false
  184. local CHANGE = 2 / Animation_Speed
  185. local WALKINGANIM = false
  186. local VALUE1 = false
  187. local VALUE2 = false
  188. local ROBLOXIDLEANIMATION = IT("Animation")
  189. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  190. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  191. --ROBLOXIDLEANIMATION.Parent = Humanoid
  192. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  193. WEAPONGUI.Name = "Weapon GUI"
  194. local Weapon = IT("Model")
  195. Weapon.Name = "Adds"
  196. local Effects = IT("Folder", Weapon)
  197. Effects.Name = "Effects"
  198. local ANIMATOR = Humanoid.Animator
  199. local ANIMATE = Character.Animate
  200. local UNANCHOR = true
  201. local ENERGYSOUND = 1417051162
  202. local BEAMSOUND = 1417056781
  203. local EXPLOSIONSOUND = 1417056081
  204.  
  205. --//=================================\\
  206. --\\=================================//
  207.  
  208. local asd = Instance.new("ParticleEmitter")
  209. asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
  210. asd.LightEmission = .1
  211. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  212. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
  213. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  214. asd.Transparency = bbb
  215. asd.Size = aaa
  216. asd.ZOffset = .9
  217. asd.Acceleration = Vector3.new(0, -15, 0)
  218. asd.LockedToPart = false
  219. asd.EmissionDirection = "Back"
  220. asd.Lifetime = NumberRange.new(1, 2)
  221. asd.Rotation = NumberRange.new(-100, 100)
  222. asd.RotSpeed = NumberRange.new(-100, 100)
  223. asd.Speed = NumberRange.new(10)
  224. asd.Enabled = false
  225. asd.VelocitySpread = 999
  226.  
  227. function getbloody(victim,amount)
  228. local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size)
  229. PART.CFrame = victim.CFrame
  230. local HITPLAYERSOUNDS = {"356551938","264486467"}
  231. Debris:AddItem(PART,5)
  232. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  233. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  234. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  235. local prtcl = asd:Clone()
  236. prtcl.Parent = PART
  237. prtcl:Emit(amount*10)
  238. end
  239.  
  240. --//=================================\\
  241. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  242. --\\=================================//
  243.  
  244. ArtificialHB = Instance.new("BindableEvent", script)
  245. ArtificialHB.Name = "ArtificialHB"
  246.  
  247. script:WaitForChild("ArtificialHB")
  248.  
  249. frame = Frame_Speed
  250. tf = 0
  251. allowframeloss = false
  252. tossremainder = false
  253. lastframe = tick()
  254. script.ArtificialHB:Fire()
  255.  
  256. game:GetService("RunService").Heartbeat:connect(function(s, p)
  257. tf = tf + s
  258. if tf >= frame then
  259. if allowframeloss then
  260. script.ArtificialHB:Fire()
  261. lastframe = tick()
  262. else
  263. for i = 1, math.floor(tf / frame) do
  264. script.ArtificialHB:Fire()
  265. end
  266. lastframe = tick()
  267. end
  268. if tossremainder then
  269. tf = 0
  270. else
  271. tf = tf - frame * math.floor(tf / frame)
  272. end
  273. end
  274. end)
  275.  
  276. --//=================================\\
  277. --\\=================================//
  278. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  279. ff.Visible = false
  280. Humanoid.Name = "God Mode"
  281.  
  282. local l = game.Lighting
  283. local sky = Instance.new("Sky",l)
  284. l.TimeOfDay = "00:00:00"
  285. l.Brightness = 1
  286. l.Ambient = Color3.new(0.25, 0.5, 0.75)
  287. ---
  288.  
  289.  
  290.  
  291. --//=================================\\
  292. --|| SOME FUNCTIONS
  293. --\\=================================//
  294. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  295. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  296. end
  297.  
  298. function PositiveAngle(NUMBER)
  299. if NUMBER >= 0 then
  300. NUMBER = 0
  301. end
  302. return NUMBER
  303. end
  304.  
  305. function NegativeAngle(NUMBER)
  306. if NUMBER <= 0 then
  307. NUMBER = 0
  308. end
  309. return NUMBER
  310. end
  311.  
  312. function Swait(NUMBER)
  313. if NUMBER == 0 or NUMBER == nil then
  314. ArtificialHB.Event:wait()
  315. else
  316. for i = 1, NUMBER do
  317. ArtificialHB.Event:wait()
  318. end
  319. end
  320. end
  321.  
  322. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  323. local NEWMESH = IT(MESH)
  324. if MESH == "SpecialMesh" then
  325. NEWMESH.MeshType = MESHTYPE
  326. if MESHID ~= "nil" and MESHID ~= "" then
  327. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  328. end
  329. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  330. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  331. end
  332. end
  333. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  334. NEWMESH.Scale = SCALE
  335. NEWMESH.Parent = PARENT
  336. return NEWMESH
  337. end
  338.  
  339. Player = game:GetService("Players").LocalPlayer
  340. PlayerGui = Player.PlayerGui
  341. Cam = workspace.CurrentCamera
  342. Backpack = Player.Backpack
  343. Character = Player.Character
  344. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  345. Mouse = Player:GetMouse()
  346. RootPart = Character["HumanoidRootPart"]
  347. Torso = Character["Torso"]
  348. Head = Character["Head"]
  349. RightArm = Character["Right Arm"]
  350. LeftArm = Character["Left Arm"]
  351. RightLeg = Character["Right Leg"]
  352. LeftLeg = Character["Left Leg"]
  353. RootJoint = RootPart["RootJoint"]
  354. Neck = Torso["Neck"]
  355. RightShoulder = Torso["Right Shoulder"]
  356. LeftShoulder = Torso["Left Shoulder"]
  357. RightHip = Torso["Right Hip"]
  358. LeftHip = Torso["Left Hip"]
  359.  
  360. IT = Instance.new
  361. CF = CFrame.new
  362. VT = Vector3.new
  363. RAD = math.rad
  364. C3 = Color3.new
  365. UD2 = UDim2.new
  366. BRICKC = BrickColor.new
  367. ANGLES = CFrame.Angles
  368. EULER = CFrame.fromEulerAnglesXYZ
  369. COS = math.cos
  370. ACOS = math.acos
  371. SIN = math.sin
  372. ASIN = math.asin
  373. ABS = math.abs
  374. MRANDOM = math.random
  375. FLOOR = math.floor
  376.  
  377. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  378. local NEWWELD = IT(TYPE)
  379. NEWWELD.Part0 = PART0
  380. NEWWELD.Part1 = PART1
  381. NEWWELD.C0 = C0
  382. NEWWELD.C1 = C1
  383. NEWWELD.Parent = PARENT
  384. return NEWWELD
  385. end
  386.  
  387. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  388. local NEWPART = IT("Part")
  389. NEWPART.formFactor = FORMFACTOR
  390. NEWPART.Reflectance = REFLECTANCE
  391. NEWPART.Transparency = TRANSPARENCY
  392. NEWPART.CanCollide = false
  393. NEWPART.Locked = true
  394. NEWPART.Anchored = true
  395. if ANCHOR == false then
  396. NEWPART.Anchored = false
  397. end
  398. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  399. NEWPART.Name = NAME
  400. NEWPART.Size = SIZE
  401. NEWPART.Position = Torso.Position
  402. NEWPART.Material = MATERIAL
  403. NEWPART:BreakJoints()
  404. NEWPART.Parent = PARENT
  405. return NEWPART
  406. end
  407.  
  408. local LEFTWINGS = {}
  409. local RIGHTWINGS = {}
  410. local Back = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Wing", VT(1,1,0.35),false)
  411. CreateWeldOrSnapOrMotor("Weld", Torso, Torso, Back, CF(0, 0.5, 1.2) * ANGLES(RAD(0),RAD(0),RAD(45)), CF(0, 0, 0))
  412.  
  413. local ANGLE = 35
  414. for i = 1, 5 do
  415. local Wing = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Wing", VT(0.15,2+(i/2),0.15),false)
  416. local WingWeld = CreateWeldOrSnapOrMotor("Weld", Wing, Torso, Wing, CF(0, 1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)) * CF(0,1,0) * ANGLES(RAD(0), RAD(0), RAD(90)) * ANGLES(RAD(ANGLE), RAD(0), RAD(0)) * CF(0,3+(i/10),0) , CF(0, 0, 0))
  417. local Wing2 = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Wing", VT(0.25,1,0.25),false)
  418. CreateWeldOrSnapOrMotor("Weld", Wing, Wing, Wing2, CF(0, 2+(i/2), 0) * ANGLES(RAD(25), RAD(0), RAD(0)), CF(0, 1, 0))
  419. ANGLE = ANGLE - 15
  420. table.insert(LEFTWINGS,WingWeld)
  421. end
  422. ANGLE = 35
  423. for i = 1, 5 do
  424. local Wing = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Wing", VT(0.15,2+(i/2),0.15),false)
  425. local WingWeld = CreateWeldOrSnapOrMotor("Weld", Wing, Torso, Wing, CF(0, 1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)) * CF(0,1,0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * ANGLES(RAD(ANGLE), RAD(0), RAD(0)) * CF(0,3+(i/10),0) , CF(0, 0, 0))
  426. local Wing2 = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Wing", VT(0.25,1,0.25),false)
  427. CreateWeldOrSnapOrMotor("Weld", Wing, Wing, Wing2, CF(0, 2+(i/2), 0) * ANGLES(RAD(25), RAD(0), RAD(0)), CF(0, 1, 0))
  428. ANGLE = ANGLE - 15
  429. table.insert(RIGHTWINGS,WingWeld)
  430. end
  431.  
  432. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  433. local NEWPART = IT("Part")
  434. NEWPART.formFactor = FORMFACTOR
  435. NEWPART.Reflectance = REFLECTANCE
  436. NEWPART.Transparency = TRANSPARENCY
  437. NEWPART.CanCollide = false
  438. NEWPART.Locked = true
  439. NEWPART.Anchored = true
  440. if ANCHOR == false then
  441. NEWPART.Anchored = false
  442. end
  443. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  444. NEWPART.Name = NAME
  445. NEWPART.Size = SIZE
  446. NEWPART.Position = Torso.Position
  447. NEWPART.Material = MATERIAL
  448. NEWPART:BreakJoints()
  449. NEWPART.Parent = PARENT
  450. return NEWPART
  451. end
  452.  
  453. local function weldBetween(a, b)
  454. local weldd = Instance.new("ManualWeld")
  455. weldd.Part0 = a
  456. weldd.Part1 = b
  457. weldd.C0 = CFrame.new()
  458. weldd.C1 = b.CFrame:inverse() * a.CFrame
  459. weldd.Parent = a
  460. return weldd
  461. end
  462.  
  463.  
  464. function QuaternionFromCFrame(cf)
  465. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  466. local trace = m00 + m11 + m22
  467. if trace > 0 then
  468. local s = math.sqrt(1 + trace)
  469. local recip = 0.5 / s
  470. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  471. else
  472. local i = 0
  473. if m11 > m00 then
  474. i = 1
  475. end
  476. if m22 > (i == 0 and m00 or m11) then
  477. i = 2
  478. end
  479. if i == 0 then
  480. local s = math.sqrt(m00 - m11 - m22 + 1)
  481. local recip = 0.5 / s
  482. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  483. elseif i == 1 then
  484. local s = math.sqrt(m11 - m22 - m00 + 1)
  485. local recip = 0.5 / s
  486. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  487. elseif i == 2 then
  488. local s = math.sqrt(m22 - m00 - m11 + 1)
  489. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  490. end
  491. end
  492. end
  493.  
  494. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  495. local xs, ys, zs = x + x, y + y, z + z
  496. local wx, wy, wz = w * xs, w * ys, w * zs
  497. local xx = x * xs
  498. local xy = x * ys
  499. local xz = x * zs
  500. local yy = y * ys
  501. local yz = y * zs
  502. local zz = z * zs
  503. 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))
  504. end
  505.  
  506. function QuaternionSlerp(a, b, t)
  507. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  508. local startInterp, finishInterp;
  509. if cosTheta >= 0.0001 then
  510. if (1 - cosTheta) > 0.0001 then
  511. local theta = ACOS(cosTheta)
  512. local invSinTheta = 1 / SIN(theta)
  513. startInterp = SIN((1 - t) * theta) * invSinTheta
  514. finishInterp = SIN(t * theta) * invSinTheta
  515. else
  516. startInterp = 1 - t
  517. finishInterp = t
  518. end
  519. else
  520. if (1 + cosTheta) > 0.0001 then
  521. local theta = ACOS(-cosTheta)
  522. local invSinTheta = 1 / SIN(theta)
  523. startInterp = SIN((t - 1) * theta) * invSinTheta
  524. finishInterp = SIN(t * theta) * invSinTheta
  525. else
  526. startInterp = t - 1
  527. finishInterp = t
  528. end
  529. end
  530. 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
  531. end
  532.  
  533. function Clerp(a, b, t)
  534. local qa = {QuaternionFromCFrame(a)}
  535. local qb = {QuaternionFromCFrame(b)}
  536. local ax, ay, az = a.x, a.y, a.z
  537. local bx, by, bz = b.x, b.y, b.z
  538. local _t = 1 - t
  539. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  540. end
  541.  
  542. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  543. local frame = IT("Frame")
  544. frame.BackgroundTransparency = TRANSPARENCY
  545. frame.BorderSizePixel = BORDERSIZEPIXEL
  546. frame.Position = POSITION
  547. frame.Size = SIZE
  548. frame.BackgroundColor3 = COLOR
  549. frame.BorderColor3 = BORDERCOLOR
  550. frame.Name = NAME
  551. frame.Parent = PARENT
  552. return frame
  553. end
  554.  
  555. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  556. local label = IT("TextLabel")
  557. label.BackgroundTransparency = 1
  558. label.Size = UD2(1, 0, 1, 0)
  559. label.Position = UD2(0, 0, 0, 0)
  560. label.TextColor3 = TEXTCOLOR
  561. label.TextStrokeTransparency = STROKETRANSPARENCY
  562. label.TextTransparency = TRANSPARENCY
  563. label.FontSize = TEXTFONTSIZE
  564. label.Font = TEXTFONT
  565. label.BorderSizePixel = BORDERSIZEPIXEL
  566. label.TextStrokeColor3 = C3(1,1,1)
  567. label.TextScaled = false
  568. label.Text = TEXT
  569. label.Name = NAME
  570. label.Parent = PARENT
  571. return label
  572. end
  573.  
  574. function NoOutlines(PART)
  575. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  576. end
  577.  
  578. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  579. local NEWWELD = IT(TYPE)
  580. NEWWELD.Part0 = PART0
  581. NEWWELD.Part1 = PART1
  582. NEWWELD.C0 = C0
  583. NEWWELD.C1 = C1
  584. NEWWELD.Parent = PARENT
  585. return NEWWELD
  586. end
  587.  
  588. local S = IT("Sound")
  589. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  590. local NEWSOUND = nil
  591. coroutine.resume(coroutine.create(function()
  592. NEWSOUND = S:Clone()
  593. NEWSOUND.Parent = PARENT
  594. NEWSOUND.Volume = VOLUME
  595. NEWSOUND.Pitch = PITCH
  596. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  597. NEWSOUND:play()
  598. if DOESLOOP == true then
  599. NEWSOUND.Looped = true
  600. else
  601. repeat wait(1) until NEWSOUND.Playing == false
  602. NEWSOUND:remove()
  603. end
  604. end))
  605. return NEWSOUND
  606. end
  607.  
  608. function CFrameFromTopBack(at, top, back)
  609. local right = top:Cross(back)
  610. 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)
  611. end
  612.  
  613. --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})
  614. function WACKYEFFECT(Table)
  615. local TYPE = (Table.EffectType or "Sphere")
  616. local SIZE = (Table.Size or VT(1,1,1))
  617. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  618. local TRANSPARENCY = (Table.Transparency or 0)
  619. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  620. local CFRAME = (Table.CFrame or Torso.CFrame)
  621. local MOVEDIRECTION = (Table.MoveToPos or nil)
  622. local ROTATION1 = (Table.RotationX or 0)
  623. local ROTATION2 = (Table.RotationY or 0)
  624. local ROTATION3 = (Table.RotationZ or 0)
  625. local MATERIAL = (Table.Material or "Neon")
  626. local COLOR = (Table.Color or C3(1,1,1))
  627. local TIME = (Table.Time or 45)
  628. local SOUNDID = (Table.SoundID or nil)
  629. local SOUNDPITCH = (Table.SoundPitch or nil)
  630. local SOUNDVOLUME = (Table.SoundVolume or nil)
  631. coroutine.resume(coroutine.create(function()
  632. local PLAYSSOUND = false
  633. local SOUND = nil
  634. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  635. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  636. PLAYSSOUND = true
  637. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  638. end
  639. EFFECT.Color = COLOR
  640. local MSH = nil
  641. if TYPE == "Sphere" then
  642. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  643. elseif TYPE == "Block" then
  644. MSH = IT("BlockMesh",EFFECT)
  645. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  646. elseif TYPE == "Wave" then
  647. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  648. elseif TYPE == "Ring" then
  649. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  650. elseif TYPE == "Slash" then
  651. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  652. elseif TYPE == "Round Slash" then
  653. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  654. elseif TYPE == "Swirl" then
  655. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  656. elseif TYPE == "Skull" then
  657. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  658. elseif TYPE == "Crystal" then
  659. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  660. end
  661. if MSH ~= nil then
  662. local MOVESPEED = nil
  663. if MOVEDIRECTION ~= nil then
  664. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  665. end
  666. local GROWTH = SIZE - ENDSIZE
  667. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  668. if TYPE == "Block" then
  669. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  670. else
  671. EFFECT.CFrame = CFRAME
  672. end
  673. for LOOP = 1, TIME+1 do
  674. Swait()
  675. MSH.Scale = MSH.Scale - GROWTH/TIME
  676. if TYPE == "Wave" then
  677. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  678. end
  679. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  680. if TYPE == "Block" then
  681. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  682. else
  683. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  684. end
  685. if MOVEDIRECTION ~= nil then
  686. local ORI = EFFECT.Orientation
  687. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  688. EFFECT.Orientation = ORI
  689. end
  690. end
  691. if PLAYSSOUND == false then
  692. EFFECT:remove()
  693. else
  694. repeat Swait() until SOUND.Playing == false
  695. EFFECT:remove()
  696. end
  697. else
  698. if PLAYSSOUND == false then
  699. EFFECT:remove()
  700. else
  701. repeat Swait() until SOUND.Playing == false
  702. EFFECT:remove()
  703. end
  704. end
  705. end))
  706. end
  707.  
  708. function MakeForm(PART,TYPE)
  709. if TYPE == "Cyl" then
  710. local MSH = IT("CylinderMesh",PART)
  711. elseif TYPE == "Ball" then
  712. local MSH = IT("SpecialMesh",PART)
  713. MSH.MeshType = "Sphere"
  714. elseif TYPE == "Wedge" then
  715. local MSH = IT("SpecialMesh",PART)
  716. MSH.MeshType = "Wedge"
  717. end
  718. end
  719.  
  720. Debris = game:GetService("Debris")
  721.  
  722. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  723. local DIRECTION = CF(StartPos,EndPos).lookVector
  724. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  725. end
  726.  
  727. function turnto(position)
  728. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  729. end
  730.  
  731. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  732. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  733. end
  734.  
  735. function PositiveAngle(NUMBER)
  736. if NUMBER >= 0 then
  737. NUMBER = 0
  738. end
  739. return NUMBER
  740. end
  741.  
  742. function NegativeAngle(NUMBER)
  743. if NUMBER <= 0 then
  744. NUMBER = 0
  745. end
  746. return NUMBER
  747. end
  748.  
  749. function Swait(NUMBER)
  750. if NUMBER == 0 or NUMBER == nil then
  751. ArtificialHB.Event:wait()
  752. else
  753. for i = 1, NUMBER do
  754. ArtificialHB.Event:wait()
  755. end
  756. end
  757. end
  758.  
  759. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  760. local NEWMESH = IT(MESH)
  761. if MESH == "SpecialMesh" then
  762. NEWMESH.MeshType = MESHTYPE
  763. if MESHID ~= "nil" and MESHID ~= "" then
  764. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  765. end
  766. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  767. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  768. end
  769. end
  770. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  771. NEWMESH.Scale = SCALE
  772. NEWMESH.Parent = PARENT
  773. return NEWMESH
  774. end
  775.  
  776. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  777. local NEWPART = IT("Part")
  778. NEWPART.formFactor = FORMFACTOR
  779. NEWPART.Reflectance = REFLECTANCE
  780. NEWPART.Transparency = TRANSPARENCY
  781. NEWPART.CanCollide = false
  782. NEWPART.Locked = true
  783. NEWPART.Anchored = true
  784. if ANCHOR == false then
  785. NEWPART.Anchored = false
  786. end
  787. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  788. NEWPART.Name = NAME
  789. NEWPART.Size = SIZE
  790. NEWPART.Position = Torso.Position
  791. NEWPART.Material = MATERIAL
  792. NEWPART:BreakJoints()
  793. NEWPART.Parent = PARENT
  794. return NEWPART
  795. end
  796.  
  797. local function weldBetween(a, b)
  798. local weldd = Instance.new("ManualWeld")
  799. weldd.Part0 = a
  800. weldd.Part1 = b
  801. weldd.C0 = CFrame.new()
  802. weldd.C1 = b.CFrame:inverse() * a.CFrame
  803. weldd.Parent = a
  804. return weldd
  805. end
  806.  
  807.  
  808. function QuaternionFromCFrame(cf)
  809. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  810. local trace = m00 + m11 + m22
  811. if trace > 0 then
  812. local s = math.sqrt(1 + trace)
  813. local recip = 0.5 / s
  814. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  815. else
  816. local i = 0
  817. if m11 > m00 then
  818. i = 1
  819. end
  820. if m22 > (i == 0 and m00 or m11) then
  821. i = 2
  822. end
  823. if i == 0 then
  824. local s = math.sqrt(m00 - m11 - m22 + 1)
  825. local recip = 0.5 / s
  826. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  827. elseif i == 1 then
  828. local s = math.sqrt(m11 - m22 - m00 + 1)
  829. local recip = 0.5 / s
  830. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  831. elseif i == 2 then
  832. local s = math.sqrt(m22 - m00 - m11 + 1)
  833. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  834. end
  835. end
  836. end
  837.  
  838. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  839. local xs, ys, zs = x + x, y + y, z + z
  840. local wx, wy, wz = w * xs, w * ys, w * zs
  841. local xx = x * xs
  842. local xy = x * ys
  843. local xz = x * zs
  844. local yy = y * ys
  845. local yz = y * zs
  846. local zz = z * zs
  847. 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))
  848. end
  849.  
  850. function QuaternionSlerp(a, b, t)
  851. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  852. local startInterp, finishInterp;
  853. if cosTheta >= 0.0001 then
  854. if (1 - cosTheta) > 0.0001 then
  855. local theta = ACOS(cosTheta)
  856. local invSinTheta = 1 / SIN(theta)
  857. startInterp = SIN((1 - t) * theta) * invSinTheta
  858. finishInterp = SIN(t * theta) * invSinTheta
  859. else
  860. startInterp = 1 - t
  861. finishInterp = t
  862. end
  863. else
  864. if (1 + cosTheta) > 0.0001 then
  865. local theta = ACOS(-cosTheta)
  866. local invSinTheta = 1 / SIN(theta)
  867. startInterp = SIN((t - 1) * theta) * invSinTheta
  868. finishInterp = SIN(t * theta) * invSinTheta
  869. else
  870. startInterp = t - 1
  871. finishInterp = t
  872. end
  873. end
  874. 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
  875. end
  876.  
  877. function Clerp(a, b, t)
  878. local qa = {QuaternionFromCFrame(a)}
  879. local qb = {QuaternionFromCFrame(b)}
  880. local ax, ay, az = a.x, a.y, a.z
  881. local bx, by, bz = b.x, b.y, b.z
  882. local _t = 1 - t
  883. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  884. end
  885.  
  886. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  887. local frame = IT("Frame")
  888. frame.BackgroundTransparency = TRANSPARENCY
  889. frame.BorderSizePixel = BORDERSIZEPIXEL
  890. frame.Position = POSITION
  891. frame.Size = SIZE
  892. frame.BackgroundColor3 = COLOR
  893. frame.BorderColor3 = BORDERCOLOR
  894. frame.Name = NAME
  895. frame.Parent = PARENT
  896. return frame
  897. end
  898.  
  899. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  900. local label = IT("TextLabel")
  901. label.BackgroundTransparency = 1
  902. label.Size = UD2(1, 0, 1, 0)
  903. label.Position = UD2(0, 0, 0, 0)
  904. label.TextColor3 = TEXTCOLOR
  905. label.TextStrokeTransparency = STROKETRANSPARENCY
  906. label.TextTransparency = TRANSPARENCY
  907. label.FontSize = TEXTFONTSIZE
  908. label.Font = TEXTFONT
  909. label.BorderSizePixel = BORDERSIZEPIXEL
  910. label.TextScaled = false
  911. label.Text = TEXT
  912. label.Name = NAME
  913. label.Parent = PARENT
  914. return label
  915. end
  916.  
  917. function NoOutlines(PART)
  918. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  919. end
  920.  
  921. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  922. local NEWWELD = IT(TYPE)
  923. NEWWELD.Part0 = PART0
  924. NEWWELD.Part1 = PART1
  925. NEWWELD.C0 = C0
  926. NEWWELD.C1 = C1
  927. NEWWELD.Parent = PARENT
  928. return NEWWELD
  929. end
  930.  
  931. local S = IT("Sound")
  932. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  933. local NEWSOUND = nil
  934. coroutine.resume(coroutine.create(function()
  935. NEWSOUND = S:Clone()
  936. NEWSOUND.Parent = PARENT
  937. NEWSOUND.Volume = VOLUME
  938. NEWSOUND.Pitch = PITCH
  939. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  940. NEWSOUND:play()
  941. if DOESLOOP == true then
  942. NEWSOUND.Looped = true
  943. else
  944. repeat wait(1) until NEWSOUND.Playing == false
  945. NEWSOUND:remove()
  946. end
  947. end))
  948. return NEWSOUND
  949. end
  950.  
  951. function CFrameFromTopBack(at, top, back)
  952. local right = top:Cross(back)
  953. 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)
  954. end
  955.  
  956. --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})
  957. function WACKYEFFECT(Table)
  958. local TYPE = (Table.EffectType or "Sphere")
  959. local SIZE = (Table.Size or VT(1,1,1))
  960. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  961. local TRANSPARENCY = (Table.Transparency or 0)
  962. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  963. local CFRAME = (Table.CFrame or Torso.CFrame)
  964. local MOVEDIRECTION = (Table.MoveToPos or nil)
  965. local ROTATION1 = (Table.RotationX or 0)
  966. local ROTATION2 = (Table.RotationY or 0)
  967. local ROTATION3 = (Table.RotationZ or 0)
  968. local MATERIAL = (Table.Material or "Neon")
  969. local COLOR = (Table.Color or C3(1,1,1))
  970. local TIME = (Table.Time or 45)
  971. local SOUNDID = (Table.SoundID or nil)
  972. local SOUNDPITCH = (Table.SoundPitch or nil)
  973. local SOUNDVOLUME = (Table.SoundVolume or nil)
  974. coroutine.resume(coroutine.create(function()
  975. local PLAYSSOUND = false
  976. local SOUND = nil
  977. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  978. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  979. PLAYSSOUND = true
  980. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  981. end
  982. EFFECT.Color = COLOR
  983. local MSH = nil
  984. if TYPE == "Sphere" then
  985. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  986. elseif TYPE == "Block" then
  987. MSH = IT("BlockMesh",EFFECT)
  988. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  989. elseif TYPE == "Wave" then
  990. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  991. elseif TYPE == "Ring" then
  992. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  993. elseif TYPE == "Slash" then
  994. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  995. elseif TYPE == "Round Slash" then
  996. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  997. elseif TYPE == "Swirl" then
  998. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  999. elseif TYPE == "Skull" then
  1000. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1001. elseif TYPE == "Crystal" then
  1002. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1003. end
  1004. if MSH ~= nil then
  1005. local MOVESPEED = nil
  1006. if MOVEDIRECTION ~= nil then
  1007. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1008. end
  1009. local GROWTH = SIZE - ENDSIZE
  1010. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1011. if TYPE == "Block" then
  1012. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1013. else
  1014. EFFECT.CFrame = CFRAME
  1015. end
  1016. for LOOP = 1, TIME+1 do
  1017. Swait()
  1018. MSH.Scale = MSH.Scale - GROWTH/TIME
  1019. if TYPE == "Wave" then
  1020. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1021. end
  1022. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1023. if TYPE == "Block" then
  1024. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1025. else
  1026. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1027. end
  1028. if MOVEDIRECTION ~= nil then
  1029. local ORI = EFFECT.Orientation
  1030. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1031. EFFECT.Orientation = ORI
  1032. end
  1033. end
  1034. if PLAYSSOUND == false then
  1035. EFFECT:remove()
  1036. else
  1037. SOUND.Stopped:Connect(function()
  1038. EFFECT:remove()
  1039. end)
  1040. end
  1041. else
  1042. if PLAYSSOUND == false then
  1043. EFFECT:remove()
  1044. else
  1045. repeat Swait() until SOUND.Playing == false
  1046. EFFECT:remove()
  1047. end
  1048. end
  1049. end))
  1050. end
  1051.  
  1052. function MakeForm(PART,TYPE)
  1053. if TYPE == "Cyl" then
  1054. local MSH = IT("CylinderMesh",PART)
  1055. elseif TYPE == "Ball" then
  1056. local MSH = IT("SpecialMesh",PART)
  1057. MSH.MeshType = "Sphere"
  1058. elseif TYPE == "Wedge" then
  1059. local MSH = IT("SpecialMesh",PART)
  1060. MSH.MeshType = "Wedge"
  1061. end
  1062. end
  1063.  
  1064. Debris = game:GetService("Debris")
  1065.  
  1066. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1067. local DIRECTION = CF(StartPos,EndPos).lookVector
  1068. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1069. end
  1070.  
  1071. local EyeSizes={
  1072. NumberSequenceKeypoint.new(0,1,0),
  1073. NumberSequenceKeypoint.new(1,0,0)
  1074. }
  1075. local EyeTrans={
  1076. NumberSequenceKeypoint.new(0,0.8,0),
  1077. NumberSequenceKeypoint.new(1,1,0)
  1078. }
  1079. local PE=Instance.new("ParticleEmitter",nil)
  1080. PE.LightEmission=.8
  1081. PE.Color = ColorSequence.new(BRICKC("Black").Color)
  1082. PE.Size=NumberSequence.new(EyeSizes)
  1083. PE.Transparency=NumberSequence.new(EyeTrans)
  1084. PE.Lifetime=NumberRange.new(0.35,1.5)
  1085. PE.Rotation=NumberRange.new(0,360)
  1086. PE.Rate=999
  1087. PE.VelocitySpread = 10000
  1088. PE.Acceleration = Vector3.new(0,0,0)
  1089. PE.Drag = 5
  1090. PE.Speed = NumberRange.new(0,0,0)
  1091. PE.Texture="http://www.roblox.com/asset/?id=1351966707"
  1092. PE.ZOffset = -0
  1093. PE.Name = "PE"
  1094. PE.Enabled = false
  1095.  
  1096. function particles(art)
  1097. local PARTICLES = PE:Clone()
  1098. PARTICLES.Parent = art
  1099. end
  1100.  
  1101. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  1102. if FLOOR ~= nil then
  1103. coroutine.resume(coroutine.create(function()
  1104. local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  1105. PART.CFrame = CF(POSITION)
  1106. for i = 1, 45 do
  1107. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  1108. RingPiece.Material = FLOOR.Material
  1109. RingPiece.Color = FLOOR.Color
  1110. RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  1111. Debris:AddItem(RingPiece,SWAIT)
  1112. end
  1113. PART:remove()
  1114. end))
  1115. end
  1116. end
  1117.  
  1118. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH)
  1119. if FLOOR ~= nil then
  1120. for i = 1, AMOUNT do
  1121. local DEBREE = CreatePart(3, Effects, "Neon", FLOOR.Reflectance, FLOOR.Transparency, "Peal", "Debree", BLOCKSIZE, false)
  1122. DEBREE.Material = FLOOR.Material
  1123. DEBREE.Color = FLOOR.Color
  1124. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  1125. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  1126. coroutine.resume(coroutine.create(function()
  1127. Swait(15)
  1128. DEBREE.Parent = workspace
  1129. DEBREE.CanCollide = true
  1130. Debris:AddItem(DEBREE,SWAIT)
  1131. end))
  1132. end
  1133. end
  1134. end
  1135.  
  1136. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1137. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1138. end
  1139.  
  1140. function PositiveAngle(NUMBER)
  1141. if NUMBER >= 0 then
  1142. NUMBER = 0
  1143. end
  1144. return NUMBER
  1145. end
  1146.  
  1147. function NegativeAngle(NUMBER)
  1148. if NUMBER <= 0 then
  1149. NUMBER = 0
  1150. end
  1151. return NUMBER
  1152. end
  1153.  
  1154. function Swait(NUMBER)
  1155. if NUMBER == 0 or NUMBER == nil then
  1156. ArtificialHB.Event:wait()
  1157. else
  1158. for i = 1, NUMBER do
  1159. ArtificialHB.Event:wait()
  1160. end
  1161. end
  1162. end
  1163.  
  1164. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  1165. local NEWMESH = IT(MESH)
  1166. if MESH == "SpecialMesh" then
  1167. NEWMESH.MeshType = MESHTYPE
  1168. if MESHID ~= "nil" and MESHID ~= "" then
  1169. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  1170. end
  1171. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  1172. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  1173. end
  1174. end
  1175. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  1176. NEWMESH.Scale = SCALE
  1177. NEWMESH.Parent = PARENT
  1178. return NEWMESH
  1179. end
  1180.  
  1181. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  1182. local NEWPART = IT("Part")
  1183. NEWPART.formFactor = FORMFACTOR
  1184. NEWPART.Reflectance = REFLECTANCE
  1185. NEWPART.Transparency = TRANSPARENCY
  1186. NEWPART.CanCollide = false
  1187. NEWPART.Locked = true
  1188. NEWPART.Anchored = true
  1189. if ANCHOR == false then
  1190. NEWPART.Anchored = false
  1191. end
  1192. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  1193. NEWPART.Name = NAME
  1194. NEWPART.Size = SIZE
  1195. NEWPART.Position = Torso.Position
  1196. NEWPART.Material = MATERIAL
  1197. NEWPART:BreakJoints()
  1198. NEWPART.Parent = PARENT
  1199. return NEWPART
  1200. end
  1201.  
  1202. local function weldBetween(a, b)
  1203. local weldd = Instance.new("ManualWeld")
  1204. weldd.Part0 = a
  1205. weldd.Part1 = b
  1206. weldd.C0 = CFrame.new()
  1207. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1208. weldd.Parent = a
  1209. return weldd
  1210. end
  1211.  
  1212.  
  1213. function QuaternionFromCFrame(cf)
  1214. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1215. local trace = m00 + m11 + m22
  1216. if trace > 0 then
  1217. local s = math.sqrt(1 + trace)
  1218. local recip = 0.5 / s
  1219. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1220. else
  1221. local i = 0
  1222. if m11 > m00 then
  1223. i = 1
  1224. end
  1225. if m22 > (i == 0 and m00 or m11) then
  1226. i = 2
  1227. end
  1228. if i == 0 then
  1229. local s = math.sqrt(m00 - m11 - m22 + 1)
  1230. local recip = 0.5 / s
  1231. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1232. elseif i == 1 then
  1233. local s = math.sqrt(m11 - m22 - m00 + 1)
  1234. local recip = 0.5 / s
  1235. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1236. elseif i == 2 then
  1237. local s = math.sqrt(m22 - m00 - m11 + 1)
  1238. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1239. end
  1240. end
  1241. end
  1242.  
  1243. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1244. local xs, ys, zs = x + x, y + y, z + z
  1245. local wx, wy, wz = w * xs, w * ys, w * zs
  1246. local xx = x * xs
  1247. local xy = x * ys
  1248. local xz = x * zs
  1249. local yy = y * ys
  1250. local yz = y * zs
  1251. local zz = z * zs
  1252. 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))
  1253. end
  1254.  
  1255. function QuaternionSlerp(a, b, t)
  1256. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1257. local startInterp, finishInterp;
  1258. if cosTheta >= 0.0001 then
  1259. if (1 - cosTheta) > 0.0001 then
  1260. local theta = ACOS(cosTheta)
  1261. local invSinTheta = 1 / SIN(theta)
  1262. startInterp = SIN((1 - t) * theta) * invSinTheta
  1263. finishInterp = SIN(t * theta) * invSinTheta
  1264. else
  1265. startInterp = 1 - t
  1266. finishInterp = t
  1267. end
  1268. else
  1269. if (1 + cosTheta) > 0.0001 then
  1270. local theta = ACOS(-cosTheta)
  1271. local invSinTheta = 1 / SIN(theta)
  1272. startInterp = SIN((t - 1) * theta) * invSinTheta
  1273. finishInterp = SIN(t * theta) * invSinTheta
  1274. else
  1275. startInterp = t - 1
  1276. finishInterp = t
  1277. end
  1278. end
  1279. 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
  1280. end
  1281.  
  1282. function Clerp(a, b, t)
  1283. local qa = {QuaternionFromCFrame(a)}
  1284. local qb = {QuaternionFromCFrame(b)}
  1285. local ax, ay, az = a.x, a.y, a.z
  1286. local bx, by, bz = b.x, b.y, b.z
  1287. local _t = 1 - t
  1288. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1289. end
  1290.  
  1291. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1292. local frame = IT("Frame")
  1293. frame.BackgroundTransparency = TRANSPARENCY
  1294. frame.BorderSizePixel = BORDERSIZEPIXEL
  1295. frame.Position = POSITION
  1296. frame.Size = SIZE
  1297. frame.BackgroundColor3 = COLOR
  1298. frame.BorderColor3 = BORDERCOLOR
  1299. frame.Name = NAME
  1300. frame.Parent = PARENT
  1301. return frame
  1302. end
  1303.  
  1304. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1305. local label = IT("TextLabel")
  1306. label.BackgroundTransparency = 1
  1307. label.Size = UD2(1, 0, 1, 0)
  1308. label.Position = UD2(0, 0, 0, 0)
  1309. label.TextColor3 = TEXTCOLOR
  1310. label.TextStrokeTransparency = STROKETRANSPARENCY
  1311. label.TextTransparency = TRANSPARENCY
  1312. label.FontSize = TEXTFONTSIZE
  1313. label.Font = TEXTFONT
  1314. label.BorderSizePixel = BORDERSIZEPIXEL
  1315. label.TextScaled = false
  1316. label.Text = TEXT
  1317. label.Name = NAME
  1318. label.Parent = PARENT
  1319. return label
  1320. end
  1321.  
  1322. function NoOutlines(PART)
  1323. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1324. end
  1325.  
  1326. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1327. local NEWWELD = IT(TYPE)
  1328. NEWWELD.Part0 = PART0
  1329. NEWWELD.Part1 = PART1
  1330. NEWWELD.C0 = C0
  1331. NEWWELD.C1 = C1
  1332. NEWWELD.Parent = PARENT
  1333. return NEWWELD
  1334. end
  1335.  
  1336. local S = IT("Sound")
  1337. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  1338. local NEWSOUND = nil
  1339. coroutine.resume(coroutine.create(function()
  1340. NEWSOUND = S:Clone()
  1341. NEWSOUND.Parent = PARENT
  1342. NEWSOUND.Volume = VOLUME
  1343. NEWSOUND.Pitch = PITCH
  1344. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1345. NEWSOUND:play()
  1346. if DOESLOOP == true then
  1347. NEWSOUND.Looped = true
  1348. else
  1349. repeat wait(1) until NEWSOUND.Playing == false
  1350. NEWSOUND:remove()
  1351. end
  1352. end))
  1353. return NEWSOUND
  1354. end
  1355.  
  1356. function CFrameFromTopBack(at, top, back)
  1357. local right = top:Cross(back)
  1358. 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)
  1359. end
  1360.  
  1361. --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})
  1362. function WACKYEFFECT(Table)
  1363. local TYPE = (Table.EffectType or "Sphere")
  1364. local SIZE = (Table.Size or VT(1,1,1))
  1365. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  1366. local TRANSPARENCY = (Table.Transparency or 0)
  1367. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  1368. local CFRAME = (Table.CFrame or Torso.CFrame)
  1369. local MOVEDIRECTION = (Table.MoveToPos or nil)
  1370. local ROTATION1 = (Table.RotationX or 0)
  1371. local ROTATION2 = (Table.RotationY or 0)
  1372. local ROTATION3 = (Table.RotationZ or 0)
  1373. local MATERIAL = (Table.Material or "Neon")
  1374. local COLOR = (Table.Color or C3(1,1,1))
  1375. local TIME = (Table.Time or 45)
  1376. local SOUNDID = (Table.SoundID or nil)
  1377. local SOUNDPITCH = (Table.SoundPitch or nil)
  1378. local SOUNDVOLUME = (Table.SoundVolume or nil)
  1379. coroutine.resume(coroutine.create(function()
  1380. local PLAYSSOUND = false
  1381. local SOUND = nil
  1382. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  1383. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1384. PLAYSSOUND = true
  1385. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1386. end
  1387. EFFECT.Color = COLOR
  1388. local MSH = nil
  1389. if TYPE == "Sphere" then
  1390. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1391. elseif TYPE == "Block" then
  1392. MSH = IT("BlockMesh",EFFECT)
  1393. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  1394. elseif TYPE == "Wave" then
  1395. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1396. elseif TYPE == "Ring" then
  1397. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1398. elseif TYPE == "Slash" then
  1399. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1400. elseif TYPE == "Round Slash" then
  1401. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1402. elseif TYPE == "Swirl" then
  1403. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1404. elseif TYPE == "Skull" then
  1405. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1406. elseif TYPE == "Crystal" then
  1407. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1408. end
  1409. if MSH ~= nil then
  1410. local MOVESPEED = nil
  1411. if MOVEDIRECTION ~= nil then
  1412. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1413. end
  1414. local GROWTH = SIZE - ENDSIZE
  1415. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1416. if TYPE == "Block" then
  1417. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1418. else
  1419. EFFECT.CFrame = CFRAME
  1420. end
  1421. for LOOP = 1, TIME+1 do
  1422. Swait()
  1423. MSH.Scale = MSH.Scale - GROWTH/TIME
  1424. if TYPE == "Wave" then
  1425. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1426. end
  1427. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1428. if TYPE == "Block" then
  1429. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1430. else
  1431. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1432. end
  1433. if MOVEDIRECTION ~= nil then
  1434. local ORI = EFFECT.Orientation
  1435. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1436. EFFECT.Orientation = ORI
  1437. end
  1438. end
  1439. if PLAYSSOUND == false then
  1440. EFFECT:remove()
  1441. else
  1442. repeat Swait() until SOUND.Playing == false
  1443. EFFECT:remove()
  1444. end
  1445. else
  1446. if PLAYSSOUND == false then
  1447. EFFECT:remove()
  1448. else
  1449. repeat Swait() until SOUND.Playing == false
  1450. EFFECT:remove()
  1451. end
  1452. end
  1453. end))
  1454. end
  1455.  
  1456. function MakeForm(PART,TYPE)
  1457. if TYPE == "Cyl" then
  1458. local MSH = IT("CylinderMesh",PART)
  1459. elseif TYPE == "Ball" then
  1460. local MSH = IT("SpecialMesh",PART)
  1461. MSH.MeshType = "Sphere"
  1462. elseif TYPE == "Wedge" then
  1463. local MSH = IT("SpecialMesh",PART)
  1464. MSH.MeshType = "Wedge"
  1465. end
  1466. end
  1467.  
  1468. Debris = game:GetService("Debris")
  1469.  
  1470. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1471. local DIRECTION = CF(StartPos,EndPos).lookVector
  1472. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1473. end
  1474.  
  1475. function turnto(position)
  1476. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1477. end
  1478.  
  1479. --//=================================\\
  1480. --|| WEAPON CREATION
  1481. --\\=================================//
  1482. local BODY = {}
  1483.  
  1484. for _, c in pairs(Character:GetDescendants()) do
  1485. if c:IsA("BasePart") and c.Name ~= "Handle" then
  1486. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  1487. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1488. end
  1489. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  1490. elseif c:IsA("JointInstance") then
  1491. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  1492. end
  1493. end
  1494.  
  1495. for e = 1, #BODY do
  1496. if BODY[e] ~= nil then
  1497. local STUFF = BODY[e]
  1498. local PART = STUFF[1]
  1499. local PARENT = STUFF[2]
  1500. local MATERIAL = STUFF[3]
  1501. local COLOR = STUFF[4]
  1502. local TRANSPARENCY = STUFF[5]
  1503. if PART.ClassName == "Part" and PART ~= RootPart then
  1504. PART.Material = MATERIAL
  1505. PART.Color = COLOR
  1506. PART.Transparency = TRANSPARENCY
  1507. end
  1508. PART.AncestryChanged:Connect(function()
  1509. PART.Parent = PARENT
  1510. end)
  1511. end
  1512. end
  1513.  
  1514.  
  1515. local LASTPART = Head
  1516. for i = 1, 20 do
  1517. local MATH = (1-(i/25))
  1518. if LASTPART == Head then
  1519. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1520. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(15), RAD(-15)), CF(0, 0, 0))
  1521. LASTPART = Horn
  1522. Horn.Color = C3((i*3-3)/255,0,0)
  1523. else
  1524. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1525. 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))
  1526. LASTPART = Horn
  1527. Horn.Color = C3((i*3-3)/255,0,0)
  1528. end
  1529. end
  1530. local LASTPART = Head
  1531. for i = 1, 20 do
  1532. local MATH = (1-(i/25))
  1533. if LASTPART == Head then
  1534. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1535. CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(-0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(-15), RAD(15)), CF(0, 0, 0))
  1536. LASTPART = Horn
  1537. Horn.Color = C3((i*3-3)/255,0,0)
  1538. else
  1539. local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
  1540. 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))
  1541. LASTPART = Horn
  1542. Horn.Color = C3((i*3-3)/255,0,0)
  1543. end
  1544. end
  1545.  
  1546. local A = IT("Attachment",Torso)
  1547. A.Position = VT(1,1.3,0)
  1548. A.Orientation = VT(-0.098, -89.999, 0.227)
  1549. local B = IT("Attachment",Torso)
  1550. B.Position = VT(-1.3,-0.6,0)
  1551. B.Orientation = VT(-88.911, -68.808, 158.782)
  1552. local ChainLink = IT("Beam",Torso)
  1553. ChainLink.Texture = "rbxassetid://73042633"
  1554. ChainLink.Color = ColorSequence.new(Color3.fromRGB(cR,cG,cB))
  1555. ChainLink.TextureSpeed = 999
  1556. ChainLink.FaceCamera = true
  1557. ChainLink.Width0 = 1
  1558. ChainLink.Width1 = 1
  1559. ChainLink.TextureLength = 3
  1560. ChainLink.Attachment0 = A
  1561. ChainLink.Attachment1 = B
  1562. ChainLink.CurveSize0 = 1.6
  1563. ChainLink.CurveSize1 = 1.6
  1564. ChainLink.FaceCamera = true
  1565. ChainLink.Transparency = NumberSequence.new(0)
  1566. local ChainLink = IT("Beam",Torso)
  1567. ChainLink.Texture = "rbxassetid://73042633"
  1568. ChainLink.Color = ColorSequence.new(Color3.fromRGB(cR,cG,cB))
  1569. ChainLink.TextureSpeed = 999
  1570. ChainLink.FaceCamera = true
  1571. ChainLink.Width0 = 1
  1572. ChainLink.Width1 = 1
  1573. ChainLink.TextureLength = 3
  1574. ChainLink.Attachment0 = B
  1575. ChainLink.Attachment1 = A
  1576. ChainLink.CurveSize0 = 1.6
  1577. ChainLink.CurveSize1 = 1.6
  1578. ChainLink.FaceCamera = true
  1579. ChainLink.Transparency = NumberSequence.new(0)
  1580. local A = IT("Attachment",Torso)
  1581. A.Position = VT(1.3,-0.85,0)
  1582. A.Orientation = VT(-0.098, -89.999, 0.227)
  1583. local B = IT("Attachment",Torso)
  1584. B.Position = VT(-1,2,0)
  1585. B.Orientation = VT(-88.911, -68.808, 158.782)
  1586. local ChainLink = IT("Beam",Torso)
  1587. ChainLink.Texture = "rbxassetid://73042633"
  1588. ChainLink.Color = ColorSequence.new(Color3.fromRGB(cR,cG,cB))
  1589. ChainLink.TextureSpeed = 999
  1590. ChainLink.FaceCamera = true
  1591. ChainLink.Width0 = 1
  1592. ChainLink.Width1 = 1
  1593. ChainLink.TextureLength = 3
  1594. ChainLink.Attachment0 = A
  1595. ChainLink.Attachment1 = B
  1596. ChainLink.CurveSize0 = 1.3
  1597. ChainLink.CurveSize1 = 1.3
  1598. ChainLink.FaceCamera = true
  1599. ChainLink.Transparency = NumberSequence.new(0)
  1600. local ChainLink = IT("Beam",Torso)
  1601. ChainLink.Texture = "rbxassetid://73042633"
  1602. ChainLink.Color = ColorSequence.new(Color3.fromRGB(cR,cG,cB))
  1603. ChainLink.TextureSpeed = 999
  1604. ChainLink.FaceCamera = true
  1605. ChainLink.Width0 = 1
  1606. ChainLink.Width1 = 1
  1607. ChainLink.TextureLength = 3
  1608. ChainLink.Attachment0 = B
  1609. ChainLink.Attachment1 = A
  1610. ChainLink.CurveSize0 = 1.3
  1611. ChainLink.CurveSize1 = 1.3
  1612. ChainLink.FaceCamera = true
  1613. ChainLink.Transparency = NumberSequence.new(0)
  1614.  
  1615. -------------------------------------------------------
  1616. local Orbd = Instance.new("Part", Character)
  1617. Orbd.Name = "Orbd"
  1618. Orbd.Shape = Enum.PartType.Ball
  1619. Orbd.CanCollide = false
  1620. Orbd.BrickColor = BrickColor.new("Really black")
  1621. Orbd.Transparency = 0
  1622. Orbd.Material = "Neon"
  1623. Orbd.Size = Vector3.new(0.3, 0.3, 0.3)
  1624. Orbd.TopSurface = Enum.SurfaceType.Smooth
  1625. Orbd.BottomSurface = Enum.SurfaceType.Smooth
  1626.  
  1627. local Weld = Instance.new("Weld", Orbd)
  1628. Weld.Part0 = Character.Head
  1629. Weld.Part1 = Orbd
  1630. Weld.C1 = CFrame.new(-0.26, -0.24, 0.55)
  1631.  
  1632. --------------------------------------------------------
  1633. local Orbvc = Instance.new("Part", Character)
  1634. Orbvc.Name = "Orbvc"
  1635. Orbvc.Shape = Enum.PartType.Ball
  1636. Orbvc.CanCollide = false
  1637. Orbvc.BrickColor = BrickColor.new("Really black")
  1638. Orbvc.Transparency = 0
  1639. Orbvc.Material = "Neon"
  1640. Orbvc.Size = Vector3.new(0.3, 0.3, 0.3)
  1641. Orbvc.TopSurface = Enum.SurfaceType.Smooth
  1642. Orbvc.BottomSurface = Enum.SurfaceType.Smooth
  1643.  
  1644. local Weld = Instance.new("Weld", Orbvc)
  1645. Weld.Part0 = Character.Head
  1646. Weld.Part1 = Orbvc
  1647. Weld.C1 = CFrame.new(0.26, -0.24, 0.55)
  1648. ---------------------------------------------------------
  1649. local Mask = Instance.new("Part", Character)
  1650. Mask.Name = "Mask"
  1651. Mask.CanCollide = false
  1652. Mask.BrickColor = BrickColor.new("Medium stone grey")
  1653. Mask.Transparency = 0
  1654. Mask.Material = "Neon"
  1655. Mask.Size = Vector3.new(0.1, 0.1, 0.1)
  1656. Mask.TopSurface = Enum.SurfaceType.Smooth
  1657. Mask.BottomSurface = Enum.SurfaceType.Smooth
  1658.  
  1659. local Weld = Instance.new("Weld", Mask)
  1660. Weld.Part0 = Character.Head
  1661. Weld.Part1 = Mask
  1662. Weld.C1 = CFrame.new(0, -0.1, 0.8)
  1663.  
  1664. local M1 = Instance.new("SpecialMesh")
  1665. M1.Parent = Mask
  1666. M1.MeshId = "http://www.roblox.com/asset/?id=62679079"
  1667. M1.Scale = Vector3.new( 1, 1, 2)
  1668. ----------------------------------------------------------
  1669. local Hood = Instance.new("Part", Character)
  1670. Hood.Name = "Hood"
  1671. Hood.CanCollide = false
  1672. Hood.BrickColor = BrickColor.new("Really black")
  1673. Hood.Transparency = 0
  1674. Hood.Material = "Plastic"
  1675. Hood.Size = Vector3.new(0.1, 0.1, 0.1)
  1676. Hood.TopSurface = Enum.SurfaceType.Smooth
  1677. Hood.BottomSurface = Enum.SurfaceType.Smooth
  1678.  
  1679. local Weld = Instance.new("Weld", Hood)
  1680. Weld.Part0 = Character.Head
  1681. Weld.Part1 = Hood
  1682. Weld.C1 = CFrame.new(0, -0.2, 0)
  1683.  
  1684. local M2 = Instance.new("SpecialMesh")
  1685. M2.Parent = Hood
  1686. M2.MeshId = "http://www.roblox.com/asset/?id=83499032"
  1687. M2.Scale = Vector3.new( 1, 1.2, 1.1)
  1688. ------------------------------------------------------
  1689. --[[
  1690. Thanks for using Build-To-Lua by jarredbcv.
  1691. ]]--
  1692.  
  1693. New = function(Object, Parent, Name, Data)
  1694. local Object = Instance.new(Object)
  1695. for Index, Value in pairs(Data or {}) do
  1696. Object[Index] = Value
  1697. end
  1698. Object.Parent = Parent
  1699. Object.Name = Name
  1700. return Object
  1701. end
  1702.  
  1703. for i = 1, 35 do
  1704. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false)
  1705. FACE.Color = C3(0,0,0)
  1706. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  1707. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  1708. end
  1709.  
  1710. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.6,0.1,1)/2,false)
  1711. MakeForm(Eye,"Ball")
  1712. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(-18), RAD(15)), CF(0, 0, 0.4))
  1713. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.6,0.1,1)/2,false)
  1714. MakeForm(Eye,"Ball")
  1715. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4))
  1716. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false)
  1717. MakeForm(Eye,"Ball")
  1718. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4))
  1719. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false)
  1720. MakeForm(Eye,"Ball")
  1721. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(18), RAD(0)), CF(0, 0, 0.4))
  1722.  
  1723. local BasePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(1.01,0.3,1.01),false)
  1724. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0, -0.2, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1725. for i = 1, 3 do
  1726. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false)
  1727. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0, 0, 0.6-0.3*i) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
  1728. MakeForm(Part,"Cyl")
  1729. end
  1730. for i = 1, 3 do
  1731. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false)
  1732. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.6-0.3*i, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(90)), CF(0, 0, 0))
  1733. MakeForm(Part,"Cyl")
  1734. end
  1735. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false)
  1736. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
  1737. MakeForm(Part,"Wedge")
  1738. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false)
  1739. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
  1740. MakeForm(Part,"Wedge")
  1741. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false)
  1742. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
  1743. MakeForm(Part,"Wedge")
  1744. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false)
  1745. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
  1746. MakeForm(Part,"Wedge")
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754. for _, c in pairs(Weapon:GetChildren()) do
  1755. if c.ClassName == "Part" then
  1756. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1757. local AURA = c:Clone()
  1758. AURA:BreakJoints()
  1759. AURA.Parent = c
  1760. AURA.CFrame = c.CFrame
  1761. AURA.Size = AURA.Size*1.001
  1762. AURA.Transparency = 0.8
  1763. AURA.BrickColor = BRICKC"Royal purple"
  1764. AURA.Material = "Neon"
  1765. weldBetween(c,AURA)
  1766. end
  1767. end
  1768. function refit()
  1769. Character.Parent = workspace
  1770. for e = 1, #BODY do
  1771. if BODY[e] ~= nil then
  1772. local STUFF = BODY[e]
  1773. local PART = STUFF[1]
  1774. local PARENT = STUFF[2]
  1775. local MATERIAL = STUFF[3]
  1776. local COLOR = STUFF[4]
  1777. local TRANSPARENCY = STUFF[5]
  1778. if PART.ClassName == "Part" and PART ~= RootPart then
  1779. PART.Material = MATERIAL
  1780. PART.Color = COLOR
  1781. PART.Transparency = TRANSPARENCY
  1782. end
  1783. if PART.Parent ~= PARENT then
  1784. Humanoid:remove()
  1785. PART.Parent = PARENT
  1786. Humanoid = IT("Humanoid",Character)
  1787. end
  1788. end
  1789. end
  1790. end
  1791.  
  1792. local SKILLTEXTCOLOR = BRICKC"Black".Color
  1793. local SKILLFONT = "Bodoni"
  1794. local SKILLTEXTSIZE = 7
  1795.  
  1796. Weapon.Parent = Character
  1797.  
  1798. Humanoid.Died:connect(function()
  1799.  
  1800. ATTACK = true
  1801. end)
  1802.  
  1803. 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")
  1804. 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")
  1805. 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")
  1806. 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")
  1807. 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")
  1808. local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.76, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame")
  1809.  
  1810.  
  1811. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] BEAM OF CORRUPTION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 1")
  1812. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] EXPLOSION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 2")
  1813. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] STUN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 3")
  1814. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[E] SCREAM", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 4")
  1815. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[R] WARP", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 5")
  1816. local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[Q] PAIN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 6")
  1817.  
  1818. --//=================================\\
  1819. --|| RAGDOLL STUFF
  1820. --\\=================================//
  1821.  
  1822. function recurse(root,callback,i)
  1823. i= i or 0
  1824. for _,v in pairs(root:GetChildren()) do
  1825. i = i + 1
  1826. callback(i,v)
  1827.  
  1828. if #v:GetChildren() > 0 then
  1829. i = recurse(v,callback,i)
  1830. end
  1831. end
  1832.  
  1833. return i
  1834. end
  1835.  
  1836. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  1837. attachmentName = attachmentName.."RigAttachment"
  1838. local constraint = Instance.new(className.."Constraint")
  1839. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  1840. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  1841. constraint.Name = "RagdollConstraint"..part1.Name
  1842.  
  1843. for _,propertyData in next,properties or {} do
  1844. constraint[propertyData[1]] = propertyData[2]
  1845. end
  1846.  
  1847. constraint.Parent = character
  1848. end
  1849.  
  1850. function getAttachment0(character, attachmentName)
  1851. for _,child in next,character:GetChildren() do
  1852. local attachment = child:FindFirstChild(attachmentName)
  1853. if attachment then
  1854. return attachment
  1855. end
  1856. end
  1857. end
  1858.  
  1859. function ArtificialHitbox(Part)
  1860. local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
  1861. HITBOX.CanCollide = true
  1862. HITBOX.CFrame = Part.CFrame
  1863. weldBetween(Part,HITBOX)
  1864. end
  1865.  
  1866. function R15Ragdoll(character,KeepArms)
  1867. character:BreakJoints()
  1868. coroutine.resume(coroutine.create(function()
  1869. recurse(character, function(_,v)
  1870. if v:IsA("Attachment") then
  1871. v.Axis = Vector3.new(0, 1, 0)
  1872. v.SecondaryAxis = Vector3.new(0, 0, 1)
  1873. v.Rotation = Vector3.new(0, 0, 0)
  1874. end
  1875. end)
  1876. for _,child in next,character:GetChildren() do
  1877. if child:IsA("Accoutrement") then
  1878. for _,part in next,child:GetChildren() do
  1879. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  1880. local attachment1 = part:FindFirstChildOfClass("Attachment")
  1881. local attachment0 = getAttachment0(character,attachment1.Name)
  1882. if attachment0 and attachment1 then
  1883. local constraint = Instance.new("HingeConstraint")
  1884. constraint.Attachment0 = attachment0
  1885. constraint.Attachment1 = attachment1
  1886. constraint.LimitsEnabled = true
  1887. constraint.UpperAngle = 0
  1888. constraint.LowerAngle = 0
  1889. constraint.Parent = character
  1890. end
  1891. ArtificialHitbox(part)
  1892. elseif part.Name == "HumanoidRootPart" then
  1893. part:remove()
  1894. end
  1895. end
  1896. end
  1897. end
  1898.  
  1899. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  1900. {"LimitsEnabled",true};
  1901. {"UpperAngle",5};
  1902. })
  1903. if character:FindFirstChild("Head") then
  1904. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  1905. {"LimitsEnabled",true};
  1906. {"UpperAngle",15};
  1907. })
  1908. end
  1909.  
  1910. local handProperties = {
  1911. {"LimitsEnabled", true};
  1912. {"UpperAngle",0};
  1913. {"LowerAngle",0};
  1914. }
  1915. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  1916. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  1917.  
  1918. local shinProperties = {
  1919. {"LimitsEnabled", true};
  1920. {"UpperAngle", 0};
  1921. {"LowerAngle", -75};
  1922. }
  1923. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  1924. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  1925.  
  1926. local footProperties = {
  1927. {"LimitsEnabled", true};
  1928. {"UpperAngle", 15};
  1929. {"LowerAngle", -45};
  1930. }
  1931. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  1932. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  1933. if KeepArms == true then
  1934. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  1935. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  1936. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  1937. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  1938. end
  1939. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  1940. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  1941. Debris:AddItem(character,5)
  1942. end))
  1943. end
  1944.  
  1945. function Ragdoll(Character2,CharTorso,KeepArms)
  1946. coroutine.resume(coroutine.create(function()
  1947. Character2:BreakJoints()
  1948. local hum = Character2:findFirstChild("Humanoid")
  1949. hum:remove()
  1950. local function Scan(ch)
  1951. local e
  1952. for e = 1,#ch do
  1953. Scan(ch[e]:GetChildren())
  1954. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  1955. ch[e]:remove()
  1956. end
  1957. end
  1958. end
  1959. local NEWHUM = IT("Humanoid")
  1960. NEWHUM.Name = "Corpse"
  1961. NEWHUM.Health = 0
  1962. NEWHUM.MaxHealth = 0
  1963. NEWHUM.PlatformStand = true
  1964. NEWHUM.Parent = Character2
  1965. NEWHUM.DisplayDistanceType = "None"
  1966.  
  1967. local ch = Character2:GetChildren()
  1968. local i
  1969. for i = 1,#ch do
  1970. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1971. ch[i]:remove()
  1972. end
  1973. end
  1974.  
  1975. local Torso2 = Character2.Torso
  1976. local movevector = Vector3.new()
  1977.  
  1978. if Torso2 then
  1979. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  1980. local Head = Character2:FindFirstChild("Head")
  1981. if Head then
  1982. local Neck = Instance.new("Weld")
  1983. Neck.Name = "Neck"
  1984. Neck.Part0 = Torso2
  1985. Neck.Part1 = Head
  1986. Neck.C0 = CFrame.new(0, 1.5, 0)
  1987. Neck.C1 = CFrame.new()
  1988. Neck.Parent = Torso2
  1989.  
  1990. end
  1991. local Limb = Character2:FindFirstChild("Right Arm")
  1992. if Limb and KeepArms == true then
  1993.  
  1994. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  1995. local Joint = Instance.new("Glue")
  1996. Joint.Name = "RightShoulder"
  1997. Joint.Part0 = Torso2
  1998. Joint.Part1 = Limb
  1999. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2000. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2001. Joint.Parent = Torso2
  2002.  
  2003. local B = Instance.new("Part")
  2004. B.TopSurface = 0
  2005. B.BottomSurface = 0
  2006. B.formFactor = "Symmetric"
  2007. B.Size = Vector3.new(1, 1, 1)
  2008. B.Transparency = 1
  2009. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2010. B.Parent = Character2
  2011. local W = Instance.new("Weld")
  2012. W.Part0 = Limb
  2013. W.Part1 = B
  2014. W.C0 = CFrame.new(0, -0.5, 0)
  2015. W.Parent = Limb
  2016.  
  2017. end
  2018. local Limb = Character2:FindFirstChild("Left Arm")
  2019. if Limb and KeepArms == true then
  2020.  
  2021. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  2022. local Joint = Instance.new("Glue")
  2023. Joint.Name = "LeftShoulder"
  2024. Joint.Part0 = Torso2
  2025. Joint.Part1 = Limb
  2026. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2027. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2028. Joint.Parent = Torso2
  2029.  
  2030. local B = Instance.new("Part")
  2031. B.TopSurface = 0
  2032. B.BottomSurface = 0
  2033. B.formFactor = "Symmetric"
  2034. B.Size = Vector3.new(1, 1, 1)
  2035. B.Transparency = 1
  2036. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2037. B.Parent = Character2
  2038. local W = Instance.new("Weld")
  2039. W.Part0 = Limb
  2040. W.Part1 = B
  2041. W.C0 = CFrame.new(0, -0.5, 0)
  2042. W.Parent = Limb
  2043.  
  2044. end
  2045. local Limb = Character2:FindFirstChild("Right Leg")
  2046. if Limb then
  2047.  
  2048. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  2049. local Joint = Instance.new("Glue")
  2050. Joint.Name = "RightHip"
  2051. Joint.Part0 = Torso2
  2052. Joint.Part1 = Limb
  2053. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2054. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2055. Joint.Parent = Torso2
  2056.  
  2057. local B = Instance.new("Part")
  2058. B.TopSurface = 0
  2059. B.BottomSurface = 0
  2060. B.formFactor = "Symmetric"
  2061. B.Size = Vector3.new(1, 1, 1)
  2062. B.Transparency = 1
  2063. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2064. B.Parent = Character2
  2065. local W = Instance.new("Weld")
  2066. W.Part0 = Limb
  2067. W.Part1 = B
  2068. W.C0 = CFrame.new(0, -0.5, 0)
  2069. W.Parent = Limb
  2070.  
  2071. end
  2072. local Limb = Character2:FindFirstChild("Left Leg")
  2073. if Limb then
  2074.  
  2075. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  2076. local Joint = Instance.new("Glue")
  2077. Joint.Name = "LeftHip"
  2078. Joint.Part0 = Torso2
  2079. Joint.Part1 = Limb
  2080. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2081. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2082. Joint.Parent = Torso2
  2083.  
  2084. local B = Instance.new("Part")
  2085. B.TopSurface = 0
  2086. B.BottomSurface = 0
  2087. B.formFactor = "Symmetric"
  2088. B.Size = Vector3.new(1, 1, 1)
  2089. B.Transparency = 1
  2090. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2091. B.Parent = Character2
  2092. local W = Instance.new("Weld")
  2093. W.Part0 = Limb
  2094. W.Part1 = B
  2095. W.C0 = CFrame.new(0, -0.5, 0)
  2096. W.Parent = Limb
  2097.  
  2098. end
  2099. --[
  2100. local Bar = Instance.new("Part")
  2101. Bar.TopSurface = 0
  2102. Bar.BottomSurface = 0
  2103. Bar.formFactor = "Symmetric"
  2104. Bar.Size = Vector3.new(1, 1, 1)
  2105. Bar.Transparency = 1
  2106. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  2107. Bar.Parent = Character2
  2108. local Weld = Instance.new("Weld")
  2109. Weld.Part0 = Torso2
  2110. Weld.Part1 = Bar
  2111. Weld.C0 = CFrame.new(0, 0.5, 0)
  2112. Weld.Parent = Torso2
  2113. --]]
  2114. end
  2115. Character2.Parent = workspace
  2116. Debris:AddItem(Character2,5)
  2117.  
  2118. return Character2,Torso2
  2119. end))
  2120. end
  2121.  
  2122. --//=================================\\
  2123. --|| DAMAGE FUNCTIONS
  2124. --\\=================================//
  2125. function StatLabel(CFRAME, TEXT, COLOR)
  2126. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2127. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2128. local BODYGYRO = IT("BodyGyro", STATPART)
  2129. game:GetService("Debris"):AddItem(STATPART ,5)
  2130. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2131. BILLBOARDGUI.Adornee = STATPART
  2132. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2133. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2134. BILLBOARDGUI.AlwaysOnTop = false
  2135. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2136. TEXTLABEL.BackgroundTransparency = 1
  2137. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2138. TEXTLABEL.Text = TEXT
  2139. TEXTLABEL.Font = SKILLFONT
  2140. TEXTLABEL.FontSize="Size42"
  2141. TEXTLABEL.TextColor3 = COLOR
  2142. TEXTLABEL.TextStrokeTransparency = 0
  2143. TEXTLABEL.TextScaled = true
  2144. TEXTLABEL.TextWrapped = true
  2145. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2146. for i = 1, 50 do
  2147. Swait()
  2148. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2149. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2150. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2151. end
  2152. THEPART.Parent = nil
  2153. end),STATPART, TEXTLABEL)
  2154. end
  2155.  
  2156. function StatLabel(CFRAME, TEXT, COLOR)
  2157. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2158. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2159. local BODYGYRO = IT("BodyGyro", STATPART)
  2160. game:GetService("Debris"):AddItem(STATPART ,5)
  2161. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2162. BILLBOARDGUI.Adornee = STATPART
  2163. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2164. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2165. BILLBOARDGUI.AlwaysOnTop = false
  2166. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2167. TEXTLABEL.BackgroundTransparency = 1
  2168. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2169. TEXTLABEL.Text = TEXT
  2170. TEXTLABEL.Font = "Fantasy"
  2171. TEXTLABEL.FontSize="Size42"
  2172. TEXTLABEL.TextColor3 = COLOR
  2173. TEXTLABEL.TextStrokeTransparency = 0
  2174. TEXTLABEL.TextScaled = true
  2175. TEXTLABEL.TextWrapped = true
  2176. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2177. for i = 1, 50 do
  2178. Swait()
  2179. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2180. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2181. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2182. end
  2183. THEPART.Parent = nil
  2184. end),STATPART, TEXTLABEL)
  2185. end
  2186.  
  2187. function StatLabel(CFRAME, TEXT, COLOR)
  2188. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2189. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2190. local BODYGYRO = IT("BodyGyro", STATPART)
  2191. game:GetService("Debris"):AddItem(STATPART ,5)
  2192. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2193. BILLBOARDGUI.Adornee = STATPART
  2194. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2195. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2196. BILLBOARDGUI.AlwaysOnTop = false
  2197. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2198. TEXTLABEL.BackgroundTransparency = 1
  2199. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2200. TEXTLABEL.Text = TEXT
  2201. TEXTLABEL.Font = SKILLFONT
  2202. TEXTLABEL.FontSize="Size42"
  2203. TEXTLABEL.TextColor3 = COLOR
  2204. TEXTLABEL.TextStrokeTransparency = 0
  2205. TEXTLABEL.TextScaled = true
  2206. TEXTLABEL.TextWrapped = true
  2207. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2208. for i = 1, 50 do
  2209. Swait()
  2210. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2211. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2212. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2213. end
  2214. THEPART.Parent = nil
  2215. end),STATPART, TEXTLABEL)
  2216. end
  2217.  
  2218. --//=================================\\
  2219. --|| DAMAGING
  2220. --\\=================================//
  2221. function ApplyDamage(Humanoid,Damage,TorsoPart)
  2222. local defence = Instance.new("BoolValue",Humanoid.Parent)
  2223. defence.Name = ("HitBy"..Player.Name)
  2224. game:GetService("Debris"):AddItem(defence, 0.001)
  2225. Damage = Damage * DAMAGEMULTIPLIER
  2226. if Humanoid.Health ~= 0 then
  2227. local CritChance = MRANDOM(1,100)
  2228. if Damage > Humanoid.Health then
  2229. Damage = math.ceil(Humanoid.Health)
  2230. if Damage == 0 then
  2231. Damage = 0.1
  2232. end
  2233. end
  2234. Humanoid.Health = Humanoid.Health - Damage
  2235. end
  2236. end
  2237.  
  2238. function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
  2239. local CHILDREN = workspace:GetDescendants()
  2240. for index, CHILD in pairs(CHILDREN) do
  2241. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  2242. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2243. if HUM then
  2244. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2245. if TORSO then
  2246. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2247. if INSTAKILL == false then
  2248. CHILD:BreakJoints()
  2249. else
  2250. local DMG = MRANDOM(MINDMG,MAXDMG)
  2251. ApplyDamage(HUM,DMG,TORSO)
  2252. end
  2253. if FLING > 0 then
  2254. for _, c in pairs(CHILD:GetChildren()) do
  2255. if c:IsA("BasePart") then
  2256. local bv = Instance.new("BodyVelocity")
  2257. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2258. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  2259. bv.Parent = c
  2260. Debris:AddItem(bv,0.05)
  2261. end
  2262. end
  2263. end
  2264. end
  2265. end
  2266. end
  2267. end
  2268. end
  2269. end
  2270.  
  2271. function KillChildren(v)
  2272. v:BreakJoints()
  2273. for _, c in pairs(v:GetChildren()) do
  2274. if c:IsA("BasePart") then
  2275. if c.Transparency < 1 then
  2276. if c:FindFirstChildOfClass("Decal") then
  2277. c:FindFirstChildOfClass("Decal"):remove()
  2278. end
  2279. particles(c)
  2280. c.PE.Enabled = true
  2281. c.Parent = Effects
  2282. c.CanCollide = false
  2283. c.Material = "Neon"
  2284. c.Color = C3(0,0,0)
  2285. c.Transparency = 1
  2286. local grav = Instance.new("BodyPosition",c)
  2287. grav.P = 20000
  2288. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  2289. grav.position = c.Position + VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5))
  2290. grav.Name = "GravityForce"
  2291. coroutine.resume(coroutine.create(function()
  2292. for i = 1, 20 do
  2293. Swait()
  2294. c.Transparency = c.Transparency + 1/20
  2295. end
  2296. c.PE.Enabled = false
  2297. Debris:AddItem(c,2)
  2298. end))
  2299. end
  2300. end
  2301. end
  2302. end
  2303.  
  2304. function ApplyAoE(POSITION,RANGE)
  2305. local CHILDREN = workspace:GetDescendants()
  2306. for index, CHILD in pairs(CHILDREN) do
  2307. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2308. local LISTED = false
  2309. for LIST = 1, #WHITELIST do
  2310. if WHITELIST[LIST] ~= nil then
  2311. if CHILD.Name == WHITELIST[LIST] then
  2312. LISTED = true
  2313. end
  2314. end
  2315. end
  2316. if LISTED == false then
  2317. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2318. if HUM then
  2319. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2320. if TORSO then
  2321. if (TORSO.Position - POSITION).Magnitude <= RANGE+TORSO.Size.Magnitude then
  2322. KillChildren(CHILD)
  2323. end
  2324. end
  2325. end
  2326. end
  2327. end
  2328. end
  2329. end
  2330.  
  2331. function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier)
  2332. local defence = Instance.new("BoolValue",Humanoid.Parent)
  2333. defence.Name = ("HitBy"..Player.Name)
  2334. game:GetService("Debris"):AddItem(defence, 0.001)
  2335. if Humanoid.Health ~= 0 then
  2336. local CritChance = MRANDOM(1,100)
  2337. if CritChance < CritRate + 1 then
  2338. Damage = Damage*CritMultiplier
  2339. end
  2340. if Damage > Humanoid.Health then
  2341. Damage = math.ceil(Humanoid.Health)
  2342. if Damage == 0 then
  2343. Damage = 0.1
  2344. end
  2345. end
  2346. Humanoid.Health = Humanoid.Health - Damage
  2347. if Humanoid.Parent:FindFirstChild("Head") then
  2348. CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1)
  2349. if CritChance < CritRate + 1 then
  2350. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
  2351. else
  2352. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, SKILLTEXTCOLOR)
  2353. end
  2354. end
  2355. end
  2356. end
  2357.  
  2358. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping)
  2359. local dmg = math.random(min,max)
  2360. for i,v in ipairs(workspace:GetChildren()) do
  2361. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  2362. local body = v:GetChildren()
  2363. for part = 1, #body do
  2364. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  2365. if(body[part].Position - position).Magnitude < radius then
  2366. if v.ClassName == "Model" then
  2367. if v:FindFirstChildOfClass("Humanoid") then
  2368. if CanBeDodgedByJumping == true then
  2369. if body[part].Position.Y < position.Y+5 then
  2370. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  2371. end
  2372. else
  2373. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  2374. end
  2375. local bv = Instance.new("BodyVelocity")
  2376. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2377. bv.velocity = RootPart.CFrame.lookVector*maxstrength
  2378. bv.Parent = body[part]
  2379. Debris:AddItem(bv,0.2)
  2380. end
  2381. end
  2382. end
  2383. end
  2384. end
  2385. end
  2386. if v:FindFirstChild("HitBy"..Player.Name) then
  2387. v:FindFirstChild("HitBy"..Player.Name):remove()
  2388. end
  2389. end
  2390. end
  2391.  
  2392. function Kill(Char)
  2393. local NewCharacter = IT("Model",Effects)
  2394. NewCharacter.Name = "Ow im ded ;-;"
  2395. for _, c in pairs(Char:GetDescendants()) do
  2396. if c:IsA("BasePart") and c.Transparency == 0 then
  2397. if c.Parent == Char then
  2398. getbloody(c,5)
  2399. end
  2400. c:BreakJoints()
  2401. c.Material = "Glass"
  2402. c.Color = C3(0.5,0,0)
  2403. c.CanCollide = true
  2404. c.Transparency = 0.3
  2405. if c:FindFirstChildOfClass("SpecialMesh") then
  2406. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2407. end
  2408. if c.Name == "Head" then
  2409. c:ClearAllChildren()
  2410. c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
  2411. end
  2412. if c.ClassName == "MeshPart" then
  2413. c.TextureID = ""
  2414. end
  2415. if c:FindFirstChildOfClass("BodyPosition") then
  2416. c:FindFirstChildOfClass("BodyPosition"):remove()
  2417. end
  2418. if c:FindFirstChildOfClass("ParticleEmitter") then
  2419. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  2420. end
  2421. c.Parent = NewCharacter
  2422. c.Name = "DeadPart"
  2423. c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
  2424. c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
  2425. end
  2426. end
  2427. Char:remove()
  2428. Debris:AddItem(NewCharacter,5)
  2429. end
  2430.  
  2431. function ApplyAoE(POSITION,RANGE,BRUTAL)
  2432. local CHILDREN = workspace:GetDescendants()
  2433. for index, CHILD in pairs(CHILDREN) do
  2434. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2435. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2436. if HUM then
  2437. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2438. if TORSO then
  2439. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2440. if BRUTAL == true then
  2441. Kill(CHILD)
  2442. else
  2443. CHILD:BreakJoints()
  2444. end
  2445. end
  2446. end
  2447. end
  2448. end
  2449. end
  2450. end
  2451.  
  2452. --//=================================\\
  2453. --|| ATTACK FUNCTIONS AND STUFF
  2454. --\\=================================//
  2455. function Click()
  2456. ATTACK = true
  2457. Rooted = false
  2458. local HIT = nil
  2459. OFFSET = -45
  2460. for i=0, 1, 0.1 / Animation_Speed do
  2461. Swait()
  2462. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  2463. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2464. end
  2465. OFFSET = 45
  2466. local PUNCH = CreatePart(3, Effects, "Granite", 0, 1, "Really black", "Hit", VT(0.7,0.7,0.7),false)
  2467. PUNCH.CanCollide = true
  2468. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, PUNCH, CF(0,-1,0), CF(0, 0, 0))
  2469. TAUNT = true
  2470. local TOUCH = PUNCH.Touched:Connect(function(hit)
  2471. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  2472. HIT = hit.Parent
  2473. end
  2474. end)
  2475. for i=0, 0.3, 0.1 / Animation_Speed do
  2476. Swait()
  2477. RootPart.CFrame = RootPart.CFrame*CF(0,0,-0.3)
  2478. if HIT ~= nil then
  2479. break
  2480. end
  2481. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  2482. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2483. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2484. end
  2485. PUNCH:remove()
  2486. TOUCH:disconnect()
  2487. if HIT ~= nil then
  2488. for _, c in pairs(HIT:GetChildren()) do
  2489. if c:IsA("BasePart") then
  2490. c.Anchored = true
  2491. end
  2492. end
  2493. Rooted = true
  2494. CreateSound(649634100, Torso, 10, 0.8)
  2495. CreateSound(1368573150, RightArm, 3, 1.5)
  2496. for i=0, 0.6, 0.1 / Animation_Speed do
  2497. Swait()
  2498. WACKYEFFECT({EffectType = "Block", Size = VT(3,3,3)/3, Size2 = VT(1,1,1)/3, Transparency = 0.5, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1.3,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2499. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(25), RAD(-45)), 0.05 / Animation_Speed)
  2500. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2501. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2502. end
  2503. for _, c in pairs(HIT:GetChildren()) do
  2504. if c:IsA("BasePart") then
  2505. c.Anchored = false
  2506. end
  2507. end
  2508. KillChildren(HIT)
  2509. end
  2510. OFFSET = 0
  2511. ATTACK = false
  2512. Rooted = false
  2513. TAUNT = false
  2514. end
  2515.  
  2516. function Teleport()
  2517. ATTACK = true
  2518. Rooted = false
  2519. for i=0, 0.5, 0.1 / Animation_Speed do
  2520. Swait()
  2521. 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)
  2522. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-25), RAD(12)) * ANGLES(RAD(125 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1.5 / Animation_Speed)
  2523. end
  2524. for e = 1, #BODY do
  2525. if BODY[e] ~= nil then
  2526. local STUFF = BODY[e]
  2527. local PART = STUFF[1]
  2528. if PART:IsA("BasePart") and PART ~= RootPart and PART.Name ~= "FaceGradient" and PART.Name ~= "Hair" and PART.Transparency ~= 1 then
  2529. local PRT = PART:Clone()
  2530. PRT.Anchored = true
  2531. PRT.CanCollide = false
  2532. PRT.Material = "Neon"
  2533. PRT.Color = C3(0,0,0)
  2534. PRT.Name = "WarpEffect"
  2535. PRT.Parent = Effects
  2536. PRT.CFrame = PART.CFrame
  2537. PRT:BreakJoints()
  2538. if PRT:FindFirstChildOfClass("Sound") then
  2539. PRT:FindFirstChildOfClass("Sound"):remove()
  2540. end
  2541. if PRT:FindFirstChildOfClass("Decal") then
  2542. PRT:FindFirstChildOfClass("Decal"):remove()
  2543. end
  2544. coroutine.resume(coroutine.create(function()
  2545. for i = 1, 100 do
  2546. Swait()
  2547. PRT.Transparency = PRT.Transparency + 1/100
  2548. end
  2549. PRT:remove()
  2550. end))
  2551. end
  2552. end
  2553. end
  2554. CreateSound(217767125, Torso, 10, 1)
  2555. local POS = RootPart.Orientation
  2556. RootPart.CFrame = CF(Mouse.Hit.p+VT(0,6,0))
  2557. RootPart.Orientation = POS
  2558. RootJoint.Parent = RootPart
  2559. for i=0, 0.5, 0.1 / Animation_Speed do
  2560. Swait()
  2561. 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)
  2562. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-15), RAD(12)) * ANGLES(RAD(175 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 2.5 / Animation_Speed)
  2563. end
  2564. for i=0, 0.1, 0.1 / Animation_Speed do
  2565. Swait()
  2566. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, 0.5) * ANGLES(RAD(0), RAD(-45), RAD(12)) * ANGLES(RAD(45 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  2567. end
  2568. ATTACK = false
  2569. Rooted = false
  2570. end
  2571.  
  2572. function SpawnSmite(POS)
  2573. local HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, Character)
  2574. local EMITPOS = HITPOS
  2575. if HITFLOOR ~= nil then
  2576. if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
  2577. HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent)
  2578. EMITPOS = HITPOS
  2579. elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  2580. HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent)
  2581. EMITPOS = HITPOS
  2582. end
  2583. end
  2584. if HITFLOOR ~= nil then
  2585. ApplyAoE(EMITPOS,10)
  2586. WACKYEFFECT({EffectType = "Sphere", Size = VT(0,100000,0), Size2 = VT(10,100000,10), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
  2587. WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*2, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2588. WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*1.5, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2589. for i = 1, 5 do
  2590. local TOPOS = CF(EMITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,12)
  2591. WACKYEFFECT({EffectType = "Slash", Size = VT(0,0,0), Size2 = VT(0.2,0,0.2), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS,TOPOS.p) * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = TOPOS.p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
  2592. end
  2593. end
  2594. end
  2595.  
  2596. function SpawnMeteor(POS,SIZE,ISDEBREE,ORIPOS)
  2597. coroutine.resume(coroutine.create(function()
  2598. local METEOR = IT("Model",Effects)
  2599. METEOR.Name = "Meteorite"
  2600. local CENTER = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE)
  2601. METEOR.PrimaryPart = CENTER
  2602. local PRT = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE)
  2603. PRT.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2604. for i = 1, 15 do
  2605. local FIRE = CreatePart(3, METEOR, "Neon", 0, 0, "Really black", "Fire", VT(5.1,1,5.1)*SIZE)
  2606. FIRE.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2607. end
  2608. if ISDEBREE ~= true then
  2609. METEOR:SetPrimaryPartCFrame(CF(POS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15)))*CF(0,500,0) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2610. else
  2611. METEOR:SetPrimaryPartCFrame(CF(ORIPOS,POS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2612. end
  2613. local IMPACT = false
  2614. CreateSound(463593339, CENTER, 10, 0.6)
  2615. if SIZE >= 3.5 then
  2616. for i = 1, MRANDOM(3,7) do
  2617. SpawnMeteor(CF(POS) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,0,SIZE*12).p,SIZE/MRANDOM(4,5),true,CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SIZE*15).p)
  2618. end
  2619. end
  2620. for i = 1, 200 do
  2621. Swait()
  2622. local HITFLOOR,HITPOS = Raycast(CENTER.Position, CF(CENTER.Position,POS).lookVector, 3, Character)
  2623. if HITFLOOR == nil then
  2624. local ORI = CENTER.Orientation
  2625. METEOR:SetPrimaryPartCFrame(CF(HITPOS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2626. else
  2627. if HITFLOOR.Anchored == true then
  2628. CreateDebreeRing(HITFLOOR,HITPOS,30*SIZE,VT(6,6,6)*SIZE,5)
  2629. CreateFlyingDebree(HITFLOOR,CF(HITPOS),8,VT(4,4,4)*SIZE,5,175)
  2630. end
  2631. IMPACT = true
  2632. break
  2633. end
  2634. end
  2635. if IMPACT == true then
  2636. WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*4*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
  2637. WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*3*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 201858144, SoundPitch = 1, SoundVolume = 5})
  2638. WACKYEFFECT({EffectType = "Sphere", Size = VT(SIZE*20,0,SIZE*20), Size2 = VT(0,SIZE*750,0), Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
  2639. ApplyAoE(CENTER.Position,30*SIZE)
  2640. end
  2641. METEOR:remove()
  2642. end))
  2643. end
  2644. function Equivalent_Pain()
  2645. local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  2646. if HITFLOOR then
  2647. ATTACK = true
  2648. Rooted = true
  2649. FULL = true
  2650. local GYRO = IT("BodyGyro",RootPart)
  2651. GYRO.D = 25
  2652. GYRO.P = 20000
  2653. GYRO.MaxTorque = VT(0,math.huge,0)
  2654. for i=0, 0.3, 0.1 / Animation_Speed do
  2655. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  2656. Swait()
  2657. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-25), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2658. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2659. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.3) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2660. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-25), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2661. 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(-35)), 1 / Animation_Speed)
  2662. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(5)), 1 / Animation_Speed)
  2663. end
  2664. GYRO:remove()
  2665. CreateSound(12222200, RightArm, 10, 1)
  2666. for i=0, 0.4, 0.1 / Animation_Speed do
  2667. Swait()
  2668. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed)
  2669. 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)
  2670. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2671. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2672. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed)
  2673. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2674. end
  2675. CreateSound(289842971, RightArm, 10, 1)
  2676. coroutine.resume(coroutine.create(function()
  2677. local HIT,POS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(Mouse.Hit.p+VT(0,1,0), Mouse.Hit.p-VT(0,1,0))).lookVector, 45, Character)
  2678. local ECHO = POS
  2679. if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
  2680. HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent)
  2681. ECHO = POS
  2682. elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  2683. HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent)
  2684. ECHO = POS
  2685. end
  2686. if ECHO.Y == HITPOS.Y then
  2687. local DISTANCE = (HITPOS - ECHO).Magnitude/3
  2688. local CFRAME = CF(HITPOS,ECHO)
  2689. local RANGE = math.ceil(DISTANCE)
  2690. for i = 1, RANGE-1 do
  2691. Swait(3)
  2692. local A = CFRAME*CF(0,0,-i*3)
  2693. ApplyAoE(A.p,4)
  2694. CreateFlyingDebree(HITFLOOR,A,2,VT(2,2,2),2,65)
  2695. end
  2696. local SIZE = 3
  2697. local POS = CFRAME*CF(0,0,-RANGE*3).p
  2698. WACKYEFFECT({Time = 75, EffectType = "Sphere", Size = VT(55,0,55)*SIZE, Size2 = VT(55,15,55)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 0.8, SoundVolume = 10})
  2699. WACKYEFFECT({EffectType = "Sphere", Size = VT(10,250,10)*SIZE, Size2 = VT(20,1000,20)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
  2700. WACKYEFFECT({EffectType = "Sphere", Size = VT(30,150,30)*SIZE, Size2 = VT(50,300,50)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
  2701. for i = 1, 9 do
  2702. WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
  2703. end
  2704. for i = 1, 9 do
  2705. WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
  2706. end
  2707. ApplyAoE(POS,30*SIZE)
  2708. CreateDebreeRing(HITFLOOR,POS,30*SIZE,VT(8,8,8)*SIZE,5)
  2709. CreateDebreeRing(HITFLOOR,POS,50*SIZE,VT(2,2,2)*SIZE,5)
  2710. end
  2711. end))
  2712. for i=0, 0.6, 0.1 / Animation_Speed do
  2713. Swait()
  2714. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed)
  2715. 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)
  2716. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2717. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2718. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed)
  2719. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2720. end
  2721. FULL = false
  2722. ATTACK = false
  2723. Rooted = false
  2724. end
  2725. end
  2726.  
  2727. function ReeeEEEEEE()
  2728. ATTACK = true
  2729. Rooted = false
  2730. Speed = 12
  2731. local FX = CreateSound(198165368, Head, 4, 0.5, false)
  2732. repeat
  2733. Swait()
  2734. FX.Parent = Head
  2735. local CHILDREN = workspace:GetDescendants()
  2736. for index, CHILD in pairs(CHILDREN) do
  2737. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2738. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2739. if HUM then
  2740. local TORSO = CHILD:FindFirstChild("Head")
  2741. if TORSO then
  2742. if (TORSO.Position - Head.Position).Magnitude <= 25 then
  2743. WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2744. TORSO:remove()
  2745. if CHILD:FindFirstChild("Torso") then
  2746. Ragdoll(CHILD,Torso,true)
  2747. elseif CHILD:FindFirstChild("UpperTorso") then
  2748. R15Ragdoll(CHILD,true)
  2749. end
  2750. end
  2751. end
  2752. end
  2753. end
  2754. end
  2755. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed)
  2756. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed)
  2757. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(15), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2758. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2759. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-45), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2760. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-45), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2761. until FX.Playing == false
  2762. Speed = 16
  2763. ATTACK = false
  2764. Rooted = false
  2765. end
  2766.  
  2767. function Charge(TIME,GYRO)
  2768. local SND = CreateSound(ENERGYSOUND,Torso,6,TIME,false)
  2769. local G = nil
  2770. if GYRO == true then
  2771. G = IT("BodyGyro",RootPart)
  2772. G.D = 250
  2773. G.P = 200000
  2774. G.MaxTorque = VT(math.huge,math.huge,math.huge)
  2775. end
  2776. for i=0, TIME, 0.1 / Animation_Speed do
  2777. Swait()
  2778. if G then
  2779. G.cframe = CF(RootPart.Position,Mouse.Hit.p)
  2780. end
  2781. 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})
  2782. 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)
  2783. 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)
  2784. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2785. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2786. 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)
  2787. 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)
  2788. end
  2789. SND:remove()
  2790. if G then
  2791. return G
  2792. end
  2793. end
  2794.  
  2795. function Corrupted_Beam()
  2796. ATTACK = true
  2797. Rooted = false
  2798. local GRAV = IT("BodyPosition",RootPart)
  2799. GRAV.D = 75
  2800. GRAV.P = 20000
  2801. GRAV.MaxForce = VT(math.huge,math.huge,math.huge)
  2802. GRAV.Position = RootPart.Position
  2803. local GYRO = Charge(2,true)
  2804. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(15,15,0))
  2805. MakeForm(BEAM,"Ball")
  2806. CreateSound(BEAMSOUND,BEAM,10,1,false)
  2807. CreateSound(BEAMSOUND,BEAM,10,0.9,false)
  2808. CreateSound(BEAMSOUND,BEAM,10,0.8,false)
  2809. for i = 1, 150 do
  2810. Swait()
  2811. BEAM.Size = BEAM.Size + VT(-0.1,-0.1,2)
  2812. ApplyAoE(BEAM.CFrame*CF(0,0,-BEAM.Size.Z/2).p,BEAM.Size.Y/2,50,200,0,false)
  2813. WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(3,3,3), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2), MoveToPos = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2)*ANGLES(RAD(90),RAD(MRANDOM(0,360)),RAD(0))*CF(0,0.3,-25).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2814. BEAM.CFrame = CF(Torso.Position,Torso.CFrame*CF(0,0,-1).p)*CF(0,0,-2-(BEAM.Size.Z/2))
  2815. 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)
  2816. 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)
  2817. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2818. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2819. 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)
  2820. 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)
  2821. end
  2822. GRAV:remove()
  2823. BEAM:remove()
  2824. GYRO:remove()
  2825. ATTACK = false
  2826. Rooted = false
  2827. end
  2828.  
  2829. function Corrupted_Explosion()
  2830. ATTACK = true
  2831. Rooted = true
  2832. for i=0, 1, 0.1 / Animation_Speed do
  2833. Swait()
  2834. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, 0) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.6 / Animation_Speed)
  2835. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.6 / Animation_Speed)
  2836. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
  2837. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.1 / Animation_Speed)
  2838. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2839. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2840. end
  2841. for i=0, 0.4, 0.1 / Animation_Speed do
  2842. Swait()
  2843. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed)
  2844. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed)
  2845. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2846. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2847. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  2848. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  2849. end
  2850. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0))
  2851. local BEAM2 = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0))
  2852. MakeForm(BEAM,"Ball")
  2853. MakeForm(BEAM2,"Ball")
  2854. BEAM.CFrame = CF(RootPart.Position)
  2855. BEAM2.CFrame = CF(RootPart.Position)
  2856. CreateSound(EXPLOSIONSOUND,RootPart,10,1,false)
  2857. for i=1, 100 do
  2858. Swait()
  2859. BEAM.Size = BEAM.Size + VT(0.7,8,0.7)
  2860. BEAM2.Size = BEAM2.Size + VT(2,2,2)
  2861. ApplyAoE(BEAM2.Position,BEAM2.Size.Z/2,5,5,15,true)
  2862. BEAM.CFrame = CF(RootPart.Position)
  2863. BEAM2.CFrame = CF(RootPart.Position)
  2864. WACKYEFFECT({TIME = 5+i, EffectType = "Swirl", Size = BEAM2.Size*1.15, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0.8, Transparency2 = 1, CFrame = BEAM.CFrame * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2865. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed)
  2866. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed)
  2867. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2868. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2869. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  2870. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  2871. end
  2872. WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM.Size, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0, Transparency2 = 0, CFrame = BEAM.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2873. WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM2.Size, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 0.6, CFrame = BEAM2.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2874. BEAM2:remove()
  2875. BEAM:remove()
  2876. ATTACK = false
  2877. Rooted = false
  2878. end
  2879.  
  2880. function Corrupted_Immobilization()
  2881. ATTACK = true
  2882. Rooted = true
  2883. Charge(2,false)
  2884. local SND = CreateSound(EXPLOSIONSOUND,RootPart,10,1,false)
  2885. local SND2 = CreateSound(ENERGYSOUND,RootPart,10,1,false)
  2886. for i = 1, 60 do
  2887. Swait()
  2888. ApplyAoE(RootPart.Position,i*1.3,10,20,-200,true)
  2889. SND.Pitch = SND.Pitch - 1/60
  2890. SND2.Pitch = SND.Pitch
  2891. WACKYEFFECT({TIME = 4, EffectType = "Wave", Size = VT(i*2,10,i*2), Size2 = VT(i*2,10,i*2), Transparency = 0.9, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2892. WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,10,0), Size2 = VT(i*2,6,i*2), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2893. WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,6,0), Size2 = VT(i*1.6,10,i*1.6), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(MRANDOM(-5,5)), RAD(i*5), RAD(MRANDOM(-5,5))), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2894. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2895. 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)
  2896. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(-45), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2897. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(45), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2898. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  2899. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  2900. end
  2901. SND:remove()
  2902. SND2:remove()
  2903. ATTACK = false
  2904. Rooted = false
  2905. end
  2906.  
  2907. --//=================================\\
  2908. --|| ASSIGN THINGS TO KEYS
  2909. --\\=================================//
  2910.  
  2911. function MouseDown(Mouse)
  2912. if ATTACK == false then
  2913. Click()
  2914. end
  2915. end
  2916.  
  2917. function MouseUp(Mouse)
  2918. HOLD = false
  2919. end
  2920.  
  2921. function KeyDown(Key)
  2922. KEYHOLD = true
  2923. if Key == "z" and ATTACK == false then
  2924. Corrupted_Beam()
  2925. end
  2926.  
  2927. if Key == "e" and ATTACK == false then
  2928. ReeeEEEEEE()
  2929. end
  2930.  
  2931. if Key == "r" and ATTACK == false then
  2932. Teleport()
  2933. end
  2934.  
  2935. if Key == "q" and ATTACK == false then
  2936. Equivalent_Pain()
  2937. end
  2938.  
  2939. if Key == "x" and ATTACK == false then
  2940. Corrupted_Explosion()
  2941. end
  2942.  
  2943. if Key == "c" and ATTACK == false then
  2944. Corrupted_Immobilization()
  2945. elseif Key == "1" and ATTACK == false then
  2946. if CHOICE ~= 1 then
  2947. CHOICE = 1
  2948. sick:Play()
  2949. end
  2950. elseif Key == "2" and ATTACK == false then
  2951. if CHOICE ~= 2 then
  2952. CHOICE = 2
  2953. sick:Play()
  2954. end
  2955. elseif Key == "3" and ATTACK == false then
  2956. if CHOICE ~= 3 then
  2957. CHOICE = 3
  2958. sick:Play()
  2959. end
  2960. elseif Key == "4" and ATTACK == false then
  2961. if CHOICE ~= 4 then
  2962. CHOICE = 4
  2963. sick:Play()
  2964. end
  2965.  
  2966. end
  2967. end
  2968.  
  2969.  
  2970.  
  2971. function KeyUp(Key)
  2972. KEYHOLD = false
  2973. end
  2974.  
  2975. Mouse.Button1Down:connect(function(NEWKEY)
  2976. MouseDown(NEWKEY)
  2977. end)
  2978. Mouse.Button1Up:connect(function(NEWKEY)
  2979. MouseUp(NEWKEY)
  2980. end)
  2981. Mouse.KeyDown:connect(function(NEWKEY)
  2982. KeyDown(NEWKEY)
  2983. end)
  2984. Mouse.KeyUp:connect(function(NEWKEY)
  2985. KeyUp(NEWKEY)
  2986. end)
  2987.  
  2988. --//=================================\\
  2989. --\\=================================//
  2990.  
  2991. function unanchor()
  2992. if UNANCHOR == true then
  2993. g = Character:GetChildren()
  2994. for i = 1, #g do
  2995. if g[i].ClassName == "Part" then
  2996. g[i].Anchored = false
  2997. end
  2998. end
  2999. end
  3000. end
  3001.  
  3002. --//=================================\\
  3003. --|| WRAP THE WHOLE SCRIPT UP
  3004. --\\=================================//
  3005.  
  3006. Humanoid.Changed:connect(function(Jump)
  3007. if Jump == "Jump" and (Disable_Jump == true) then
  3008. Humanoid.Jump = false
  3009. end
  3010. end)
  3011.  
  3012. while true do
  3013. Swait()
  3014. script.Parent = WEAPONGUI
  3015. ANIMATE.Parent = nil
  3016. if Humanoid then
  3017. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  3018. IDLEANIMATION:Play()
  3019. end
  3020. SINE = SINE + CHANGE
  3021. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  3022. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  3023. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  3024. local WALKSPEEDVALUE = 5 / (Humanoid.WalkSpeed / 16)
  3025. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  3026. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3027. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  3028. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
  3029. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
  3030. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  3031. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3032. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3033. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3034. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3035. end
  3036. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  3037. ANIM = "Jump"
  3038. if ATTACK == false then
  3039. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3040. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3041. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  3042. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  3043. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  3044. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  3045. end
  3046. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  3047. ANIM = "Fall"
  3048. if ATTACK == false then
  3049. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3050. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3051. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  3052. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  3053. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  3054. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  3055. end
  3056. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  3057. ANIM = "Idle"
  3058. if ATTACK == false then
  3059. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0 - 0.05 * COS(SINE / 12), 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3060. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3061. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-15), RAD(5 + 1 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3062. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-5 - 1 * COS(SINE / 12))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  3063. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3064. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(-74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3065. if VALUE1 == false and MRANDOM(1,200) == 1 then
  3066. coroutine.resume(coroutine.create(function()
  3067. VALUE1 = true
  3068. for i = 1, 25 do
  3069. Swait()
  3070. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD((15+MRANDOM(-15,15)/15)), RAD(0)), 3 / Animation_Speed)
  3071.  
  3072. end
  3073. VALUE1 = false
  3074. end))
  3075. end
  3076. end
  3077.  
  3078. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  3079. ANIM = "Walk"
  3080. if ATTACK == false then
  3081. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3082. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3083. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3084. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3085. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  3086. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  3087. end
  3088. end
  3089.  
  3090.  
  3091. sick.Parent = Torso
  3092. sick.Playing = true
  3093.  
  3094.  
  3095. unanchor()
  3096. Humanoid.MaxHealth = "inf"
  3097. Humanoid.Health = "inf"
  3098. if Rooted == false then
  3099. Disable_Jump = false
  3100. Humanoid.WalkSpeed = Speed
  3101. elseif Rooted == true then
  3102. Disable_Jump = true
  3103. Humanoid.WalkSpeed = 0
  3104. end
  3105. end
  3106. --//=================================\\
  3107. --\\=================================//
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113. --//====================================================\\--
  3114. --|| END OF SCRIPT
  3115. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement