Advertisement
Christoffer07700Extr

aa

Aug 13th, 2019
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 93.96 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6.  
  7.  
  8. wait(0.2)
  9.  
  10.  
  11.  
  12. Player = game:GetService("Players").LocalPlayer
  13. PlayerGui = Player.PlayerGui
  14. Cam = workspace.CurrentCamera
  15. Backpack = Player.Backpack
  16. Character = Player.Character
  17. Humanoid = Character.Humanoid
  18. Mouse = Player:GetMouse()
  19. RootPart = Character["HumanoidRootPart"]
  20. Torso = Character["Torso"]
  21. Head = Character["Head"]
  22. RightArm = Character["Right Arm"]
  23. LeftArm = Character["Left Arm"]
  24. RightLeg = Character["Right Leg"]
  25. LeftLeg = Character["Left Leg"]
  26. RootJoint = RootPart["RootJoint"]
  27. Neck = Torso["Neck"]
  28. RightShoulder = Torso["Right Shoulder"]
  29. LeftShoulder = Torso["Left Shoulder"]
  30. RightHip = Torso["Right Hip"]
  31. LeftHip = Torso["Left Hip"]
  32. local sick = Instance.new("Sound",Character)
  33. sick.SoundId = "rbxassetid://1771675015"
  34. sick.Looped = true
  35. sick.Pitch = 1
  36. sick.Volume = 3
  37. sick:Play()
  38. local target = nil
  39. local p = game:GetService("Players").LocalPlayer
  40. local plr = game:GetService("Players").LocalPlayer
  41. local player = game:GetService("Players").LocalPlayer
  42. local char = p.Character
  43. local larm = char:WaitForChild("Left Arm")
  44. local rarm = char:WaitForChild("Right Arm")
  45. local lleg = char:WaitForChild("Left Leg")
  46. local rleg = char:WaitForChild("Right Leg")
  47. local hed = char:WaitForChild("Head")
  48. local torso = char:WaitForChild("Torso")
  49. local root = char:WaitForChild("HumanoidRootPart")
  50. local hum = char:FindFirstChildOfClass("Humanoid")
  51. local debris = game:GetService("Debris")
  52. local run = game:GetService("RunService")
  53. local rs = run.RenderStepped
  54. local cam = workspace.CurrentCamera
  55.  
  56. local SIZE = 1.4
  57. IT = Instance.new
  58. CF = CFrame.new
  59. VT = Vector3.new
  60. RAD = math.rad
  61. C3 = Color3.new
  62. UD2 = UDim2.new
  63. BRICKC = BrickColor.new
  64. ANGLES = CFrame.Angles
  65. EULER = CFrame.fromEulerAnglesXYZ
  66. COS = math.cos
  67. ACOS = math.acos
  68. SIN = math.sin
  69. ASIN = math.asin
  70. ABS = math.abs
  71. MRANDOM = math.random
  72. FLOOR = math.floor
  73. Player_Size = 1
  74. local TT = Instance.new("Part")
  75. TT.Parent = Weapon
  76. TT.Transparency = 1
  77. TT.Size = Vector3.new(1, 1, 1)
  78. TT.CFrame = char.Torso.CFrame
  79. TT.CanCollide = false
  80. TT.Color = Color3.new(150,0,150)
  81. TT.TopSurface = "Smooth"
  82. TT.BottomSurface = "Smooth"
  83.  
  84. --><2nd Values
  85.  
  86. Enable_Stats = false --Enables or disables stats.
  87. Put_Stats_In_Character = false --Places stats in Character.
  88.  
  89. if Character:FindFirstChild("Stats") ~= nil then
  90. Character:FindFirstChild("Stats").Parent = nil
  91. end
  92.  
  93. local Stats = IT("Folder", nil)
  94. Stats.Name = "Stats"
  95. local ChangeStat = IT("Folder", Stats)
  96. ChangeStat.Name = "ChangeStat"
  97. local Defense = IT("NumberValue", Stats)
  98. Defense.Name = "Defense"
  99. Defense.Value = 1
  100. local Movement = IT("NumberValue", Stats)
  101. Movement.Name = "Movement"
  102. Movement.Value = 1
  103. local Damage = IT("NumberValue", Stats)
  104. Damage.Name = "Damage"
  105. Damage.Value = 1
  106. local Mana = IT("NumberValue", Stats)
  107. Mana.Name = "Mana"
  108. Mana.Value = 0
  109. local SecondaryMana = IT("NumberValue", Stats)
  110. SecondaryMana.Name = "SecondaryMana"
  111. SecondaryMana.Value = 0
  112. local CanCrit = IT("BoolValue", Stats)
  113. CanCrit.Name = "CanCrit"
  114. CanCrit.Value = false
  115. local CritChance = IT("NumberValue", Stats)
  116. CritChance.Name = "CritChance"
  117. CritChance.Value = 20
  118. local CanPenetrateArmor = IT("BoolValue", Stats)
  119. CanPenetrateArmor.Name = "CanPenetrateArmor"
  120. CanPenetrateArmor.Value = false
  121. local AntiTeamKill = IT("BoolValue", Stats)
  122. AntiTeamKill.Name = "AntiTeamKill"
  123. AntiTeamKill.Value = false
  124. local Rooted = IT("BoolValue", Stats)
  125. Rooted.Name = "Rooted"
  126. Rooted.Value = false
  127. local Block = IT("BoolValue", Stats)
  128. Block.Name = "Block"
  129. Block.Value = false
  130. local RecentEnemy = IT("ObjectValue", Stats)
  131. RecentEnemy.Name = "RecentEnemy"
  132. RecentEnemy.Value = nil
  133. local StaggerHit = IT("BoolValue", Stats)
  134. StaggerHit.Name = "StaggerHit"
  135. StaggerHit.Value = false
  136. local Stagger = IT("BoolValue", Stats)
  137. Stagger.Name = "Stagger"
  138. Stagger.Value = false
  139. local Stun = IT("BoolValue", Stats)
  140. Stun.Name = "Stun"
  141. Stun.Value = false
  142. local StunValue = IT("NumberValue", Stats)
  143. StunValue.Name = "StunValue"
  144. StunValue.Value = 0
  145.  
  146. if Enable_Stats == true and Put_Stats_In_Character == true then
  147. Stats.Parent = Character
  148. end
  149.  
  150. Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort.
  151. Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort.
  152. Enable_Stagger = false --Enables or disables staggering.
  153.  
  154.  
  155.  
  156. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  157. local NEWMESH = IT(MESH)
  158. if MESH == "SpecialMesh" then
  159. NEWMESH.MeshType = MESHTYPE
  160. if MESHID ~= "nil" and MESHID ~= "" then
  161. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  162. end
  163. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  164. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  165. end
  166. end
  167. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  168. NEWMESH.Scale = SCALE
  169. NEWMESH.Parent = PARENT
  170. return NEWMESH
  171. end
  172.  
  173. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  174. local NEWPART = IT("Part")
  175. NEWPART.formFactor = FORMFACTOR
  176. NEWPART.Reflectance = REFLECTANCE
  177. NEWPART.Transparency = TRANSPARENCY
  178. NEWPART.CanCollide = false
  179. NEWPART.Locked = true
  180. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  181. NEWPART.Name = NAME
  182. NEWPART.Size = SIZE
  183. NEWPART.Position = Torso.Position
  184. NEWPART.Material = MATERIAL
  185. NEWPART:BreakJoints()
  186. NEWPART.Parent = PARENT
  187. return NEWPART
  188. end
  189.  
  190.  
  191. --//=================================\\
  192. --|| CUSTOMIZATION
  193. --\\=================================//
  194.  
  195. Class_Name = "Template"
  196. Weapon_Name = "Add-ons"
  197.  
  198. Custom_Colors = {
  199. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  200. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  201.  
  202. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  203. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  204. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  205. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  206. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  207.  
  208. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  209. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  210. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  211. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  212. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  213. }
  214.  
  215.  
  216. Player_Size = 1 --Size of the player.
  217. Animation_Speed = 1
  218. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  219.  
  220. local Speed = 75
  221. local Effects2 = {}
  222.  
  223. --//=================================\\
  224. --|| END OF CUSTOMIZATION
  225. --\\=================================//
  226.  
  227. local function weldBetween(a, b)
  228. local weldd = Instance.new("ManualWeld")
  229. weldd.Part0 = a
  230. weldd.Part1 = b
  231. weldd.C0 = CFrame.new()
  232. weldd.C1 = b.CFrame:inverse() * a.CFrame
  233. weldd.Parent = a
  234. return weldd
  235. end
  236.  
  237. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  238. local acs = Instance.new("Part")
  239. acs.CanCollide = false
  240. acs.Anchored = false
  241. acs.Size = Vector3.new(0,0,0)
  242. acs.CFrame = attachmentpart.CFrame
  243. acs.Parent = Character
  244. acs.BrickColor = color
  245. local meshs = Instance.new("SpecialMesh")
  246. meshs.MeshId = mesh
  247. meshs.TextureId = texture
  248. meshs.Parent = acs
  249. meshs.Scale = scale
  250. meshs.Offset = offset
  251. weldBetween(attachmentpart,acs)
  252. end
  253.  
  254. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  255. if TYPE == "Gem" then
  256. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  257. acs.Anchored = false
  258. acs.CanCollide = false
  259. acs.CFrame = PART.CFrame
  260. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  261. weldBetween(PART,acs)
  262. elseif TYPE == "Skull" then
  263. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  264. acs.Anchored = false
  265. acs.CanCollide = false
  266. acs.CFrame = PART.CFrame
  267. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  268. weldBetween(PART,acs)
  269. elseif TYPE == "Eye" then
  270. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  271. acs.Anchored = false
  272. acs.CanCollide = false
  273. acs.CFrame = PART.CFrame
  274. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  275. weldBetween(PART,acs)
  276. end
  277. end
  278.  
  279. --//=================================\\
  280. --|| USEFUL VALUES
  281. --\\=================================//
  282.  
  283. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  284. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  285. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  286. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  287. local CO1 = 0
  288. local CO2 = 0
  289. local CO3 = 0
  290. local CO4 = 0
  291. local CHANGEDEFENSE = 0
  292. local CHANGEDAMAGE = 0
  293. local CHANGEMOVEMENT = 0
  294. local ANIM = "Idle"
  295. local ATTACK = false
  296. local EQUIPPED = false
  297. local HOLD = false
  298. local COMBO = 1
  299. local LASTPOINT = nil
  300. local BLCF = nil
  301. local SCFR = nil
  302. local STAGGERHITANIM = false
  303. local STAGGERANIM = false
  304. local STUNANIM = false
  305. local CRITCHANCENUMBER = 0
  306. local IDLENUMBER = 0
  307. local DONUMBER = 0
  308. local HANDIDLE = false
  309. local SINE = 0
  310. local CHANGE = 2 / Animation_Speed
  311. local WALKINGANIM = false
  312. local WALK = 0
  313. local DISABLEJUMPING = false
  314. local HASBEENBLOCKED = false
  315. local STUNDELAYNUMBER = 0
  316. local MANADELAYNUMBER = 0
  317. local SECONDARYMANADELAYNUMBER = 0
  318. local ROBLOXIDLEANIMATION = IT("Animation")
  319. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  320. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  321. --ROBLOXIDLEANIMATION.Parent = Humanoid
  322. local WEAPONGUI = IT("ScreenGui", nil)
  323. WEAPONGUI.Name = "Weapon GUI"
  324. local WEAPONTOOL = IT("HopperBin", nil)
  325. WEAPONTOOL.Name = Weapon_Name
  326. local Weapon = IT("Model")
  327. Weapon.Name = Weapon_Name
  328. local Effects = IT("Folder", Weapon)
  329. Effects.Name = "Effects"
  330. local ANIMATOR = Humanoid.Animator
  331. local ANIMATE = Character.Animate
  332. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  333. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  334. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  335. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  336. local UNANCHOR = true
  337.  
  338. --//=================================\\
  339. --\\=================================//
  340.  
  341. --//=================================\\
  342. --|| STATS
  343. --\\=================================//
  344.  
  345. if Character:FindFirstChild("Stats") ~= nil then
  346. Character:FindFirstChild("Stats").Parent = nil
  347. end
  348.  
  349. local Stats = IT("Folder", nil)
  350. Stats.Name = "Stats"
  351. local ChangeStat = IT("Folder", Stats)
  352. ChangeStat.Name = "ChangeStat"
  353. local Defense = IT("NumberValue", Stats)
  354. Defense.Name = "Defense"
  355. Defense.Value = 1
  356. local Movement = IT("NumberValue", Stats)
  357. Movement.Name = "Movement"
  358. Movement.Value = 1
  359. local Damage = IT("NumberValue", Stats)
  360. Damage.Name = "Damage"
  361. Damage.Value = 1
  362. local Mana = IT("NumberValue", Stats)
  363. Mana.Name = "Mana"
  364. Mana.Value = 0
  365. local SecondaryMana = IT("NumberValue", Stats)
  366. SecondaryMana.Name = "SecondaryMana"
  367. SecondaryMana.Value = 0
  368. local CanCrit = IT("BoolValue", Stats)
  369. CanCrit.Name = "CanCrit"
  370. CanCrit.Value = false
  371. local CritChance = IT("NumberValue", Stats)
  372. CritChance.Name = "CritChance"
  373. CritChance.Value = 20
  374. local CanPenetrateArmor = IT("BoolValue", Stats)
  375. CanPenetrateArmor.Name = "CanPenetrateArmor"
  376. CanPenetrateArmor.Value = false
  377. local AntiTeamKill = IT("BoolValue", Stats)
  378. AntiTeamKill.Name = "AntiTeamKill"
  379. AntiTeamKill.Value = false
  380. local Rooted = IT("BoolValue", Stats)
  381. Rooted.Name = "Rooted"
  382. Rooted.Value = false
  383. local Block = IT("BoolValue", Stats)
  384. Block.Name = "Block"
  385. Block.Value = false
  386. local RecentEnemy = IT("ObjectValue", Stats)
  387. RecentEnemy.Name = "RecentEnemy"
  388. RecentEnemy.Value = nil
  389. local StaggerHit = IT("BoolValue", Stats)
  390. StaggerHit.Name = "StaggerHit"
  391. StaggerHit.Value = false
  392. local Stagger = IT("BoolValue", Stats)
  393. Stagger.Name = "Stagger"
  394. Stagger.Value = false
  395. local Stun = IT("BoolValue", Stats)
  396. Stun.Name = "Stun"
  397. Stun.Value = false
  398. local StunValue = IT("NumberValue", Stats)
  399. StunValue.Name = "StunValue"
  400. StunValue.Value = 0
  401.  
  402.  
  403. --//=================================\\
  404. --\\=================================//
  405.  
  406.  
  407. abss = Instance.new("BillboardGui")
  408. abss.Size = UDim2.new(10,0,10,0)
  409. abss.Enabled = false
  410. abss.AlwaysOnTop = true
  411. img2 = Instance.new("ImageLabel",abss)
  412. img2.Position = UDim2.new(0.35,0,0.35,0)
  413. img2.Size = UDim2.new(0.3,0,0.3,0)
  414. img2.Image = "rbxassetid://108413215"
  415. img2.BackgroundTransparency = 1
  416. img2.ImageColor3 = Color3.new(1,1,1)
  417.  
  418. local boop = nil
  419.  
  420.  
  421. --//=================================\\
  422. --|| DEBUFFS / BUFFS
  423. --\\=================================//
  424.  
  425. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  426. DEFENSECHANGE1.Name = "ChangeDefense"
  427. DEFENSECHANGE1.Value = 0
  428.  
  429. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  430. MOVEMENTCHANGE1.Name = "ChangeMovement"
  431. MOVEMENTCHANGE1.Value = 0
  432.  
  433. --//=================================\\
  434. --\\=================================//
  435.  
  436.  
  437.  
  438.  
  439.  
  440. --//=================================\\
  441. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  442. --\\=================================//
  443.  
  444. ArtificialHB = Instance.new("BindableEvent", script)
  445. ArtificialHB.Name = "ArtificialHB"
  446.  
  447. script:WaitForChild("ArtificialHB")
  448.  
  449. frame = Frame_Speed
  450. tf = 0
  451. allowframeloss = false
  452. tossremainder = false
  453. lastframe = tick()
  454. script.ArtificialHB:Fire()
  455.  
  456. game:GetService("RunService").Heartbeat:connect(function(s, p)
  457. tf = tf + s
  458. if tf >= frame then
  459. if allowframeloss then
  460. script.ArtificialHB:Fire()
  461. lastframe = tick()
  462. else
  463. for i = 1, math.floor(tf / frame) do
  464. script.ArtificialHB:Fire()
  465. end
  466. lastframe = tick()
  467. end
  468. if tossremainder then
  469. tf = 0
  470. else
  471. tf = tf - frame * math.floor(tf / frame)
  472. end
  473. end
  474. end)
  475.  
  476. --//=================================\\
  477. --\\=================================//
  478.  
  479.  
  480.  
  481.  
  482.  
  483. --//=================================\\
  484. --|| SOME FUNCTIONS
  485. --\\=================================//
  486.  
  487. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  488. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  489. end
  490.  
  491. function MagicSphere1(SIZE,WAIT,CFRAME,COLOR,GROW)
  492. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Eye", VT(1,1,1), true)
  493. wave.Color = COLOR
  494. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  495. wave.CFrame = CFRAME
  496. coroutine.resume(coroutine.create(function(PART)
  497. for i = 1, WAIT do
  498. Swait()
  499. mesh.Scale = mesh.Scale + GROW
  500. wave.Transparency = wave.Transparency + (1/WAIT)
  501. if wave.Transparency > 0.99 then
  502. wave:remove()
  503. end
  504. end
  505. end))
  506. end
  507.  
  508. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  509. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  510. local mesh = nil
  511. if KIND == "Base" then
  512. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  513. elseif KIND == "Thin" then
  514. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  515. elseif KIND == "Round" then
  516. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  517. end
  518. wave.CFrame = CFRAME
  519. coroutine.resume(coroutine.create(function(PART)
  520. for i = 1, WAIT do
  521. Swait()
  522. mesh.Scale = mesh.Scale + GROW/10
  523. wave.Transparency = wave.Transparency + (0.5/WAIT)
  524. if wave.Transparency > 0.99 then
  525. wave:remove()
  526. end
  527. end
  528. end))
  529. end
  530.  
  531. function chatfunc(text)
  532. local chat = coroutine.wrap(function()
  533. if Character:FindFirstChild("TalkingBillBoard")~= nil then
  534. Character:FindFirstChild("TalkingBillBoard"):destroy()
  535. end
  536. local Bill = Instance.new("BillboardGui",Character)
  537. Bill.Size = UDim2.new(0,100,0,40)
  538. Bill.StudsOffset = Vector3.new(0,2,0)
  539. Bill.Adornee = Character.Head
  540. Bill.Name = "TalkingBillBoard"
  541. local Hehe = Instance.new("TextLabel",Bill)
  542. Hehe.BackgroundTransparency = 1
  543. Hehe.BorderSizePixel = 0
  544. Hehe.Text = ""
  545. Hehe.Font = "SciFi"
  546. Hehe.TextSize = 40
  547. Hehe.TextStrokeTransparency = 0
  548. Hehe.Size = UDim2.new(1,0,0.5,0)
  549. coroutine.resume(coroutine.create(function()
  550. while Hehe ~= nil do
  551. Swait()
  552. Hehe.Position = UDim2.new(math.random(-.2,.2),math.random(-1,1),.05,math.random(-1,1))
  553. Hehe.Rotation = math.random(-5,5)
  554. Hehe.TextColor3 = Color3.new(.7,0,.7)
  555. Hehe.TextStrokeColor3 = Color3.new(.7,0,.7)
  556. end
  557. end))
  558. for i = 1,string.len(text),1 do
  559. Swait()
  560. Hehe.Text = string.sub(text,1,i)
  561. end
  562. Swait(90)--Re[math.random(1, 93)]
  563. for i = 0, 1, .025 do
  564. Swait()
  565. Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i))
  566. Hehe.TextStrokeTransparency = i
  567. Hehe.TextTransparency = i
  568. end
  569. Bill:Destroy()
  570. end)
  571. chat()
  572. end
  573.  
  574. function onChatted(msg)
  575. chatfunc(msg)
  576. end
  577.  
  578. Player.Chatted:connect(onChatted)
  579.  
  580. function PositiveAngle(NUMBER)
  581. if NUMBER >= 0 then
  582. NUMBER = 0
  583. end
  584. return NUMBER
  585. end
  586.  
  587. function NegativeAngle(NUMBER)
  588. if NUMBER <= 0 then
  589. NUMBER = 0
  590. end
  591. return NUMBER
  592. end
  593.  
  594. function Swait(NUMBER)
  595. if NUMBER == 0 or NUMBER == nil then
  596. ArtificialHB.Event:wait()
  597. else
  598. for i = 1, NUMBER do
  599. ArtificialHB.Event:wait()
  600. end
  601. end
  602. end
  603.  
  604. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  605. local NEWMESH = IT(MESH)
  606. if MESH == "SpecialMesh" then
  607. NEWMESH.MeshType = MESHTYPE
  608. if MESHID ~= "nil" and MESHID ~= "" then
  609. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  610. end
  611. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  612. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  613. end
  614. end
  615. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  616. NEWMESH.Scale = SCALE
  617. NEWMESH.Parent = PARENT
  618. return NEWMESH
  619. end
  620.  
  621. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  622. local NEWPART = IT("Part")
  623. NEWPART.formFactor = FORMFACTOR
  624. NEWPART.Reflectance = REFLECTANCE
  625. NEWPART.Transparency = TRANSPARENCY
  626. NEWPART.CanCollide = false
  627. NEWPART.Locked = true
  628. NEWPART.Anchored = true
  629. if ANCHOR == false then
  630. NEWPART.Anchored = false
  631. end
  632. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  633. NEWPART.Name = NAME
  634. NEWPART.Size = SIZE
  635. NEWPART.Position = Torso.Position
  636. NEWPART.Material = MATERIAL
  637. NEWPART:BreakJoints()
  638. NEWPART.Parent = PARENT
  639. return NEWPART
  640. end
  641.  
  642. local function weldBetween(a, b)
  643. local weldd = IT("Weld")
  644. weldd.Part0 = a
  645. weldd.Part1 = b
  646. weldd.C0 = CF()
  647. weldd.C1 = b.CFrame:inverse() * a.CFrame
  648. weldd.Parent = a
  649. return weldd
  650. end
  651.  
  652.  
  653. function QuaternionFromCFrame(cf)
  654. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  655. local trace = m00 + m11 + m22
  656. if trace > 0 then
  657. local s = math.sqrt(1 + trace)
  658. local recip = 0.5 / s
  659. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  660. else
  661. local i = 0
  662. if m11 > m00 then
  663. i = 1
  664. end
  665. if m22 > (i == 0 and m00 or m11) then
  666. i = 2
  667. end
  668. if i == 0 then
  669. local s = math.sqrt(m00 - m11 - m22 + 1)
  670. local recip = 0.5 / s
  671. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  672. elseif i == 1 then
  673. local s = math.sqrt(m11 - m22 - m00 + 1)
  674. local recip = 0.5 / s
  675. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  676. elseif i == 2 then
  677. local s = math.sqrt(m22 - m00 - m11 + 1)
  678. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  679. end
  680. end
  681. end
  682.  
  683. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  684. local xs, ys, zs = x + x, y + y, z + z
  685. local wx, wy, wz = w * xs, w * ys, w * zs
  686. local xx = x * xs
  687. local xy = x * ys
  688. local xz = x * zs
  689. local yy = y * ys
  690. local yz = y * zs
  691. local zz = z * zs
  692. 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))
  693. end
  694.  
  695. function QuaternionSlerp(a, b, t)
  696. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  697. local startInterp, finishInterp;
  698. if cosTheta >= 0.0001 then
  699. if (1 - cosTheta) > 0.0001 then
  700. local theta = ACOS(cosTheta)
  701. local invSinTheta = 1 / SIN(theta)
  702. startInterp = SIN((1 - t) * theta) * invSinTheta
  703. finishInterp = SIN(t * theta) * invSinTheta
  704. else
  705. startInterp = 1 - t
  706. finishInterp = t
  707. end
  708. else
  709. if (1 + cosTheta) > 0.0001 then
  710. local theta = ACOS(-cosTheta)
  711. local invSinTheta = 1 / SIN(theta)
  712. startInterp = SIN((t - 1) * theta) * invSinTheta
  713. finishInterp = SIN(t * theta) * invSinTheta
  714. else
  715. startInterp = t - 1
  716. finishInterp = t
  717. end
  718. end
  719. 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
  720. end
  721.  
  722. function Clerp(a, b, t)
  723. local qa = {QuaternionFromCFrame(a)}
  724. local qb = {QuaternionFromCFrame(b)}
  725. local ax, ay, az = a.x, a.y, a.z
  726. local bx, by, bz = b.x, b.y, b.z
  727. local _t = 1 - t
  728. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  729. end
  730.  
  731. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  732. local frame = IT("Frame")
  733. frame.BackgroundTransparency = TRANSPARENCY
  734. frame.BorderSizePixel = BORDERSIZEPIXEL
  735. frame.Position = POSITION
  736. frame.Size = SIZE
  737. frame.BackgroundColor3 = COLOR
  738. frame.BorderColor3 = BORDERCOLOR
  739. frame.Name = NAME
  740. frame.Parent = PARENT
  741. return frame
  742. end
  743.  
  744. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  745. local label = IT("TextLabel")
  746. label.BackgroundTransparency = 1
  747. label.Size = UD2(1, 0, 1, 0)
  748. label.Position = UD2(0, 0, 0, 0)
  749. label.TextColor3 = TEXTCOLOR
  750. label.TextStrokeTransparency = STROKETRANSPARENCY
  751. label.TextTransparency = TRANSPARENCY
  752. label.FontSize = TEXTFONTSIZE
  753. label.Font = TEXTFONT
  754. label.BorderSizePixel = BORDERSIZEPIXEL
  755. label.TextScaled = false
  756. label.Text = TEXT
  757. label.Name = NAME
  758. label.Parent = PARENT
  759. return label
  760. end
  761.  
  762. function NoOutlines(PART)
  763. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  764. end
  765.  
  766. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  767. local NEWWELD = IT(TYPE)
  768. NEWWELD.Part0 = PART0
  769. NEWWELD.Part1 = PART1
  770. NEWWELD.C0 = C0
  771. NEWWELD.C1 = C1
  772. NEWWELD.Parent = PARENT
  773. return NEWWELD
  774. end
  775.  
  776. local S = IT("Sound")
  777. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  778. local NEWSOUND = nil
  779. coroutine.resume(coroutine.create(function()
  780. NEWSOUND = S:Clone()
  781. NEWSOUND.Parent = PARENT
  782. NEWSOUND.Volume = VOLUME
  783. NEWSOUND.Pitch = PITCH
  784. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  785. NEWSOUND:play()
  786. if DOESLOOP == true then
  787. NEWSOUND.Looped = true
  788. else
  789. repeat wait(1) until NEWSOUND.Playing == false
  790. NEWSOUND:remove()
  791. end
  792. end))
  793. return NEWSOUND
  794. end
  795.  
  796. function CFrameFromTopBack(at, top, back)
  797. local right = top:Cross(back)
  798. 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)
  799. end
  800.  
  801. function turnto(position)
  802. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  803. end
  804.  
  805. local EyeSizes={
  806. NumberSequenceKeypoint.new(0,1,0),
  807. NumberSequenceKeypoint.new(1,0,0)
  808. }
  809. local EyeTrans={
  810. NumberSequenceKeypoint.new(0,0.8,0),
  811. NumberSequenceKeypoint.new(1,1,0)
  812. }
  813. local PE=Instance.new("ParticleEmitter",nil)
  814. PE.LightEmission=.8
  815. PE.Color = ColorSequence.new(BRICKC("Royal purple").Color)
  816. PE.Size=NumberSequence.new(EyeSizes)
  817. PE.Transparency=NumberSequence.new(EyeTrans)
  818. PE.Lifetime=NumberRange.new(0.35,1.5)
  819. PE.Rotation=NumberRange.new(0,360)
  820. PE.Rate=999
  821. PE.VelocitySpread = 10000
  822. PE.Acceleration = Vector3.new(0,0,0)
  823. PE.Drag = 5
  824. PE.Speed = NumberRange.new(0,0,0)
  825. PE.Texture="http://www.roblox.com/asset/?id=1351966707"
  826. PE.ZOffset = -0
  827. PE.Name = "PE"
  828. PE.Enabled = false
  829.  
  830. function particles(art)
  831. local PARTICLES = PE:Clone()
  832. PARTICLES.Parent = art
  833. end
  834.  
  835.  
  836. --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})
  837. function WACKYEFFECT(Table)
  838. local TYPE = (Table.EffectType or "Sphere")
  839. local SIZE = (Table.Size or VT(1,1,1))
  840. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  841. local TRANSPARENCY = (Table.Transparency or 0)
  842. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  843. local CFRAME = (Table.CFrame or Torso.CFrame)
  844. local MOVEDIRECTION = (Table.MoveToPos or nil)
  845. local ROTATION1 = (Table.RotationX or 0)
  846. local ROTATION2 = (Table.RotationY or 0)
  847. local ROTATION3 = (Table.RotationZ or 0)
  848. local MATERIAL = (Table.Material or "Neon")
  849. local COLOR = (Table.Color or C3(1,1,1))
  850. local TIME = (Table.Time or 45)
  851. local SOUNDID = (Table.SoundID or nil)
  852. local SOUNDPITCH = (Table.SoundPitch or nil)
  853. local SOUNDVOLUME = (Table.SoundVolume or nil)
  854. coroutine.resume(coroutine.create(function()
  855. local PLAYSSOUND = false
  856. local SOUND = nil
  857. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  858. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  859. PLAYSSOUND = true
  860. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  861. end
  862. EFFECT.Color = COLOR
  863. local MSH = nil
  864. if TYPE == "Sphere" then
  865. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  866. elseif TYPE == "Block" then
  867. MSH = IT("BlockMesh",EFFECT)
  868. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  869. elseif TYPE == "Wave" then
  870. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  871. elseif TYPE == "Ring" then
  872. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  873. elseif TYPE == "Slash" then
  874. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  875. elseif TYPE == "Round Slash" then
  876. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  877. elseif TYPE == "Swirl" then
  878. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  879. elseif TYPE == "Skull" then
  880. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  881. elseif TYPE == "Crystal" then
  882. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  883. end
  884. if MSH ~= nil then
  885. local MOVESPEED = nil
  886. if MOVEDIRECTION ~= nil then
  887. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  888. end
  889. local GROWTH = SIZE - ENDSIZE
  890. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  891. if TYPE == "Block" then
  892. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  893. else
  894. EFFECT.CFrame = CFRAME
  895. end
  896. for LOOP = 1, TIME+1 do
  897. Swait()
  898. MSH.Scale = MSH.Scale - GROWTH/TIME
  899. if TYPE == "Wave" then
  900. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  901. end
  902. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  903. if TYPE == "Block" then
  904. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  905. else
  906. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  907. end
  908. if MOVEDIRECTION ~= nil then
  909. local ORI = EFFECT.Orientation
  910. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  911. EFFECT.Orientation = ORI
  912. end
  913. end
  914. if PLAYSSOUND == false then
  915. EFFECT:remove()
  916. else
  917. SOUND.Stopped:Connect(function()
  918. EFFECT:remove()
  919. end)
  920. end
  921. else
  922. if PLAYSSOUND == false then
  923. EFFECT:remove()
  924. else
  925. repeat Swait() until SOUND.Playing == false
  926. EFFECT:remove()
  927. end
  928. end
  929. end))
  930. end
  931.  
  932. function MakeForm(PART,TYPE)
  933. if TYPE == "Cyl" then
  934. local MSH = IT("CylinderMesh",PART)
  935. elseif TYPE == "Ball" then
  936. local MSH = IT("SpecialMesh",PART)
  937. MSH.MeshType = "Sphere"
  938. elseif TYPE == "Wedge" then
  939. local MSH = IT("SpecialMesh",PART)
  940. MSH.MeshType = "Wedge"
  941. end
  942. end
  943.  
  944. Debris = game:GetService("Debris")
  945.  
  946. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  947. local DIRECTION = CF(StartPos,EndPos).lookVector
  948. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  949. end
  950.  
  951. function turnto(position)
  952. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  953. end
  954.  
  955. function SpawnTrail(FROM,TO,BIG)
  956. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Dark Indigo", "Trail", VT(0,0,0))
  957. MakeForm(TRAIL,"Cyl")
  958. local DIST = (FROM - TO).Magnitude
  959. if BIG == true then
  960. TRAIL.Size = VT(0.5,DIST,0.5)
  961. else
  962. TRAIL.Size = VT(0.25,DIST,0.25)
  963. end
  964. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  965. coroutine.resume(coroutine.create(function()
  966. for i = 1, 5 do
  967. Swait()
  968. TRAIL.Transparency = TRAIL.Transparency + 0.1
  969. end
  970. TRAIL:remove()
  971. end))
  972. end
  973.  
  974. local Particle = IT("ParticleEmitter",nil)
  975. Particle.Enabled = false
  976. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
  977. Particle.LightEmission = 0.5
  978. Particle.Rate = 150
  979. Particle.ZOffset = 1
  980. Particle.Rotation = NumberRange.new(-180, 180)
  981. Particle.RotSpeed = NumberRange.new(-180, 180)
  982. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  983. Particle.Color = ColorSequence.new(C3(1,0,1),C3(.4,0,.3))
  984.  
  985. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  986. function ParticleEmitter(Table)
  987. local PRTCL = Particle:Clone()
  988. local Speed = Table.Speed or 5
  989. local Drag = Table.Drag or 0
  990. local Size1 = Table.Size1 or 1
  991. local Size2 = Table.Size2 or 5
  992. local Lifetime1 = Table.Lifetime1 or 1
  993. local Lifetime2 = Table.Lifetime2 or 1.5
  994. local Parent = Table.Parent or Torso
  995. local Emit = Table.Emit or 100
  996. local Offset = Table.Offset or 360
  997. local Acel = Table.Acel or VT(0,0,0)
  998. local Enabled = Table.Enabled or false
  999. PRTCL.Parent = Parent
  1000. PRTCL.Size = NumberSequence.new(Size1,Size2)
  1001. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  1002. PRTCL.Speed = NumberRange.new(Speed)
  1003. PRTCL.VelocitySpread = Offset
  1004. PRTCL.Drag = Drag
  1005. PRTCL.Acceleration = Acel
  1006. if Enabled == false then
  1007. PRTCL:Emit(Emit)
  1008. Debris:AddItem(PRTCL,Lifetime2)
  1009. else
  1010. PRTCL.Enabled = true
  1011. end
  1012. return PRTCL
  1013. end
  1014.  
  1015. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1016. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1017. end
  1018.  
  1019. function PositiveAngle(NUMBER)
  1020. if NUMBER >= 0 then
  1021. NUMBER = 0
  1022. end
  1023. return NUMBER
  1024. end
  1025.  
  1026. function NegativeAngle(NUMBER)
  1027. if NUMBER <= 0 then
  1028. NUMBER = 0
  1029. end
  1030. return NUMBER
  1031. end
  1032.  
  1033. function Swait(NUMBER)
  1034. if NUMBER == 0 or NUMBER == nil then
  1035. ArtificialHB.Event:wait()
  1036. else
  1037. for i = 1, NUMBER do
  1038. ArtificialHB.Event:wait()
  1039. end
  1040. end
  1041. end
  1042.  
  1043. function QuaternionFromCFrame(cf)
  1044. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1045. local trace = m00 + m11 + m22
  1046. if trace > 0 then
  1047. local s = math.sqrt(1 + trace)
  1048. local recip = 0.5 / s
  1049. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1050. else
  1051. local i = 0
  1052. if m11 > m00 then
  1053. i = 1
  1054. end
  1055. if m22 > (i == 0 and m00 or m11) then
  1056. i = 2
  1057. end
  1058. if i == 0 then
  1059. local s = math.sqrt(m00 - m11 - m22 + 1)
  1060. local recip = 0.5 / s
  1061. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1062. elseif i == 1 then
  1063. local s = math.sqrt(m11 - m22 - m00 + 1)
  1064. local recip = 0.5 / s
  1065. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1066. elseif i == 2 then
  1067. local s = math.sqrt(m22 - m00 - m11 + 1)
  1068. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1069. end
  1070. end
  1071. end
  1072.  
  1073. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1074. local xs, ys, zs = x + x, y + y, z + z
  1075. local wx, wy, wz = w * xs, w * ys, w * zs
  1076. local xx = x * xs
  1077. local xy = x * ys
  1078. local xz = x * zs
  1079. local yy = y * ys
  1080. local yz = y * zs
  1081. local zz = z * zs
  1082. 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))
  1083. end
  1084.  
  1085. function QuaternionSlerp(a, b, t)
  1086. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1087. local startInterp, finishInterp;
  1088. if cosTheta >= 0.0001 then
  1089. if (1 - cosTheta) > 0.0001 then
  1090. local theta = ACOS(cosTheta)
  1091. local invSinTheta = 1 / SIN(theta)
  1092. startInterp = SIN((1 - t) * theta) * invSinTheta
  1093. finishInterp = SIN(t * theta) * invSinTheta
  1094. else
  1095. startInterp = 1 - t
  1096. finishInterp = t
  1097. end
  1098. else
  1099. if (1 + cosTheta) > 0.0001 then
  1100. local theta = ACOS(-cosTheta)
  1101. local invSinTheta = 1 / SIN(theta)
  1102. startInterp = SIN((t - 1) * theta) * invSinTheta
  1103. finishInterp = SIN(t * theta) * invSinTheta
  1104. else
  1105. startInterp = t - 1
  1106. finishInterp = t
  1107. end
  1108. end
  1109. 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
  1110. end
  1111.  
  1112. function Clerp(a, b, t)
  1113. local qa = {QuaternionFromCFrame(a)}
  1114. local qb = {QuaternionFromCFrame(b)}
  1115. local ax, ay, az = a.x, a.y, a.z
  1116. local bx, by, bz = b.x, b.y, b.z
  1117. local _t = 1 - t
  1118. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1119. end
  1120.  
  1121. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1122. local frame = IT("Frame")
  1123. frame.BackgroundTransparency = TRANSPARENCY
  1124. frame.BorderSizePixel = BORDERSIZEPIXEL
  1125. frame.Position = POSITION
  1126. frame.Size = SIZE
  1127. frame.BackgroundColor3 = COLOR
  1128. frame.BorderColor3 = BORDERCOLOR
  1129. frame.Name = NAME
  1130. frame.Parent = PARENT
  1131. return frame
  1132. end
  1133.  
  1134. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1135. local label = IT("TextLabel")
  1136. label.BackgroundTransparency = 1
  1137. label.Size = UD2(1, 0, 1, 0)
  1138. label.Position = UD2(0, 0, 0, 0)
  1139. label.TextColor3 = C3(255, 255, 255)
  1140. label.TextStrokeTransparency = STROKETRANSPARENCY
  1141. label.TextTransparency = TRANSPARENCY
  1142. label.FontSize = TEXTFONTSIZE
  1143. label.Font = TEXTFONT
  1144. label.BorderSizePixel = BORDERSIZEPIXEL
  1145. label.TextScaled = true
  1146. label.Text = TEXT
  1147. label.Name = NAME
  1148. label.Parent = PARENT
  1149. return label
  1150. end
  1151.  
  1152. function NoOutlines(PART)
  1153. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1154. end
  1155.  
  1156.  
  1157. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1158. local NEWWELD = IT(TYPE)
  1159. NEWWELD.Part0 = PART0
  1160. NEWWELD.Part1 = PART1
  1161. NEWWELD.C0 = C0
  1162. NEWWELD.C1 = C1
  1163. NEWWELD.Parent = PARENT
  1164. return NEWWELD
  1165. end
  1166.  
  1167. function CreateSound(ID, PARENT, VOLUME, PITCH)
  1168. coroutine.resume(coroutine.create(function()
  1169. local NEWSOUND = IT("Sound", PARENT)
  1170. NEWSOUND.Volume = VOLUME
  1171. NEWSOUND.Pitch = PITCH
  1172. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1173. Swait()
  1174. NEWSOUND:play()
  1175. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  1176. end))
  1177. end
  1178.  
  1179. function CFrameFromTopBack(at, top, back)
  1180. local right = top:Cross(back)
  1181. 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)
  1182. end
  1183.  
  1184. function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME)
  1185. local MAGNITUDE = (POSITION1 - POSITION2).magnitude
  1186. local CURRENTPOSITION = POSITION1
  1187. local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
  1188. coroutine.resume(coroutine.create(function()
  1189. for i = 1, MULTIPLIERTIME do
  1190. local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME))
  1191. LIGHTNINGPART.Anchored = true
  1192. local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)])
  1193. local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2
  1194. if MULTIPLIERTIME == i then
  1195. local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude
  1196. LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1)
  1197. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2)
  1198. else
  1199. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2)
  1200. end
  1201. CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p
  1202. game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME)
  1203. coroutine.resume(coroutine.create(function()
  1204. while LIGHTNINGPART.Transparency ~= 1 do
  1205. --local StartTransparency = tra
  1206. for i=0, 1, LASTINGTIME do
  1207. Swait()
  1208. LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME)
  1209. end
  1210. end
  1211. end))
  1212. Swait(LIGHTNINGDELAY / Animation_Speed)
  1213. end
  1214. end))
  1215. end
  1216.  
  1217. function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1218. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1219. EFFECTPART.Anchored = true
  1220. EFFECTPART.CFrame = CFRAME
  1221. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1222. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1223. coroutine.resume(coroutine.create(function(PART, MESH)
  1224. for i = 0, 1, delay do
  1225. Swait()
  1226. PART.CFrame = PART.CFrame * ROTATION
  1227. PART.Transparency = i
  1228. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1229. end
  1230. PART.Parent = nil
  1231. end), EFFECTPART, EFFECTMESH)
  1232. end
  1233.  
  1234. function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1235. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1236. EFFECTPART.Anchored = true
  1237. EFFECTPART.CFrame = CFRAME
  1238. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1239. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1240. coroutine.resume(coroutine.create(function(PART, MESH)
  1241. for i = 0, 1, delay do
  1242. Swait()
  1243. PART.CFrame = PART.CFrame * ROTATION
  1244. PART.Transparency = i
  1245. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1246. end
  1247. PART.Parent = nil
  1248. end), EFFECTPART, EFFECTMESH)
  1249. end
  1250.  
  1251. function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1252. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1253. EFFECTPART.Anchored = true
  1254. EFFECTPART.CFrame = CFRAME
  1255. local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1256. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1257. coroutine.resume(coroutine.create(function(PART, MESH)
  1258. for i = 0, 1, delay do
  1259. Swait()
  1260. PART.CFrame = PART.CFrame * ROTATION
  1261. PART.Transparency = i
  1262. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1263. end
  1264. PART.Parent = nil
  1265. end), EFFECTPART, EFFECTMESH)
  1266. end
  1267.  
  1268. function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1269. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1270. EFFECTPART.Anchored = true
  1271. EFFECTPART.CFrame = CFRAME
  1272. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1273. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1274. coroutine.resume(coroutine.create(function(PART, MESH)
  1275. for i = 0, 1, delay do
  1276. Swait()
  1277. PART.CFrame = PART.CFrame * ROTATION
  1278. PART.Transparency = i
  1279. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1280. end
  1281. PART.Parent = nil
  1282. end), EFFECTPART, EFFECTMESH)
  1283. end
  1284.  
  1285. function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1286. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1287. EFFECTPART.Anchored = true
  1288. EFFECTPART.CFrame = CFRAME
  1289. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1290. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1291. coroutine.resume(coroutine.create(function(PART, MESH)
  1292. for i = 0, 1, delay do
  1293. Swait()
  1294. PART.CFrame = PART.CFrame * ROTATION
  1295. PART.Transparency = i
  1296. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1297. end
  1298. PART.Parent = nil
  1299. end), EFFECTPART, EFFECTMESH)
  1300. end
  1301.  
  1302. function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1303. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1304. EFFECTPART.Anchored = true
  1305. EFFECTPART.CFrame = CFRAME
  1306. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size))
  1307. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1308. coroutine.resume(coroutine.create(function(PART, MESH)
  1309. for i = 0, 1, delay do
  1310. Swait()
  1311. PART.CFrame = PART.CFrame * ROTATION
  1312. PART.Transparency = i
  1313. MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z))
  1314. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1315. end
  1316. PART.Parent = nil
  1317. end), EFFECTPART, EFFECTMESH)
  1318. end
  1319.  
  1320. function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1321. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1322. EFFECTPART.Anchored = true
  1323. EFFECTPART.CFrame = CFRAME
  1324. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1325. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1326. coroutine.resume(coroutine.create(function(PART, MESH)
  1327. for i = 0, 1, delay do
  1328. Swait()
  1329. PART.CFrame = PART.CFrame * ROTATION
  1330. PART.Transparency = i
  1331. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1332. end
  1333. PART.Parent = nil
  1334. end), EFFECTPART, EFFECTMESH)
  1335. end
  1336.  
  1337. function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1338. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1339. EFFECTPART.Anchored = true
  1340. EFFECTPART.CFrame = CFRAME
  1341. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1342. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1343. coroutine.resume(coroutine.create(function(PART, MESH)
  1344. for i = 0, 1, delay do
  1345. Swait()
  1346. PART.CFrame = PART.CFrame * ROTATION
  1347. PART.Transparency = i
  1348. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1349. end
  1350. PART.Parent = nil
  1351. end), EFFECTPART, EFFECTMESH)
  1352. end
  1353.  
  1354. function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1355. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1356. EFFECTPART.Anchored = true
  1357. EFFECTPART.CFrame = CFRAME
  1358. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1359. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1360. coroutine.resume(coroutine.create(function(PART, MESH)
  1361. for i = 0, 1, delay do
  1362. Swait()
  1363. PART.CFrame = PART.CFrame * ROTATION
  1364. PART.Transparency = i
  1365. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1366. end
  1367. PART.Parent = nil
  1368. end), EFFECTPART, EFFECTMESH)
  1369. end
  1370.  
  1371. function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1372. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1373. EFFECTPART.Anchored = true
  1374. EFFECTPART.CFrame = CFRAME
  1375. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1376. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1377. coroutine.resume(coroutine.create(function(PART, MESH)
  1378. for i = 0, 1, delay do
  1379. Swait()
  1380. PART.CFrame = PART.CFrame * ROTATION
  1381. PART.Transparency = i
  1382. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1383. end
  1384. PART.Parent = nil
  1385. end), EFFECTPART, EFFECTMESH)
  1386. end
  1387.  
  1388. function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1389. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1390. EFFECTPART.Anchored = true
  1391. EFFECTPART.CFrame = CFRAME
  1392. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1393. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1394. coroutine.resume(coroutine.create(function(PART, MESH)
  1395. for i = 0, 1, delay do
  1396. Swait()
  1397. PART.CFrame = PART.CFrame * ROTATION
  1398. PART.Transparency = i
  1399. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1400. end
  1401. PART.Parent = nil
  1402. end), EFFECTPART, EFFECTMESH)
  1403. end
  1404.  
  1405. function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1406. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1407. EFFECTPART.Anchored = true
  1408. EFFECTPART.CFrame = CFRAME
  1409. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1410. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1411. coroutine.resume(coroutine.create(function(PART, MESH)
  1412. for i = 0, 1, delay do
  1413. Swait()
  1414. PART.CFrame = PART.CFrame * ROTATION
  1415. PART.Transparency = i
  1416. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1417. end
  1418. PART.Parent = nil
  1419. end), EFFECTPART, EFFECTMESH)
  1420. end
  1421.  
  1422. function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  1423. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1424. EFFECTPART.Anchored = true
  1425. EFFECTPART.CFrame = CFRAME
  1426. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  1427. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1428. coroutine.resume(coroutine.create(function(PART, MESH)
  1429. for i = 0, 1, delay do
  1430. Swait()
  1431. PART.CFrame = PART.CFrame * ROTATION
  1432. PART.Transparency = i
  1433. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  1434. end
  1435. PART.Parent = nil
  1436. end), EFFECTPART, EFFECTMESH)
  1437. end
  1438.  
  1439. function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay)
  1440. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  1441. EFFECTPART.Anchored = true
  1442. EFFECTPART.CFrame = CFRAME
  1443. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size)
  1444. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1445. local XVALUE = MRANDOM()
  1446. local YVALUE = MRANDOM()
  1447. local ZVALUE = MRANDOM()
  1448. coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE)
  1449. for i = 0, 1, delay do
  1450. Swait()
  1451. PART.CFrame = PART.CFrame * ROTATION
  1452. PART.Transparency = i
  1453. THEXVALUE = THEXVALUE - 0.1 * (delay * 10)
  1454. THEYVALUE = THEYVALUE - 0.1 * (delay * 10)
  1455. THEZVALUE = THEZVALUE - 0.1 * (delay * 10)
  1456. MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size)
  1457. end
  1458. PART.Parent = nil
  1459. end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE)
  1460. end
  1461.  
  1462. function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay)
  1463. local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude
  1464. if MAGNITUDECFRAME > (1 / 100) then
  1465. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1))
  1466. EFFECTPART.Anchored = true
  1467. EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0)
  1468. local THEMESHTYPE = "BlockMesh"
  1469. if MESHTYPE == "Cylinder" then
  1470. THEMESHTYPE = "CylinderMesh"
  1471. end
  1472. local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0))
  1473. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1474. coroutine.resume(coroutine.create(function(PART, MESH)
  1475. for i = 0, 1, delay do
  1476. Swait()
  1477. PART.CFrame = PART.CFrame * ROTATION
  1478. PART.Transparency = i
  1479. MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size)
  1480. end
  1481. PART.Parent = nil
  1482. end), EFFECTPART, EFFECTMESH)
  1483. end
  1484. end
  1485.  
  1486. function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay)
  1487. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT())
  1488. EFFECTPART.Anchored = true
  1489. EFFECTPART.CFrame = CFRAME
  1490. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0))
  1491. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  1492. local THELASTPOINT = CFRAME
  1493. coroutine.resume(coroutine.create(function(PART)
  1494. for i = 1, DURATION do
  1495. Swait()
  1496. PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0)
  1497. TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay)
  1498. THELASTPOINT = PART.CFrame
  1499. end
  1500. PART.Parent = nil
  1501. end), EFFECTPART)
  1502. end
  1503.  
  1504. --local list={}
  1505. function Triangle(Color, Material, a, b, c, delay)
  1506. local edge1 = (c - a):Dot((b - a).unit)
  1507. local edge2 = (a - b):Dot((c - b).unit)
  1508. local edge3 = (b - c):Dot((a - c).unit)
  1509. if edge1 <= (b - a).magnitude and edge1 >= 0 then
  1510. a, b, c=a, b, c
  1511. elseif edge2 <= (c - b).magnitude and edge2 >= 0 then
  1512. a, b, c=b, c, a
  1513. elseif edge3 <= (a - c).magnitude and edge3 >= 0 then
  1514. a, b, c=c, a, b
  1515. else
  1516. assert(false, "unreachable")
  1517. end
  1518. local len1 = (c - a):Dot((b - a).unit)
  1519. local len2 = (b - a).magnitude - len1
  1520. local width = (a + (b - a).unit * len1 - c).magnitude
  1521. local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit)
  1522. if len1 > 1 / 100 then
  1523. local sz = VT(0.2, width, len1)
  1524. local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  1525. local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0))
  1526. w1.Anchored = true
  1527. w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2)
  1528. coroutine.resume(coroutine.create(function()
  1529. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  1530. Swait()
  1531. w1.Transparency = i
  1532. end
  1533. w1.Parent = nil
  1534. end))
  1535. game:GetService("Debris"):AddItem(w1, 10)
  1536. --table.insert(list, w1)
  1537. end
  1538. if len2 > 1 / 100 then
  1539. local sz = VT(0.2, width, len2)
  1540. local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  1541. local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0))
  1542. w2.Anchored = true
  1543. w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2)
  1544. coroutine.resume(coroutine.create(function()
  1545. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  1546. Swait()
  1547. w2.Transparency = i
  1548. end
  1549. w2.Parent = nil
  1550. end))
  1551. game:GetService("Debris"):AddItem(w2, 10)
  1552. --table.insert(list, w2)
  1553. end
  1554. --return unpack(list)
  1555. end
  1556.  
  1557. --[[Usage:
  1558. local Pos = Part
  1559. local Offset = Part.CFrame * CF(0, 0, 0)
  1560. local Color = "Institutional white"
  1561. local Material = "Neon"
  1562. local TheDelay = 0.01
  1563. local Height = 4
  1564. BLCF = Offset
  1565. if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
  1566. local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
  1567. if a then game:GetService("Debris"):AddItem(a, 1) end
  1568. if b then game:GetService("Debris"):AddItem(b, 1) end
  1569. local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
  1570. if a then game:GetService("Debris"):AddItem(a, 1) end
  1571. if b then game:GetService("Debris"):AddItem(b, 1) end
  1572. SCFR = BLCF
  1573. elseif not SCFR then
  1574. SCFR = BLCF
  1575. end
  1576. --
  1577. BLCF = nil
  1578. SCFR = nil
  1579. --]]
  1580.  
  1581. --//=================================\\
  1582. --\\=================================//
  1583.  
  1584.  
  1585. --//=================================\\
  1586. --|| WEAPON CREATION
  1587. --\\=================================//
  1588.  
  1589. if Player_Size ~= 1 then
  1590. for _, v in pairs (Weapon:GetChildren()) do
  1591. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  1592. local p1 = v.Part1
  1593. v.Part1 = nil
  1594. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  1595. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  1596. v.Part1 = p1
  1597. elseif v.ClassName == "Part" then
  1598. for _, b in pairs (v:GetChildren()) do
  1599. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  1600. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  1601. end
  1602. end
  1603. end
  1604. end
  1605. end
  1606.  
  1607. for _, c in pairs(Weapon:GetChildren()) do
  1608. if c.ClassName == "Part" then
  1609. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1610. end
  1611. end
  1612.  
  1613.  
  1614. local Gun = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun", VT(0, 0, 0),false)
  1615. local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "1757389224", "1757405356", VT(0.07,0.07,0.07), VT(0,0, 0))
  1616. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, RightArm, Gun, CF(0.2, -2, 0.2) * ANGLES(RAD(330), RAD(0), RAD(20)), CF(0, 0, 0))
  1617.  
  1618. Weapon.Parent = Character
  1619.  
  1620. Humanoid.Died:connect(function()
  1621. ATTACK = true
  1622. end)
  1623.  
  1624. print(Class_Name.." loaded.")
  1625.  
  1626. --//=================================\\
  1627. --\\=================================//
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633. --//=================================\\
  1634. --|| DAMAGE FUNCTIONS
  1635. --\\=================================//
  1636.  
  1637. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  1638. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  1639. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  1640. local BODYGYRO = IT("BodyGyro", STATPART)
  1641. local BODYPOSITION = IT("BodyPosition", STATPART)
  1642. BODYPOSITION.P = 2000
  1643. BODYPOSITION.D = 100
  1644. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  1645. if LABELTYPE == "Normal" then
  1646. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  1647. elseif LABELTYPE == "Debuff" then
  1648. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
  1649. elseif LABELTYPE == "Interruption" then
  1650. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
  1651. end
  1652. game:GetService("Debris"):AddItem(STATPART ,5)
  1653. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  1654. BILLBOARDGUI.Adornee = STATPART
  1655. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  1656. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  1657. BILLBOARDGUI.AlwaysOnTop = false
  1658. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  1659. TEXTLABEL.BackgroundTransparency = 1
  1660. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  1661. TEXTLABEL.Text = TEXT
  1662. TEXTLABEL.Font = "SciFi"
  1663. TEXTLABEL.FontSize="Size42"
  1664. TEXTLABEL.TextColor3 = COLOR
  1665. TEXTLABEL.TextStrokeTransparency = 1
  1666. TEXTLABEL.TextScaled = true
  1667. TEXTLABEL.TextWrapped = true
  1668. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  1669. wait(0.2)
  1670. for i=1, 5 do
  1671. wait()
  1672. THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
  1673. end
  1674. wait(1.2)
  1675. for i=1, 5 do
  1676. wait()
  1677. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  1678. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  1679. THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
  1680. end
  1681. THEPART.Parent = nil
  1682. end),STATPART, BODYPOSITION, TEXTLABEL)
  1683. end
  1684.  
  1685.  
  1686. --//=================================\\
  1687. --|| DAMAGING
  1688. --\\=================================//
  1689.  
  1690. function ApplyAoE(POSITION,RANGE,BRUTAL)
  1691. local CHILDREN = workspace:GetDescendants()
  1692. for index, CHILD in pairs(CHILDREN) do
  1693. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1694. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1695. if HUM then
  1696. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1697. if TORSO then
  1698. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  1699. if BRUTAL == true then
  1700. Voided(CHILD)
  1701. else
  1702. CHILD:BreakJoints()
  1703. end
  1704. end
  1705. end
  1706. end
  1707. end
  1708. end
  1709. end
  1710. function ApplyAoE2(POSITION, RANGE, MINDMG, MAXDMG, FLING, ow)
  1711. local CHILDREN = workspace:GetDescendants()
  1712. for index, CHILD in pairs(CHILDREN) do
  1713. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1714. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1715. if HUM then
  1716. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1717. if TORSO and RANGE >= (TORSO.Position - POSITION).Magnitude then
  1718. if ow == true then
  1719. Voided(CHILD)
  1720. else
  1721. print("that doesnt hurt haha")
  1722. end
  1723. if FLING > 0 then
  1724. for _, c in pairs(CHILD:GetChildren()) do
  1725. if c:IsA("BasePart") then
  1726. local bv = Instance.new("BodyVelocity")
  1727. bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
  1728. bv.velocity = CF(POSITION, TORSO.Position).lookVector * FLING
  1729. bv.Parent = c
  1730. Debris:AddItem(bv, 0.05)
  1731. end
  1732. end
  1733. end
  1734. end
  1735. end
  1736. end
  1737. end
  1738. end
  1739. function ApplyAoE3(POSITION,RANGE)
  1740. local CHILDREN = workspace:GetDescendants()
  1741. for index, CHILD in pairs(CHILDREN) do
  1742. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1743. local LISTED = false
  1744. for LIST = 1, #WHITELIST do
  1745. if WHITELIST[LIST] ~= nil then
  1746. if CHILD.Name == WHITELIST[LIST] then
  1747. LISTED = true
  1748. end
  1749. end
  1750. end
  1751. if LISTED == false then
  1752. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1753. if HUM then
  1754. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1755. if TORSO then
  1756. if (TORSO.Position - POSITION).Magnitude <= RANGE+TORSO.Size.Magnitude then
  1757. VoidAgony(CHILD)
  1758. end
  1759. end
  1760. end
  1761. end
  1762. end
  1763. end
  1764. end
  1765. function ApplyAoE4(POSITION,RANGE,MINDMG,MAXDMG,FLING,VOIDED)
  1766. local CHILDREN = workspace:GetDescendants()
  1767. for index, CHILD in pairs(CHILDREN) do
  1768. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1769. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1770. if HUM then
  1771. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1772. if TORSO then
  1773. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  1774. if CHILD.Parent == Effects and CHILD:FindFirstChild("RealBody") then
  1775. local BODY = CHILD.RealBody.Value
  1776. if BODY then
  1777. local HUM = BODY:FindFirstChildOfClass("Humanoid")
  1778. if HUM then
  1779. if INSTAKILL == true or (HUM.MaxHealth == math.huge and MAXDMG > 0) then
  1780. BODY:BreakJoints()
  1781. else
  1782. local TORSO = BODY:FindFirstChild("Torso") or BODY:FindFirstChild("UpperTorso")
  1783. if TORSO then
  1784. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  1785. local DMG = MRANDOM(MINDMG,MAXDMG)/2
  1786. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,85,1), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = MRANDOM(-35,35), RotationZ = 0, Material = "Neon", Color = C3(0.3,0,0), SoundID = HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], SoundPitch = MRANDOM(7,15)/10, SoundVolume = 10})
  1787. print("yo ur gay")
  1788. end
  1789. end
  1790. end
  1791. end
  1792. else
  1793. if VOIDED == true or (HUM.MaxHealth == math.huge and MAXDMG > 0) then
  1794. VoidAgony(CHILD)
  1795. else
  1796. local DMG = MRANDOM(MINDMG,MAXDMG)
  1797. print("yo ur gay")
  1798. end
  1799. if FLING > 0 then
  1800. for _, c in pairs(CHILD:GetChildren()) do
  1801. if c:IsA("BasePart") then
  1802. local bv = Instance.new("BodyVelocity")
  1803. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1804. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  1805. bv.Parent = c
  1806. Debris:AddItem(bv,0.05)
  1807. end
  1808. end
  1809. end
  1810. end
  1811. end
  1812. end
  1813. end
  1814. end
  1815. end
  1816. end
  1817. function ApplyAoE5(POSITION, RANGE)
  1818. local PARTS = {}
  1819. for index, CHILD in pairs(workspace:GetDescendants()) do
  1820. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1821. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1822. if HUM then
  1823. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1824. if TORSO and HUM.Health > 0 and RANGE >= (TORSO.Position - POSITION).Magnitude then
  1825. CHILD:BreakJoints()
  1826. for index, PART in pairs(CHILD:GetChildren()) do
  1827. if PART:IsA("BasePart") and PART.Name ~= "HumanoidRootPart" then
  1828. local P = DParticles:Clone()
  1829. P.Parent = PART
  1830. P.Enabled = true
  1831. P.Color = ColorSequence.new(PART.Color, C3(1, 1, 1))
  1832. PART.Anchored = true
  1833. table.insert(PARTS, {PART, P})
  1834. end
  1835. end
  1836. end
  1837. end
  1838. elseif CHILD:IsA("BasePart") and CHILD.Parent.Parent ~= Character and CHILD.Parent:FindFirstChildOfClass("Humanoid") == nil and CHILD:FindFirstChild("ewdfrfgrwefd") == nil and CHILD.Size.Magnitude < RANGE * 2 and CHILD.Size.Magnitude < 200 and RANGE > (CHILD.Position - POSITION).Magnitude then
  1839. local FOLDER = IT("Folder", CHILD)
  1840. FOLDER.Name = "ewdfrfgrwefd"
  1841. local P = DParticles:Clone()
  1842. P.Parent = CHILD
  1843. P.Enabled = true
  1844. CHILD:BreakJoints()
  1845. CHILD.CanCollide = false
  1846. CHILD.Anchored = true
  1847. P.Rate = math.ceil(CHILD.Size.Magnitude / 2)
  1848. P.Color = ColorSequence.new(CHILD.Color, C3(1, 1, 1))
  1849. table.insert(PARTS, {CHILD, P})
  1850. end
  1851. end
  1852. coroutine.resume(coroutine.create(function()
  1853. if #PARTS > 0 then
  1854. for i = 1, 85 do
  1855. Swait()
  1856. for E = 1, #PARTS do
  1857. local F = PARTS[E]
  1858. local A = F[1]
  1859. local B = F[2]
  1860. A.Transparency = A.Transparency + 0.011764705882352941
  1861. B.Rate = math.ceil(B.Rate * 1.2)
  1862. for index, E in pairs(A:GetChildren()) do
  1863. if E:IsA("Decal") or E:IsA("Texture") then
  1864. E.Transparency = E.Transparency + 0.011764705882352941
  1865. elseif E:IsA("JointInstance") then
  1866. E:remove()
  1867. elseif E:IsA("Light") or E:IsA("ParticleEmitter") and E ~= B and E.Name ~= "ArchangelDeathParticles" or E:IsA("Fire") or E:IsA("Sparkles") or E:IsA("Smoke") then
  1868. E.Enabled = false
  1869. end
  1870. end
  1871. end
  1872. end
  1873. for E = 1, #PARTS do
  1874. local F = PARTS[E]
  1875. local A = F[1]
  1876. local B = F[2]
  1877. B.Enabled = false
  1878. Debris:AddItem(A, 3)
  1879. end
  1880. end
  1881. end))
  1882. end
  1883. function CreateWave3(inair,size,doesrotate,rotatedirection,waitt,part,offset,color)
  1884. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
  1885. local mesh = IT("SpecialMesh",wave)
  1886. mesh.MeshType = "FileMesh"
  1887. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1888. mesh.Scale = VT(size,size,size)
  1889. mesh.Offset = VT(0,0,-size/8)
  1890. wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0))
  1891. coroutine.resume(coroutine.create(function(PART)
  1892. for i = 1, waitt do
  1893. Swait()
  1894. mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
  1895. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  1896. if doesrotate == true then
  1897. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  1898. end
  1899. wave.Transparency = wave.Transparency + (0.5/waitt)
  1900. if wave.Transparency > 0.99 then
  1901. wave:remove()
  1902. end
  1903. end
  1904. end))
  1905. end
  1906.  
  1907. function Dustify(v)
  1908. v:BreakJoints()
  1909. for _, c in pairs(v:GetChildren()) do
  1910. if c:IsA("BasePart") then
  1911. if c.Transparency < 1 then
  1912. if c:FindFirstChildOfClass("Decal") then
  1913. c:FindFirstChildOfClass("Decal"):remove()
  1914. end
  1915. particles2(c)
  1916. c.PE.Enabled = true
  1917. c.Parent = Effects
  1918. c.CanCollide = false
  1919. c.Material = "Neon"
  1920. c.Color = C3(0,1,0)
  1921. c.Transparency = 1
  1922. local grav = Instance.new("BodyPosition",c)
  1923. grav.P = 20000
  1924. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1925. grav.position = c.Position + VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5))
  1926. grav.Name = "GravityForce"
  1927. coroutine.resume(coroutine.create(function()
  1928. for i = 1, 20 do
  1929. Swait()
  1930. c.Transparency = c.Transparency + 1/20
  1931. end
  1932. c.PE.Enabled = false
  1933. Debris:AddItem(c,3)
  1934. end))
  1935. end
  1936. end
  1937. end
  1938. end
  1939.  
  1940.  
  1941. --//=================================\\
  1942. --|| ATTACK FUNCTIONS AND STUFF
  1943. --\\=================================//
  1944.  
  1945. function ThanosSnap()
  1946. ATTACK = true
  1947. Rooted = true
  1948. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  1949. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  1950. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  1951. if TORSO then
  1952. local GYRO = IT("BodyGyro", RootPart)
  1953. GYRO.D = 750
  1954. GYRO.P = 2000
  1955. GYRO.MaxTorque = VT(0, 40000, 0)
  1956. for i = 0, 0.3, 0.1 / Animation_Speed do
  1957. Swait()
  1958. WACKYEFFECT({
  1959. Time = 5,
  1960. EffectType = "Round Slash",
  1961. Size = VT(0, 0, 0),
  1962. Size2 = VT(0.01, 0, 0.01),
  1963. Transparency = 0.5,
  1964. Transparency2 = 1,
  1965. CFrame = CF(TT.Position) * ANGLES(RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360))),
  1966. MoveToPos = nil,
  1967. RotationX = MRANDOM(-50, 50) / 10,
  1968. RotationY = MRANDOM(-50, 50) / 10,
  1969. RotationZ = MRANDOM(-50, 50) / 10,
  1970. Material = "Neon",
  1971. Color = C3(1, 0, 0),
  1972. SoundID = nil,
  1973. SoundPitch = nil,
  1974. SoundVolume = nil
  1975. })
  1976. GYRO.cframe = CF(RootPart.Position, TORSO.Position)
  1977. 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)
  1978. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1*SIZE) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1979. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1980. 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)
  1981. 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)
  1982. 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)
  1983. if ANIM == "Idle" then
  1984. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1985. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1986. elseif ANIM == "Walk" then
  1987. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 22)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1988. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 22)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1989. elseif ANIM == "Jump" or ANIM == "Fall" then
  1990. 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)
  1991. 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)
  1992. end
  1993. end
  1994. GYRO:remove()
  1995. for i = 0.4, 15 do
  1996. WACKYEFFECT({
  1997. Time = MRANDOM(15, 85),
  1998. EffectType = "Sphere",
  1999. Size = VT(0, 0, 0),
  2000. Size2 = VT(0.3, 0, 0.3),
  2001. Transparency = 0.5,
  2002. Transparency2 = 1,
  2003. CFrame = CF(TORSO.Position) * ANGLES(RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360))),
  2004. MoveToPos = nil,
  2005. RotationX = MRANDOM(-50, 50) / 10,
  2006. RotationY = MRANDOM(-50, 50) / 10,
  2007. RotationZ = MRANDOM(-50, 50) / 10,
  2008. Material = "Neon",
  2009. Color = C3(255, 0, 255),
  2010. SoundID = nil,
  2011. SoundPitch = nil,
  2012. SoundVolume = nil
  2013. })
  2014. end
  2015. local bv = Instance.new("BodyVelocity")
  2016. bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
  2017. bv.velocity = CF(Torso.Position, TORSO.Position).lookVector * 5
  2018. bv.Parent = TORSO
  2019. Debris:AddItem(bv, 0.05)
  2020. CreateSound("539792706", TORSO, 10, 1)
  2021. Dustify(HUM.Parent)
  2022. CreateSound("2231214507", Torso, 10, 1)
  2023. for i = 0, 0.25, 0.1 / Animation_Speed do
  2024. Swait()
  2025. WACKYEFFECT({
  2026. Time = 5,
  2027. EffectType = "Sphere",
  2028. Size = VT(0, 0, 0),
  2029. Size2 = VT(0.01, 0, 0.01),
  2030. Transparency = 0.5,
  2031. Transparency2 = 1,
  2032. CFrame = CF(TT.Position) * ANGLES(RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360))),
  2033. MoveToPos = nil,
  2034. RotationX = MRANDOM(-50, 50) / 10,
  2035. RotationY = MRANDOM(-50, 50) / 10,
  2036. RotationZ = MRANDOM(-50, 50) / 10,
  2037. Material = "Neon",
  2038. Color = C3(255, 0, 255),
  2039. SoundID = nil,
  2040. SoundPitch = nil,
  2041. SoundVolume = nil
  2042. })
  2043. GYRO.cframe = CF(RootPart.Position, TORSO.Position)
  2044. 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)
  2045. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1*SIZE) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2046. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2047. 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)
  2048. 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)
  2049. 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)
  2050. if ANIM == "Idle" then
  2051. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2052. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2053. elseif ANIM == "Walk" then
  2054. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 22)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2055. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 22)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2056. elseif ANIM == "Jump" or ANIM == "Fall" then
  2057. 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)
  2058. 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)
  2059. end
  2060. end
  2061. end
  2062. end
  2063. ATTACK = false
  2064. Rooted = false
  2065. end
  2066.  
  2067.  
  2068. function choosetarget()
  2069. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then
  2070. target = Mouse.Target.Parent
  2071. if boop ~= nil then
  2072. boop:remove()
  2073. end
  2074. local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso")
  2075. if targettorso ~= nil then
  2076. boop = IT("Part",Effects)
  2077. boop.Size = VT(0,0,0)
  2078. boop.CanCollide = false
  2079. boop.Transparency = 1
  2080. boop.CFrame = targettorso.CFrame * CF(0,-0.75,0.8)
  2081. weldBetween(targettorso,boop)
  2082. local gui = abss:Clone()
  2083. gui.Parent = boop
  2084. gui.AlwaysOnTop = false
  2085. gui.Enabled = true
  2086. else
  2087. target = nil
  2088. end
  2089. end
  2090. end
  2091.  
  2092. function assgrab()
  2093. if target ~= nil then
  2094. local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso")
  2095. if targettorso ~= nil then
  2096. ATTACK = true
  2097. targettorso.Anchored = true
  2098. Rooted = true
  2099. CreateSound("889222890", Head, 10, 1)
  2100. RootPart.CFrame = targettorso.CFrame * CF(0,0,3)
  2101. Swait(100)
  2102. if target ~= nil and targettorso ~= nil then
  2103. for i = 1, 3 do
  2104. CreateSound("948494432", targettorso, 10, 1)
  2105. Swait(5)
  2106. end
  2107. if target ~= nil and targettorso ~= nil then
  2108. Swait(15)
  2109. RootPart.CFrame = targettorso.CFrame * CF(0,0,1.5)
  2110. Swait(20)
  2111. RootPart.CFrame = targettorso.CFrame * CF(0,0,3)
  2112. ATTACK = false
  2113. Rooted = false
  2114. targettorso.Anchored = false
  2115. local bomb = IT("Part",target)
  2116. bomb.Size = VT(0,0,0)
  2117. bomb.CFrame = boop.CFrame
  2118. bomb.CanCollide = false
  2119. local mesh = IT("SpecialMesh",bomb)
  2120. mesh.MeshType = "FileMesh"
  2121. mesh.MeshId = "rbxasset://fonts/timebomb.mesh"
  2122. mesh.TextureId = "rbxasset://textures/bombtex.png"
  2123. weldBetween(targettorso,bomb)
  2124. CreateSound("138931042", targettorso, 10, 4)
  2125. Swait(150)
  2126. target:BreakJoints()
  2127. local boom = Instance.new("Explosion",workspace)
  2128. boom.Position = targettorso.Position
  2129. CreateSound("691216625", targettorso, 50, 1)
  2130. target = nil
  2131. else
  2132. Rooted = false
  2133. ATTACK = false
  2134. end
  2135. else
  2136. Rooted = false
  2137. ATTACK = false
  2138. end
  2139. end
  2140. end
  2141. end
  2142.  
  2143. function slash()
  2144. ATTACK = true
  2145. Rooted = true
  2146. for i=0, 0.5, 0.1 / Animation_Speed do
  2147. --Swait()
  2148. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  2149. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2150. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  2151. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  2152. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  2153. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  2154. --HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  2155. end
  2156. local bomb = IT("Part",Effects)
  2157. bomb.Size = VT(0,0,0)
  2158. bomb.CFrame = RightArm.CFrame * CF(1.6,-1.2,0) * ANGLES(RAD(-90),RAD(0),RAD(-90))
  2159. bomb.CanCollide = false
  2160. bomb.Color = C3(123/255, 0, 123/255)
  2161. local mesh = IT("SpecialMesh",bomb)
  2162. mesh.MeshType = "FileMesh"
  2163. mesh.Scale = VT(2,2,2)
  2164. mesh.MeshId = "http://www.roblox.com/asset?id=156092238"
  2165. weldBetween(RightArm,bomb)
  2166. Swait(10)
  2167. CreateSound("615910787", Torso, 5, MRANDOM(7, 12) / 10)
  2168. Swait(5)
  2169. for i = 1, 15 do
  2170. killnearest(bomb.Position,6,150)
  2171. RootPart.CFrame = RootPart.CFrame * CF(0,0,-3)
  2172. end
  2173. killnearest(bomb.Position,6,150)
  2174. for i=0, 1, 0.1 / Animation_Speed do
  2175. --Swait()
  2176. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(25)), 0.4 / Animation_Speed)
  2177. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.2 / Animation_Speed)
  2178. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.25 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  2179. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  2180. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  2181. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  2182. --HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  2183. end
  2184. Swait(25)
  2185. bomb:remove()
  2186. ATTACK = false
  2187. Rooted = false
  2188. end
  2189.  
  2190. function hurr()
  2191. if target ~= nil then
  2192. local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso")
  2193. if targettorso ~= nil then
  2194. Rooted = true
  2195. ATTACK = true
  2196. RootPart.CFrame = targettorso.CFrame * CF(0,0,3)
  2197. for i = 1, 15 do
  2198. Swait(3)
  2199. RootPart.CFrame = targettorso.CFrame * CF(0,0,1)
  2200. Swait(3)
  2201. RootPart.CFrame = targettorso.CFrame * CF(0,0,3)
  2202. end
  2203. CreateSound("173137001", Head, 5, 1)
  2204. target:BreakJoints()
  2205. target = nil
  2206. Rooted = false
  2207. ATTACK = false
  2208. end
  2209. end
  2210. end
  2211.  
  2212. function beam(from,size)
  2213. local sphere = Instance.new("Part",Effects)
  2214. sphere.Size = VT(size*2,size*2,size*2)
  2215. sphere.Material = "Neon"
  2216. sphere.Shape = "Ball"
  2217. sphere.Name = "Waft"
  2218. sphere.Anchored = true
  2219. sphere.Color = C3(80/255, 109/255, 84/255)
  2220. sphere.CFrame = RootPart.CFrame * CF(0,0.5,-from)
  2221. sphere.CanCollide = false
  2222. local hit = sphere.Touched:connect(function(hit)
  2223. dealdamage(hit,0,0,0,true,0,0)
  2224. end)
  2225. --table.insert(Effects2,{Lazor,"Disappear",0.01,0.03,0,0.03,1})
  2226. table.insert(Effects2,{sphere,"Disappear",0.01,0.03,0,0.03,1})
  2227. end
  2228.  
  2229. function turnto(position)
  2230. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  2231. end
  2232.  
  2233. function FARTLAZOR()
  2234. Rooted = true
  2235. ATTACK = true
  2236. for i=0, 2, 0.1 / Animation_Speed do
  2237. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(180)), 0.15 / Animation_Speed)
  2238. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2239. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  2240. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  2241. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2242. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2243. end
  2244. for i = 1, 25 do
  2245. Swait()
  2246. turnto(Mouse.Hit.p)
  2247. end
  2248. CreateSound("131314452", Effects, 10, 1)
  2249. beam(50,50)
  2250. Swait(50)
  2251. ATTACK = false
  2252. Rooted = false
  2253. end
  2254.  
  2255. --//=================================\\
  2256. --|| ASSIGN THINGS TO KEYS
  2257. --\\=================================//
  2258.  
  2259. Humanoid.Changed:connect(function(Jump)
  2260. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  2261. Humanoid.Jump = false
  2262. end
  2263. end)
  2264.  
  2265. function MouseDown(Mouse)
  2266. if ATTACK == false then
  2267. choosetarget()
  2268. end
  2269. end
  2270.  
  2271. function MouseUp(Mouse)
  2272. HOLD = false
  2273. end
  2274.  
  2275. function KeyDown(Key)
  2276. if Key == "e" and ATTACK == false then
  2277. assgrab()
  2278. end
  2279. if Key == "g" and ATTACK == false then
  2280. slash()
  2281. end
  2282. if Key == "z" and ATTACK == false then
  2283. ThanosSnap()
  2284. end
  2285. if Key == "x" and ATTACK == false then
  2286. FARTLAZOR()
  2287. end
  2288. if Key == "f" and ATTACK == false then
  2289. hurr()
  2290. end
  2291. end
  2292.  
  2293. function KeyUp(Key)
  2294. end
  2295.  
  2296. Mouse.Button1Down:connect(function(NEWKEY)
  2297. MouseDown(NEWKEY)
  2298. end)
  2299. Mouse.Button1Up:connect(function(NEWKEY)
  2300. MouseUp(NEWKEY)
  2301. end)
  2302. Mouse.KeyDown:connect(function(NEWKEY)
  2303. KeyDown(NEWKEY)
  2304. end)
  2305. Mouse.KeyUp:connect(function(NEWKEY)
  2306. KeyUp(NEWKEY)
  2307. end)
  2308.  
  2309. --//=================================\\
  2310. --\\=================================//
  2311.  
  2312.  
  2313. function unanchor()
  2314. if UNANCHOR == true then
  2315. g = Character:GetChildren()
  2316. for i = 1, #g do
  2317. if g[i].ClassName == "Part" then
  2318. g[i].Anchored = false
  2319. end
  2320. end
  2321. end
  2322. end
  2323.  
  2324.  
  2325. --//=================================\\
  2326. --|| WRAP THE WHOLE SCRIPT UP
  2327. --\\=================================//
  2328.  
  2329. Humanoid.Changed:connect(function(Jump)
  2330. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  2331. Humanoid.Jump = false
  2332. end
  2333. end)
  2334. Rooted = true
  2335. ANIMATE.Parent = nil
  2336. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  2337. IDLEANIMATION:Play()
  2338. Swait()
  2339. Rooted = false
  2340.  
  2341. local loop = 0
  2342.  
  2343. while true do
  2344. Swait()
  2345. SINE = SINE + CHANGE
  2346. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  2347. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  2348. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  2349. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  2350. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  2351. if ATTACK == false then
  2352. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2353. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2354. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  2355. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  2356. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2357. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2358. end
  2359. if #Effects2>0 then
  2360. for e=1,#Effects2 do
  2361. if Effects2[e]~=nil then
  2362. local Thing=Effects2[e]
  2363. if Thing~=nil then
  2364. local Part=Thing[1]
  2365. local Mode=Thing[2]
  2366. local Delay=Thing[3]
  2367. local IncX=Thing[4]
  2368. local IncY=Thing[5]
  2369. local IncZ=Thing[6]
  2370. local Part2=Thing[8]
  2371. if Thing[1].Transparency<=1 then
  2372. if Thing[2]=="Block1" then
  2373. Thing[1].CFrame=Part2.CFrame
  2374. Mesh=Thing[1].Mesh
  2375. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  2376. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2377. elseif Thing[2]=="Cylinder" then
  2378. Mesh=Thing[1].Mesh
  2379. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  2380. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2381. elseif Thing[2]=="Blood" then
  2382. Mesh=Thing[7]
  2383. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  2384. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  2385. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2386. elseif Thing[2]=="Elec" then
  2387. Mesh=Thing[1].Mesh
  2388. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  2389. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2390. elseif Thing[2]=="Disappear" then
  2391. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2392. end
  2393. else
  2394. Part.Parent=nil
  2395. table.remove(Effects2,e)
  2396. end
  2397. end
  2398. end
  2399. end
  2400. end
  2401. unanchor()
  2402. Humanoid.MaxHealth = "inf"
  2403. Humanoid.Health = "inf"
  2404. if Rooted == false then
  2405. Disable_Jump = false
  2406. Humanoid.WalkSpeed = Speed
  2407. elseif Rooted == true then
  2408. Disable_Jump = true
  2409. Humanoid.WalkSpeed = 0
  2410. end
  2411. if target ~= nil then
  2412. loop = loop + 1
  2413. if loop == 35 then
  2414. if target:FindFirstChild("HumanoidRootPart") then
  2415. CreateSound("161164363", target.HumanoidRootPart, 10, 1.1)
  2416. end
  2417. loop = 0
  2418. end
  2419. end
  2420. end
  2421.  
  2422. --//=================================\\
  2423. --\\=================================//
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429. --//====================================================\\--
  2430. --|| END OF SCRIPT
  2431. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement