Guest User

Untitled

a guest
Nov 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. warn'any options for magic'
  2. plr = game.Players.LocalPlayer
  3. char = plr.Character
  4. hum = char.Humanoid
  5. local cam = game.Workspace.CurrentCamera
  6. t = char.Torso
  7. h = char.Head
  8. ra = char["Right Arm"]
  9. la = char["Left Arm"]
  10. rl = char["Right Leg"]
  11. ll = char["Left Leg"]
  12. tors = char.Torso
  13. lleg = char["Left Leg"]
  14. root = char.HumanoidRootPart
  15. hed = char.Head
  16. rleg = char["Right Leg"]
  17. rarm = char["Right Arm"]
  18. larm = char["Left Arm"]
  19. vt = Vector3.new
  20. bc = BrickColor.new
  21. br = BrickColor.random
  22. it = Instance.new
  23. cf = CFrame.new
  24.  
  25.  
  26. gui = function(GuiType, parent, text, backtrans, backcol, pos, size)
  27. local gui = it(GuiType)
  28. gui.Parent = parent
  29. gui.Text = text
  30. gui.BackgroundTransparency = backtrans
  31. gui.BackgroundColor3 = backcol
  32. gui.SizeConstraint = "RelativeXY"
  33. gui.TextXAlignment = "Center"
  34. gui.TextYAlignment = "Center"
  35. gui.Position = pos
  36. gui.Size = size
  37. gui.Font = "SourceSans"
  38. gui.FontSize = "Size14"
  39. gui.TextWrapped = false
  40. gui.TextStrokeTransparency = 0
  41. gui.TextColor = BrickColor.new("White")
  42. return gui
  43. end
  44. ---- Music
  45. local s = Instance.new("Sound",char)
  46. s.SoundId = "http://www.roblox.com/asset/?id=335958739"
  47. s.Parent = char.Torso
  48. s.Pitch = 1
  49. s.Volume = 1
  50. s.Looped = true
  51. wait(0.1)
  52. s:play()
  53. ---- GUI set
  54. local basgui = it("GuiMain")
  55. basgui.Parent = plr.PlayerGui
  56. basgui.Name = "CooldownsGUI"
  57. local basframe = it("Frame")
  58. basframe.Parent = basgui
  59. basframe.BackgroundColor3 = Color3.new(255, 255, 255)
  60. basframe.BackgroundTransparency = 1
  61. basframe.BorderColor3 = Color3.new(17, 17, 17)
  62. basframe.Size = UDim2.new(0.2, 0, 0.2, 0)
  63. basframe.Position = UDim2.new(0.8, 0, 0.8, 0)
  64. local x = gui("TextLabel", basframe, "Basic", 0, BrickColor.new("Really black").Color, UDim2.new(-0.15, 0, 0.5, 0), UDim2.new(0.95, 0, 0.5, 0))
  65. x.ZIndex = 2
  66. x.Font = "Highway"
  67. x.BackgroundTransparency = 0.5
  68. x.BorderSizePixel = 0.65
  69. x.TextScaled = true
  70. x.Text = "Element: Greenlight"
  71. x.TextSize = 24
  72.  
  73. local Create = LoadLibrary("RbxUtility").Create
  74.  
  75. CFuncs = {
  76. ["Part"] = {
  77. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  78. local Part = Create("Part"){
  79. Parent = Parent,
  80. Reflectance = Reflectance,
  81. Transparency = Transparency,
  82. CanCollide = false,
  83. Locked = true,
  84. BrickColor = BrickColor.new(tostring(BColor)),
  85. Name = Name,
  86. Size = Size,
  87. Material = Material,
  88. }
  89. RemoveOutlines(Part)
  90. return Part
  91. end;
  92. };
  93.  
  94. ["Mesh"] = {
  95. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  96. local Msh = Create(Mesh){
  97. Parent = Part,
  98. Offset = OffSet,
  99. Scale = Scale,
  100. }
  101. if Mesh == "SpecialMesh" then
  102. Msh.MeshType = MeshType
  103. Msh.MeshId = MeshId
  104. end
  105. return Msh
  106. end;
  107. };
  108.  
  109. ["Mesh"] = {
  110. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  111. local Msh = Create(Mesh){
  112. Parent = Part,
  113. Offset = OffSet,
  114. Scale = Scale,
  115. }
  116. if Mesh == "SpecialMesh" then
  117. Msh.MeshType = MeshType
  118. Msh.MeshId = MeshId
  119. end
  120. return Msh
  121. end;
  122. };
  123.  
  124. ["Weld"] = {
  125. Create = function(Parent, Part0, Part1, C0, C1)
  126. local Weld = Create("Weld"){
  127. Parent = Parent,
  128. Part0 = Part0,
  129. Part1 = Part1,
  130. C0 = C0,
  131. C1 = C1,
  132. }
  133. return Weld
  134. end;
  135. };
  136.  
  137. ["Sound"] = {
  138. Create = function(id, par, vol, pit)
  139. coroutine.resume(coroutine.create(function()
  140. local S = Create("Sound"){
  141. Volume = vol,
  142. Pitch = pit or 1,
  143. SoundId = id,
  144. Parent = par or workspace,
  145. }
  146. wait()
  147. S:play()
  148. game:GetService("Debris"):AddItem(S, 10)
  149. end))
  150. end;
  151. };
  152.  
  153. ["ParticleEmitter"] = {
  154. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  155. local fp = Create("ParticleEmitter"){
  156. Parent = Parent,
  157. Color = ColorSequence.new(Color1, Color2),
  158. LightEmission = LightEmission,
  159. Size = Size,
  160. Texture = Texture,
  161. Transparency = Transparency,
  162. ZOffset = ZOffset,
  163. Acceleration = Accel,
  164. Drag = Drag,
  165. LockedToPart = LockedToPart,
  166. VelocityInheritance = VelocityInheritance,
  167. EmissionDirection = EmissionDirection,
  168. Enabled = Enabled,
  169. Lifetime = LifeTime,
  170. Rate = Rate,
  171. Rotation = Rotation,
  172. RotSpeed = RotSpeed,
  173. Speed = Speed,
  174. VelocitySpread = VelocitySpread,
  175. }
  176. return fp
  177. end;
  178. };
  179.  
  180. CreateTemplate = {
  181.  
  182. };
  183. }
  184.  
  185.  
  186.  
  187. New = function(Object, Parent, Name, Data)
  188. local Object = Instance.new(Object)
  189. for Index, Value in pairs(Data or {}) do
  190. Object[Index] = Value
  191. end
  192. Object.Parent = Parent
  193. Object.Name = Name
  194. return Object
  195. end
  196.  
  197. function Explode(rad,par,pitch,vol)
  198. local expart = Instance.new("Part",char)
  199. local expart2 = Instance.new("Part",char)
  200. local rin = Instance.new("Part",char)
  201. local rin2 = Instance.new("Part",char)
  202. local partMesh = Instance.new("SpecialMesh",expart)
  203. partMesh.MeshType = "Sphere"
  204. local partMesh2 = Instance.new("SpecialMesh",expart2)
  205. partMesh2.MeshType = "Sphere"
  206. local partMesh3 = Instance.new("SpecialMesh",rin)
  207. partMesh3.MeshType = "Sphere"
  208. local partMesh4 = Instance.new("SpecialMesh",rin2)
  209. partMesh4.MeshType = "Sphere"
  210. CFuncs["Sound"].Create("rbxassetid://165970126", expart,vol, pitch)
  211. partMesh.Scale = vt(rad,rad,rad)
  212. expart.Size = vt(1,1,1)
  213. expart.Transparency = 0
  214. expart.Anchored = true
  215. expart.Material = "Neon"
  216. expart.BrickColor = bc("White")
  217. expart.CFrame = par.CFrame
  218. partMesh2.Scale = vt(rad,rad,rad)
  219. expart2.Size = vt(1.15,1.15,1.15)
  220. expart2.Transparency = 0.5
  221. expart2.Anchored = true
  222. expart2.Material = "Neon"
  223. expart2.BrickColor = par.BrickColor
  224. expart2.CFrame = par.CFrame
  225. rin.Size = vt(1.15,1.15,1.15)
  226. rin.Transparency = 0.75
  227. rin.Anchored = true
  228. rin.Material = "Neon"
  229. rin.BrickColor = par.BrickColor
  230. rin.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  231. rin2.Size = vt(1.15,1.15,1.15)
  232. rin2.Transparency = 0.75
  233. rin2.Anchored = true
  234. rin2.Material = "Neon"
  235. rin2.BrickColor = par.BrickColor
  236. rin2.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  237. local hitbox = Instance.new("Part",char)
  238. hitbox.Size = Vector3.new(1,1,1)
  239. hitbox.CFrame = par.CFrame
  240. hitbox.Anchored = true
  241. hitbox.Transparency = 1
  242. hitbox.CanCollide = false
  243. partMesh3.Scale = vt(0,1,0)
  244. partMesh4.Scale = vt(0,1,0)
  245. expart.CanCollide = false
  246. expart2.CanCollide = false
  247. rin.CanCollide = false
  248. rin2.CanCollide = false
  249. hitbox.Touched:connect(function(hit)
  250. Damagefunc(hit,5,10,math.random(50,100),"Normal",root,.2,1)
  251. end)
  252. game:GetService("Debris"):AddItem(hitbox, 3)
  253. local value = 1*rad/6.5
  254. for i = 0, 199 do
  255. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  256. expart.CFrame = expart.CFrame
  257. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  258. hitbox.CFrame = expart.CFrame
  259. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  260. expart2.CFrame = expart.CFrame
  261. value = value - 0.035*rad/30
  262. if value < 7.5 then
  263. partMesh3.Scale = partMesh3.Scale + vt(rad/5,0,rad/5)
  264. rin.CFrame = rin.CFrame
  265. partMesh4.Scale = partMesh4.Scale + vt(rad/7.5,0,rad/7.5)
  266. rin2.CFrame = rin2.CFrame
  267. end
  268. if value < 0 then
  269. expart.Transparency = expart.Transparency + 0.025
  270. expart2.Transparency = expart2.Transparency + 0.025
  271. rin.Transparency = rin.Transparency + 0.025
  272. rin2.Transparency = rin2.Transparency + 0.025
  273. end
  274. swait()
  275. end
  276. game:GetService("Debris"):AddItem(expart, 1)
  277. game:GetService("Debris"):AddItem(expart2, 1)
  278. game:GetService("Debris"):AddItem(rin, 1)
  279. game:GetService("Debris"):AddItem(rin2, 1)
  280. end
  281.  
  282. function ExplodeShort(rad,par,pitch,vol)
  283. local expart = Instance.new("Part",char)
  284. local expart2 = Instance.new("Part",char)
  285. local partMesh = Instance.new("SpecialMesh",expart)
  286. partMesh.MeshType = "Sphere"
  287. local partMesh2 = Instance.new("SpecialMesh",expart2)
  288. partMesh2.MeshType = "Sphere"
  289. CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127", expart,vol, pitch)
  290. partMesh.Scale = vt(rad,rad,rad)
  291. expart.Size = vt(1,1,1)
  292. expart.Transparency = 0
  293. expart.Anchored = true
  294. expart.Material = "Neon"
  295. expart.BrickColor = bc("White")
  296. expart.CFrame = par.CFrame
  297. partMesh2.Scale = vt(rad,rad,rad)
  298. expart2.Size = vt(1.15,1.15,1.15)
  299. expart2.Transparency = 0.5
  300. expart2.Anchored = true
  301. expart2.Material = "Neon"
  302. expart2.BrickColor = par.BrickColor
  303. expart2.CFrame = par.CFrame
  304. expart.CanCollide = false
  305. expart2.CanCollide = false
  306. local hitbox = Instance.new("Part",char)
  307. hitbox.Size = Vector3.new(1,1,1)
  308. hitbox.CFrame = par.CFrame
  309. hitbox.Anchored = true
  310. hitbox.Transparency = 1
  311. hitbox.CanCollide = false
  312.  
  313. hitbox.Touched:connect(function(hit)
  314. Damagefunc(hit,5,10,math.random(10,20),"Normal",root,.2,1)
  315. end)
  316. game:GetService("Debris"):AddItem(hitbox, 1)
  317. local value = 1*rad/6.5
  318. for i = 0, 75 do
  319. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  320. expart.CFrame = expart.CFrame
  321. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  322. hitbox.CFrame = expart.CFrame
  323. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  324. expart2.CFrame = expart.CFrame
  325. value = value - 0.035*rad/5
  326. if value < 0 then
  327. value = 0
  328. expart.Transparency = expart.Transparency + 0.05
  329. expart2.Transparency = expart2.Transparency + 0.05
  330. end
  331. swait()
  332. end
  333. game:GetService("Debris"):AddItem(expart, 1)
  334. game:GetService("Debris"):AddItem(expart2, 1)
  335. end
  336.  
  337. function PulseDam(rad,par,col)
  338. local expart = Instance.new("Part",char)
  339. local expart2 = Instance.new("Part",char)
  340. local partMesh = Instance.new("SpecialMesh",expart)
  341. partMesh.MeshType = "Sphere"
  342. local partMesh2 = Instance.new("SpecialMesh",expart2)
  343. partMesh2.MeshType = "Sphere"
  344. partMesh.Scale = vt(rad,rad,rad)
  345. expart.Size = vt(1,1,1)
  346. expart.Transparency = 0
  347. expart.Anchored = true
  348. expart.Material = "Neon"
  349. expart.BrickColor = bc("White")
  350. expart.CFrame = par.CFrame
  351. partMesh2.Scale = vt(rad,rad,rad)
  352. expart2.Size = vt(1.15,1.15,1.15)
  353. expart2.Transparency = 0.5
  354. expart2.Anchored = true
  355. expart2.Material = "Neon"
  356. expart2.BrickColor = col
  357. expart2.CFrame = par.CFrame
  358. expart.CanCollide = false
  359. expart2.CanCollide = false
  360. local hitbox = Instance.new("Part",char)
  361. hitbox.Size = Vector3.new(1,1,1)
  362. hitbox.CFrame = par.CFrame
  363. hitbox.Anchored = true
  364. hitbox.Transparency = 1
  365. hitbox.CanCollide = false
  366.  
  367. hitbox.Touched:connect(function(hit)
  368. Damagefunc(hit,10,15,1,"Normal",root,.2,1)
  369. end)
  370. local value = 1*rad/10
  371. for i = 0, 34 do
  372. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  373. expart.CFrame = expart.CFrame
  374. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  375. hitbox.CFrame = expart.CFrame
  376. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  377. expart2.CFrame = expart.CFrame
  378. value = value - 0.035*rad/10
  379. if value < 0 then
  380. value = 0
  381. end
  382. swait()
  383. end
  384. for z = 0, 4 do
  385. CFuncs["Sound"].Create("rbxassetid://203691467", expart, 1, 0.25)
  386. for i = 0, 24 do
  387. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  388. expart.CFrame = expart.CFrame
  389. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  390. hitbox.CFrame = expart.CFrame
  391. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  392. expart2.CFrame = expart.CFrame
  393. value = value - 0.035*rad/10
  394. swait()
  395. end
  396. for i = 0, 49 do
  397. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  398. expart.CFrame = expart.CFrame
  399. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  400. hitbox.CFrame = expart.CFrame
  401. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  402. expart2.CFrame = expart.CFrame
  403. value = value + 0.035*rad/10
  404. swait()
  405. end
  406. CFuncs["Sound"].Create("rbxassetid://203691467", expart, 1, 0.25)
  407. for i = 0, 24 do
  408. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  409. expart.CFrame = expart.CFrame
  410. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  411. hitbox.CFrame = expart.CFrame
  412. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  413. expart2.CFrame = expart.CFrame
  414. value = value - 0.035*rad/10
  415. swait()
  416. end
  417. end
  418. for i = 0, 75 do
  419. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  420. expart.CFrame = expart.CFrame
  421. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  422. hitbox.CFrame = expart.CFrame
  423. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  424. expart2.CFrame = expart.CFrame
  425. value = value - 0.035*rad/10
  426. if value < 0 then
  427. expart.Transparency = expart.Transparency + 0.025
  428. expart2.Transparency = expart2.Transparency + 0.025
  429. end
  430. swait()
  431. end
  432. game:GetService("Debris"):AddItem(hitbox, 0.1)
  433. game:GetService("Debris"):AddItem(expart, 1)
  434. game:GetService("Debris"):AddItem(expart2, 1)
  435. end
  436.  
  437.  
  438. function PulseShort(rad,par,col,times)
  439. local expart = Instance.new("Part",char)
  440. local expart2 = Instance.new("Part",char)
  441. local partMesh = Instance.new("SpecialMesh",expart)
  442. partMesh.MeshType = "Sphere"
  443. local partMesh2 = Instance.new("SpecialMesh",expart2)
  444. partMesh2.MeshType = "Sphere"
  445. partMesh.Scale = vt(rad,rad,rad)
  446. expart.Size = vt(1,1,1)
  447. expart.Transparency = 0
  448. expart.Anchored = true
  449. expart.Material = "Neon"
  450. expart.BrickColor = bc("White")
  451. expart.CFrame = par.CFrame
  452. partMesh2.Scale = vt(rad,rad,rad)
  453. expart2.Size = vt(1.15,1.15,1.15)
  454. expart2.Transparency = 0.5
  455. expart2.Anchored = true
  456. expart2.Material = "Neon"
  457. expart2.BrickColor = col
  458. expart2.CFrame = par.CFrame
  459. expart.CanCollide = false
  460. expart2.CanCollide = false
  461. local value = 1*rad/10
  462. for i = 0, 34 do
  463. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  464. expart.CFrame = expart.CFrame
  465. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  466. expart2.CFrame = expart.CFrame
  467. value = value - 0.035*rad/10
  468. if value < 0 then
  469. value = 0
  470. end
  471. swait()
  472. end
  473. for z = 0, times do
  474. for i = 0, 24 do
  475. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  476. expart.CFrame = expart.CFrame
  477. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  478. expart2.CFrame = expart.CFrame
  479. value = value - 0.035*rad/10
  480. swait()
  481. end
  482. for i = 0, 49 do
  483. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  484. expart.CFrame = expart.CFrame
  485. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  486. expart2.CFrame = expart.CFrame
  487. value = value + 0.035*rad/10
  488. swait()
  489. end
  490. for i = 0, 24 do
  491. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  492. expart.CFrame = expart.CFrame
  493. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  494. expart2.CFrame = expart.CFrame
  495. value = value - 0.035*rad/10
  496. swait()
  497. end
  498. end
  499. for i = 0, 75 do
  500. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  501. expart.CFrame = expart.CFrame
  502. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  503. expart2.CFrame = expart.CFrame
  504. value = value - 0.035*rad/10
  505. if value < 0 then
  506. expart.Transparency = expart.Transparency + 0.025
  507. expart2.Transparency = expart2.Transparency + 0.025
  508. end
  509. swait()
  510. end
  511. game:GetService("Debris"):AddItem(expart, 1)
  512. game:GetService("Debris"):AddItem(expart2, 1)
  513. end
  514.  
  515.  
  516.  
  517. function ExplodeLong(rad,par,pitch,vol)
  518. local expart = Instance.new("Part",char)
  519. local expart2 = Instance.new("Part",char)
  520. local partMesh = Instance.new("SpecialMesh",expart)
  521. partMesh.MeshType = "Sphere"
  522. local partMesh2 = Instance.new("SpecialMesh",expart2)
  523. partMesh2.MeshType = "Sphere"
  524. CFuncs["Sound"].Create("rbxassetid://165970126", char, vol, pitch)
  525. expart.Size = vt(1,1,1)
  526. expart.Transparency = 0
  527. expart.Anchored = true
  528. expart.Material = "Neon"
  529. expart.BrickColor = bc("White")
  530. expart.CFrame = par.CFrame
  531. expart2.Size = vt(1.15,1.15,1.15)
  532. expart2.Transparency = 0.5
  533. expart2.Anchored = true
  534. expart2.Material = "Neon"
  535. expart2.BrickColor = par.BrickColor
  536. expart2.CFrame = par.CFrame
  537. expart.CanCollide = false
  538. expart2.CanCollide = false
  539. local hitbox = Instance.new("Part",char)
  540. hitbox.Size = Vector3.new(1,1,1)
  541. hitbox.CFrame = par.CFrame
  542. hitbox.Anchored = true
  543. hitbox.Transparency = 1
  544. hitbox.CanCollide = false
  545. hitbox.Touched:connect(function(hit)
  546. Damagefunc(hit,50,75,math.random(50,100),"Normal",root,.2,1)
  547. end)
  548. game:GetService("Debris"):AddItem(hitbox, 3)
  549. local value = 1*rad/6.5
  550. for i = 0, 175 do
  551. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  552. expart.CFrame = expart.CFrame
  553. hitbox.Size = hitbox.Size + Vector3.new(value*1.5,value*1.5,value*1.5)
  554. hitbox.CFrame = expart.CFrame
  555. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  556. expart2.CFrame = expart.CFrame
  557. value = value - 0.035*rad/30
  558. if value < 0 then
  559. expart.Transparency = expart.Transparency + 0.025
  560. expart2.Transparency = expart2.Transparency + 0.025
  561. end
  562. swait()
  563. end
  564. game:GetService("Debris"):AddItem(expart, 1)
  565. game:GetService("Debris"):AddItem(expart2, 1)
  566. end
  567.  
  568. local m = Instance.new("Model",char)
  569.  
  570. function CreatePart(parent,transparency,reflectance,material,brickcolor)
  571. local p = Instance.new("Part")
  572. p.Parent = parent
  573. p.Size = Vector3.new(1,1,1)
  574. p.Transparency = transparency
  575. p.Reflectance = reflectance
  576. p.CanCollide = false
  577. p.Locked = true
  578. p.BrickColor = brickcolor
  579. p.Material = material
  580. return p
  581. end
  582.  
  583. function CreateMesh(parent,meshtype,x1,y1,z1)
  584. local mesh = Instance.new("SpecialMesh",parent)
  585. mesh.MeshType = meshtype
  586. mesh.Scale = Vector3.new(x1,y1,z1)
  587. return mesh
  588. end
  589.  
  590. function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
  591. local mesh = Instance.new("SpecialMesh",parent)
  592. mesh.MeshType = "FileMesh"
  593. mesh.MeshId = meshid
  594. mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
  595. mesh.Scale = Vector3.new(x1,y1,z1)
  596. mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
  597. return mesh
  598. end
  599.  
  600. function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
  601. local weld = Instance.new("Weld")
  602. weld.Parent = parent
  603. weld.Part0 = part0
  604. weld.Part1 = part1
  605. weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
  606. weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
  607. return weld
  608. end
  609.  
  610.  
  611. local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
  612. CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  613. local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
  614. CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  615.  
  616. Player=game:GetService("Players").LocalPlayer
  617. Character=Player.Character
  618. PlayerGui=Player.PlayerGui
  619. Backpack=Player.Backpack
  620. Torso=Character.Torso
  621. Head=Character.Head
  622. Humanoid=Character.Humanoid
  623. m=Instance.new('Model',Character)
  624. LeftArm=Character["Left Arm"]
  625. LeftLeg=Character["Left Leg"]
  626. RightArm=Character["Right Arm"]
  627. RightLeg=Character["Right Leg"]
  628. LS=Torso["Left Shoulder"]
  629. LH=Torso["Left Hip"]
  630. RS=Torso["Right Shoulder"]
  631. RH=Torso["Right Hip"]
  632. Face = Head.face
  633. Neck=Torso.Neck
  634. it=Instance.new
  635. attacktype=1
  636. vt=Vector3.new
  637. cf=CFrame.new
  638. euler=CFrame.fromEulerAnglesXYZ
  639. angles=CFrame.Angles
  640. cloaked=false
  641. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  642. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  643. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  644. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  645. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  646. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  647. RootPart=Character.HumanoidRootPart
  648. RootJoint=RootPart.RootJoint
  649. RootCF=euler(-1.57,0,3.14)
  650. attack = false
  651. attackdebounce = false
  652. deb=false
  653. equipped=true
  654. hand=false
  655. MMouse=nil
  656. combo=0
  657. mana=0
  658. trispeed=.2
  659. attackmode='none'
  660. local idle=0
  661. local Anim="Idle"
  662. local Effects={}
  663. local gun=false
  664. local shoot=false
  665. local sine = 0
  666. local change = 1
  667. player=nil
  668.  
  669. mouse=Player:GetMouse()
  670. --save shoulders
  671. RSH, LSH=nil, nil
  672. --welds
  673. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  674. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  675. LH=Torso["Left Hip"]
  676. RH=Torso["Right Hip"]
  677. TorsoColor=Torso.BrickColor
  678. function NoOutline(Part)
  679. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  680. end
  681. player=Player
  682. ch=Character
  683. RSH=ch.Torso["Right Shoulder"]
  684. LSH=ch.Torso["Left Shoulder"]
  685. --
  686. RSH.Parent=nil
  687. LSH.Parent=nil
  688. --
  689. RW.Name="Right Shoulder"
  690. RW.Part0=ch.Torso
  691. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  692. RW.C1=cf(0, 0.5, 0)
  693. RW.Part1=ch["Right Arm"]
  694. RW.Parent=ch.Torso
  695. --
  696. LW.Name="Left Shoulder"
  697. LW.Part0=ch.Torso
  698. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  699. LW.C1=cf(0, 0.5, 0)
  700. LW.Part1=ch["Left Arm"]
  701. LW.Parent=ch.Torso
  702.  
  703. local Stats=Instance.new("BoolValue")
  704. Stats.Name="Stats"
  705. Stats.Parent=Character
  706. local Atk=Instance.new("NumberValue")
  707. Atk.Name="Damage"
  708. Atk.Parent=Stats
  709. Atk.Value=1
  710. local Def=Instance.new("NumberValue")
  711. Def.Name="Defense"
  712. Def.Parent=Stats
  713. Def.Value=1
  714. local Speed=Instance.new("NumberValue")
  715. Speed.Name="Speed"
  716. Speed.Parent=Stats
  717. Speed.Value=1
  718. local Mvmt=Instance.new("NumberValue")
  719. Mvmt.Name="Movement"
  720. Mvmt.Parent=Stats
  721. Mvmt.Value=1
  722.  
  723. local donum=0
  724.  
  725.  
  726. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  727. local fp=it("Part")
  728. fp.formFactor=formfactor
  729. fp.Parent=parent
  730. fp.Reflectance=reflectance
  731. fp.Transparency=transparency
  732. fp.CanCollide=false
  733. fp.Locked=true
  734. fp.BrickColor=brickcolor
  735. fp.Name=name
  736. fp.Size=size
  737. fp.Position=Torso.Position
  738. NoOutline(fp)
  739. fp.Material="SmoothPlastic"
  740. fp:BreakJoints()
  741. return fp
  742. end
  743.  
  744. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  745. local mesh=it(Mesh)
  746. mesh.Parent=part
  747. if Mesh=="SpecialMesh" then
  748. mesh.MeshType=meshtype
  749. if meshid~="nil" then
  750. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  751. end
  752. end
  753. mesh.Offset=offset
  754. mesh.Scale=scale
  755. return mesh
  756. end
  757.  
  758. function weld(parent,part0,part1,c0)
  759. local weld=it("Weld")
  760. weld.Parent=parent
  761. weld.Part0=part0
  762. weld.Part1=part1
  763. weld.C0=c0
  764. return weld
  765. end
  766.  
  767. local Color1=Torso.BrickColor
  768.  
  769. local bodvel=Instance.new("BodyVelocity")
  770. local bg=Instance.new("BodyGyro")
  771.  
  772. function swait(num)
  773. if num==0 or num==nil then
  774. game:service'RunService'.Stepped:wait(0)
  775. else
  776. for i=0,num do
  777. game:service'RunService'.Stepped:wait(0)
  778. end
  779. end
  780. end
  781.  
  782.  
  783. so = function(id,par,vol,pit)
  784. coroutine.resume(coroutine.create(function()
  785. local sou = Instance.new("Sound",par or workspace)
  786. sou.Volume=vol
  787. sou.Pitch=pit or 1
  788. sou.SoundId=id
  789. swait()
  790. sou:play()
  791. game:GetService("Debris"):AddItem(sou,6)
  792. end))
  793. end
  794.  
  795. function clerp(a,b,t)
  796. local qa = {QuaternionFromCFrame(a)}
  797. local qb = {QuaternionFromCFrame(b)}
  798. local ax, ay, az = a.x, a.y, a.z
  799. local bx, by, bz = b.x, b.y, b.z
  800. local _t = 1-t
  801. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  802. end
  803.  
  804. function QuaternionFromCFrame(cf)
  805. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  806. local trace = m00 + m11 + m22
  807. if trace > 0 then
  808. local s = math.sqrt(1 + trace)
  809. local recip = 0.5/s
  810. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  811. else
  812. local i = 0
  813. if m11 > m00 then
  814. i = 1
  815. end
  816. if m22 > (i == 0 and m00 or m11) then
  817. i = 2
  818. end
  819. if i == 0 then
  820. local s = math.sqrt(m00-m11-m22+1)
  821. local recip = 0.5/s
  822. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  823. elseif i == 1 then
  824. local s = math.sqrt(m11-m22-m00+1)
  825. local recip = 0.5/s
  826. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  827. elseif i == 2 then
  828. local s = math.sqrt(m22-m00-m11+1)
  829. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  830. end
  831. end
  832. end
  833.  
  834. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  835. local xs, ys, zs = x + x, y + y, z + z
  836. local wx, wy, wz = w*xs, w*ys, w*zs
  837. local xx = x*xs
  838. local xy = x*ys
  839. local xz = x*zs
  840. local yy = y*ys
  841. local yz = y*zs
  842. local zz = z*zs
  843. 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))
  844. end
  845.  
  846. function QuaternionSlerp(a, b, t)
  847. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  848. local startInterp, finishInterp;
  849. if cosTheta >= 0.0001 then
  850. if (1 - cosTheta) > 0.0001 then
  851. local theta = math.acos(cosTheta)
  852. local invSinTheta = 1/math.sin(theta)
  853. startInterp = math.sin((1-t)*theta)*invSinTheta
  854. finishInterp = math.sin(t*theta)*invSinTheta
  855. else
  856. startInterp = 1-t
  857. finishInterp = t
  858. end
  859. else
  860. if (1+cosTheta) > 0.0001 then
  861. local theta = math.acos(-cosTheta)
  862. local invSinTheta = 1/math.sin(theta)
  863. startInterp = math.sin((t-1)*theta)*invSinTheta
  864. finishInterp = math.sin(t*theta)*invSinTheta
  865. else
  866. startInterp = t-1
  867. finishInterp = t
  868. end
  869. end
  870. 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
  871. end
  872.  
  873. local function CFrameFromTopBack(at, top, back)
  874. local right = top:Cross(back)
  875. return CFrame.new(at.x, at.y, at.z,
  876. right.x, top.x, back.x,
  877. right.y, top.y, back.y,
  878. right.z, top.z, back.z)
  879. end
  880.  
  881. function Triangle(a, b, c)
  882. local edg1 = (c-a):Dot((b-a).unit)
  883. local edg2 = (a-b):Dot((c-b).unit)
  884. local edg3 = (b-c):Dot((a-c).unit)
  885. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  886. a, b, c = a, b, c
  887. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  888. a, b, c = b, c, a
  889. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  890. a, b, c = c, a, b
  891. else
  892. assert(false, "unreachable")
  893. end
  894.  
  895. local len1 = (c-a):Dot((b-a).unit)
  896. local len2 = (b-a).magnitude - len1
  897. local width = (a + (b-a).unit*len1 - c).magnitude
  898.  
  899. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  900.  
  901. local list = {}
  902.  
  903. if len1 > 0.01 then
  904. local w1 = Instance.new('WedgePart', m)
  905. game:GetService("Debris"):AddItem(w1,5)
  906. w1.Material = "SmoothPlastic"
  907. w1.FormFactor = 'Custom'
  908. w1.BrickColor = BrickColor.new("Really red")
  909. w1.Transparency = 0
  910. w1.Reflectance = 0
  911. w1.Material = "SmoothPlastic"
  912. w1.CanCollide = false
  913. local l1 = Instance.new("PointLight",w1)
  914. l1.Color = Color3.new(170,0,0)
  915. NoOutline(w1)
  916. local sz = Vector3.new(0.2, width, len1)
  917. w1.Size = sz
  918. local sp = Instance.new("SpecialMesh",w1)
  919. sp.MeshType = "Wedge"
  920. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  921. w1:BreakJoints()
  922. w1.Anchored = true
  923. w1.Parent = workspace
  924. w1.Transparency = 0.7
  925. table.insert(Effects,{w1,"Disappear",.01})
  926. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  927. table.insert(list,w1)
  928. end
  929.  
  930. if len2 > 0.01 then
  931. local w2 = Instance.new('WedgePart', m)
  932. game:GetService("Debris"):AddItem(w2,5)
  933. w2.Material = "SmoothPlastic"
  934. w2.FormFactor = 'Custom'
  935. w2.BrickColor = BrickColor.new("Really red")
  936. w2.Transparency = 0
  937. w2.Reflectance = 0
  938. w2.Material = "SmoothPlastic"
  939. w2.CanCollide = false
  940. local l2 = Instance.new("PointLight",w2)
  941. l2.Color = Color3.new(170,0,0)
  942. NoOutline(w2)
  943. local sz = Vector3.new(0.2, width, len2)
  944. w2.Size = sz
  945. local sp = Instance.new("SpecialMesh",w2)
  946. sp.MeshType = "Wedge"
  947. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  948. w2:BreakJoints()
  949. w2.Anchored = true
  950. w2.Parent = workspace
  951. w2.Transparency = 0.7
  952. table.insert(Effects,{w2,"Disappear",.01})
  953. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  954. table.insert(list,w2)
  955. end
  956. return unpack(list)
  957. end
  958.  
  959.  
  960. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  961. if hit.Parent==nil then
  962. return
  963. end
  964. h=hit.Parent:FindFirstChild("Humanoid")
  965. for _,v in pairs(hit.Parent:children()) do
  966. if v:IsA("Humanoid") then
  967. h=v
  968. end
  969. end
  970. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  971. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  972. end
  973. if hit.Parent.className=="Hat" then
  974. hit=hit.Parent.Parent:findFirstChild("Head")
  975. end
  976. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  977. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  978. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  979. return
  980. end]]
  981. -- hs(hit,1.2)
  982. c=Instance.new("ObjectValue")
  983. c.Name="creator"
  984. c.Value=game:service("Players").LocalPlayer
  985. c.Parent=h
  986. game:GetService("Debris"):AddItem(c,.5)
  987. Damage=math.random(minim,maxim)
  988. -- h:TakeDamage(Damage)
  989. blocked=false
  990. block=hit.Parent:findFirstChild("Block")
  991. if block~=nil then
  992. print(block.className)
  993. if block.className=="NumberValue" then
  994. if block.Value>0 then
  995. blocked=true
  996. if decreaseblock==nil then
  997. block.Value=block.Value-1
  998. end
  999. end
  1000. end
  1001. if block.className=="IntValue" then
  1002. if block.Value>0 then
  1003. blocked=true
  1004. if decreaseblock~=nil then
  1005. block.Value=block.Value-1
  1006. end
  1007. end
  1008. end
  1009. end
  1010. if blocked==false then
  1011. -- h:TakeDamage(Damage)
  1012. h.Health=h.Health-Damage
  1013. showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red"))
  1014. else
  1015. h.Health=h.Health-(Damage/2)
  1016. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1017. end
  1018. if Type=="Knockdown" then
  1019. hum=hit.Parent.Humanoid
  1020. hum.PlatformStand=true
  1021. coroutine.resume(coroutine.create(function(HHumanoid)
  1022. swait(1)
  1023. HHumanoid.PlatformStand=false
  1024. end),hum)
  1025. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1026. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1027. local bodvol=Instance.new("BodyVelocity")
  1028. bodvol.velocity=angle*knockback
  1029. bodvol.P=5000
  1030. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1031. bodvol.Parent=hit
  1032. rl=Instance.new("BodyAngularVelocity")
  1033. rl.P=3000
  1034. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1035. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1036. rl.Parent=hit
  1037. game:GetService("Debris"):AddItem(bodvol,.5)
  1038. game:GetService("Debris"):AddItem(rl,.5)
  1039. elseif Type=="Normal" then
  1040. vp=Instance.new("BodyVelocity")
  1041. vp.P=500
  1042. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1043. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1044. if KnockbackType==1 then
  1045. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1046. elseif KnockbackType==2 then
  1047. vp.velocity=Property.CFrame.lookVector*knockback
  1048. end
  1049. if knockback>0 then
  1050. vp.Parent=hit.Parent.Torso
  1051. end
  1052. game:GetService("Debris"):AddItem(vp,.5)
  1053. elseif Type=="Up" then
  1054. local bodyVelocity=Instance.new("BodyVelocity")
  1055. bodyVelocity.velocity=vt(0,60,0)
  1056. bodyVelocity.P=5000
  1057. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1058. bodyVelocity.Parent=hit
  1059. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1060. rl=Instance.new("BodyAngularVelocity")
  1061. rl.P=3000
  1062. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1063. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  1064. rl.Parent=hit
  1065. game:GetService("Debris"):AddItem(rl,.5)
  1066. elseif Type=="Snare" then
  1067. bp=Instance.new("BodyPosition")
  1068. bp.P=2000
  1069. bp.D=100
  1070. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1071. bp.position=hit.Parent.Torso.Position
  1072. bp.Parent=hit.Parent.Torso
  1073. game:GetService("Debris"):AddItem(bp,1)
  1074. elseif Type=="Target" then
  1075. if Targetting==false then
  1076. ZTarget=hit.Parent.Torso
  1077. coroutine.resume(coroutine.create(function(Part)
  1078. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1079. swait(5)
  1080. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1081. end),ZTarget)
  1082. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  1083. targetgui=Instance.new("BillboardGui")
  1084. targetgui.Parent=ZTarget
  1085. targetgui.Size=UDim2.new(10,100,10,100)
  1086. targ=Instance.new("ImageLabel")
  1087. targ.Parent=targetgui
  1088. targ.BackgroundTransparency=1
  1089. targ.Image="rbxassetid://4834067"
  1090. targ.Size=UDim2.new(1,0,1,0)
  1091. cam.CameraType="Scriptable"
  1092. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1093. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1094. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1095. Targetting=true
  1096. RocketTarget=ZTarget
  1097. for i=1,Property do
  1098. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  1099. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  1100. swait()
  1101. end
  1102. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  1103. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1104. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1105. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  1106. end
  1107. Targetting=false
  1108. RocketTarget=nil
  1109. targetgui.Parent=nil
  1110. cam.CameraType="Custom"
  1111. end
  1112. end
  1113. debounce=Instance.new("BoolValue")
  1114. debounce.Name="DebounceHit"
  1115. debounce.Parent=hit.Parent
  1116. debounce.Value=true
  1117. game:GetService("Debris"):AddItem(debounce,Delay)
  1118. c=Instance.new("ObjectValue")
  1119. c.Name="creator"
  1120. c.Value=Player
  1121. c.Parent=h
  1122. game:GetService("Debris"):AddItem(c,.5)
  1123. CRIT=false
  1124. hitDeb=true
  1125. AttackPos=6
  1126. end
  1127. end
  1128.  
  1129. showDamage=function(Char,Dealt,du,Color)
  1130. m=Instance.new("Model")
  1131. m.Name=tostring(Dealt)
  1132. h=Instance.new("Humanoid")
  1133. h.Health=0
  1134. h.MaxHealth=0
  1135. h.Parent=m
  1136. c=Instance.new("Part")
  1137. c.Transparency=0
  1138. c.BrickColor=Color
  1139. c.Transparency = 1
  1140. c.Name="Head"
  1141. c.TopSurface=0
  1142. c.BottomSurface=0
  1143. c.formFactor="Plate"
  1144. c.Size=Vector3.new(1,.4,1)
  1145.  
  1146. local txt = Instance.new("BillboardGui", c)
  1147. txt.Adornee = c
  1148. txt.Name = "_status"
  1149. txt.Size = UDim2.new(2, 0, 1.2, 0)
  1150. txt.StudsOffset = Vector3.new(-9, 8, 0)
  1151. local text = Instance.new("TextLabel", txt)
  1152. text.Size = UDim2.new(10, 0, 7, 0)
  1153. text.FontSize = "Size12"
  1154. text.TextScaled = true
  1155. text.TextTransparency = 0.5
  1156. text.BackgroundTransparency = 1
  1157. text.TextTransparency = 0.5
  1158. text.TextStrokeTransparency = 0.5
  1159. text.Font = "SciFi"
  1160. text.TextStrokeColor3 = Color3.new(0,0,0)
  1161. v=Instance.new("Part")
  1162. v.Name = "ColorBrick"
  1163. v.Parent=c
  1164. v.FormFactor="Symmetric"
  1165. v.Anchored=true
  1166. v.CanCollide=false
  1167. v.BottomSurface="Smooth"
  1168. v.TopSurface="Smooth"
  1169. v.Size=Vector3.new(10,5,3)
  1170. v.Transparency=1
  1171. v.CFrame=c.CFrame
  1172. v.BrickColor=BrickColor.random()
  1173. v.Transparency=1
  1174. text.TextColor3 = t.BrickColor.Color
  1175. v.Shape="Block"
  1176. text.Text = tostring(Dealt)
  1177. ms=Instance.new("CylinderMesh")
  1178. ms.Scale=Vector3.new(.8,.8,.8)
  1179. --[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  1180. local rndm=math.random(1,#hitsounds)
  1181. local r=rndm
  1182. CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]--
  1183. if CRIT==true then
  1184. ms.Scale=Vector3.new(1,1.25,1)
  1185. end
  1186. ms.Parent=c
  1187. c.Reflectance=0
  1188. Instance.new("BodyGyro").Parent=c
  1189. c.Parent=m
  1190. if Char:findFirstChild("Head")~=nil then
  1191. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1192. elseif Char.Parent:findFirstChild("Head")~=nil then
  1193. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1194. end
  1195. f=Instance.new("BodyPosition")
  1196. f.P=2000
  1197. f.D=100
  1198. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1199. f.position=c.Position+Vector3.new(0,3,0)
  1200. f.Parent=c
  1201. game:GetService("Debris"):AddItem(m,.5+du)
  1202. c.CanCollide=false
  1203. m.Parent=workspace
  1204. c.CanCollide=false
  1205. end
  1206.  
  1207. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1208. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1209. end
  1210.  
  1211. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  1212. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1213. prt.Anchored=true
  1214. prt.CFrame=cframe
  1215. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  1216. --http://www.roblox.com/asset/?id=4770560
  1217. game:GetService("Debris"):AddItem(prt,2)
  1218. CF=prt.CFrame
  1219. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  1220. for i=0,1,0.2 do
  1221. wait()
  1222. Part.CFrame=CF*cf(0,0,-0.4)
  1223. end
  1224. for i=0,1,delay do
  1225. wait()
  1226. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  1227. Mesh.Scale=Mesh.Scale
  1228. end
  1229. for i=0,1,0.1 do
  1230. wait()
  1231. Part.Transparency=i
  1232. end
  1233. Part.Parent=nil
  1234. end),prt,msh,CF)
  1235. end
  1236.  
  1237. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1238. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1239. prt.Anchored=true
  1240. prt.Material = "Neon"
  1241. prt.CFrame=cframe
  1242. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1243. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1244. game:GetService("Debris"):AddItem(prt,5)
  1245. coroutine.resume(coroutine.create(function(Part,Mesh)
  1246. for i=0,1,delay do
  1247. swait()
  1248. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1249. Part.Transparency=i
  1250. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1251. end
  1252. Part.Parent=nil
  1253. end),prt,msh)
  1254. end
  1255.  
  1256. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1257. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1258. prt.Anchored=true
  1259. prt.Material = "Neon"
  1260. prt.CFrame=cframe
  1261. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1262. game:GetService("Debris"):AddItem(prt,5)
  1263. coroutine.resume(coroutine.create(function(Part,Mesh)
  1264. local rtype = rottype
  1265. for i=0,1,delay do
  1266. swait()
  1267. if rtype == 1 then
  1268. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1269. elseif rtype == 2 then
  1270. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1271. end
  1272. Part.Transparency=i
  1273. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1274. end
  1275. Part.Parent=nil
  1276. end),prt,msh)
  1277. end
  1278.  
  1279. function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1280. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1281. prt.Anchored=true
  1282. prt.CFrame=cframe
  1283. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1284. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1285. game:GetService("Debris"):AddItem(prt,5)
  1286. coroutine.resume(coroutine.create(function(Part,Mesh)
  1287. for i=0,1,delay do
  1288. wait()
  1289. Part.Transparency=i
  1290. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1291. end
  1292. Part.Parent=nil
  1293. end),prt,msh)
  1294. end
  1295.  
  1296. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1297. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1298. prt.Anchored=true
  1299. prt.Material = "Neon"
  1300. prt.CFrame=cframe
  1301. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1302. game:GetService("Debris"):AddItem(prt,5)
  1303. coroutine.resume(coroutine.create(function(Part,Mesh)
  1304. local rtype = rottype
  1305. for i=0,1,delay do
  1306. swait()
  1307. if rtype == 1 then
  1308. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1309. elseif rtype == 2 then
  1310. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1311. end
  1312. Part.Transparency=i
  1313. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1314. end
  1315. Part.Parent=nil
  1316. end),prt,msh)
  1317. end
  1318.  
  1319. function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1320. local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1321. prt.Anchored=true
  1322. prt.Material = "Neon"
  1323. prt.CFrame=cframe
  1324. local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1325. local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1326. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1327. game:GetService("Debris"):AddItem(prt,5)
  1328. coroutine.resume(coroutine.create(function(Part,Mesh)
  1329. local rtype = rottype
  1330. for i=0,1,delay do
  1331. swait()
  1332. if rtype == 1 then
  1333. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1334. elseif rtype == 2 then
  1335. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1336. end
  1337. dec.Transparency=i
  1338. dec2.Transparency=i
  1339. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1340. end
  1341. Part.Parent=nil
  1342. end),prt,msh)
  1343. end
  1344.  
  1345. function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1346. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1347. prt.Anchored=true
  1348. prt.Material = "Neon"
  1349. prt.CFrame=cframe
  1350. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1351. game:GetService("Debris"):AddItem(prt,5)
  1352. coroutine.resume(coroutine.create(function(Part,Mesh)
  1353. local rtype = rottype
  1354. for i=0,1,delay do
  1355. swait()
  1356. if rtype == 1 then
  1357. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1358. elseif rtype == 2 then
  1359. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1360. end
  1361. prt.Transparency=i
  1362. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1363. end
  1364. Part.Parent=nil
  1365. end),prt,msh)
  1366. end
  1367.  
  1368. function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
  1369. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1370. prt.Anchored=true
  1371. prt.Material = "Neon"
  1372. prt.CFrame=cframe
  1373. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
  1374. game:GetService("Debris"):AddItem(prt,5)
  1375. coroutine.resume(coroutine.create(function(Part,Mesh)
  1376. local rtype = rottype
  1377. for i=0,1,delay do
  1378. swait()
  1379. if rtype == 1 then
  1380. prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
  1381. elseif rtype == 2 then
  1382. prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
  1383. end
  1384. prt.Transparency=i
  1385. Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
  1386. end
  1387. Part.Parent=nil
  1388. end),prt,msh)
  1389. end
  1390.  
  1391. function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
  1392. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1393. prt.Anchored=true
  1394. prt.Material = "Neon"
  1395. prt.CFrame=cframe
  1396. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1397. game:GetService("Debris"):AddItem(prt,5)
  1398. coroutine.resume(coroutine.create(function(Part,Mesh)
  1399. local rtype = rottype
  1400. for i=0,1,delay do
  1401. swait()
  1402. if rtype == 1 then
  1403. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1404. elseif rtype == 2 then
  1405. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1406. end
  1407. prt.Transparency=i
  1408. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1409. end
  1410. Part.Parent=nil
  1411. end),prt,msh)
  1412. end
  1413.  
  1414. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1415. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1416. prt.Anchored=false
  1417. prt.CFrame=cframe
  1418. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1419. local wld=weld(prt,prt,Parent,cframe)
  1420. game:GetService("Debris"):AddItem(prt,5)
  1421. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1422. for i=0,1,delay do
  1423. wait()
  1424. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  1425. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1426. Part.Transparency=i
  1427. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1428. end
  1429. Part.Parent=nil
  1430. end),prt,msh,wld)
  1431. end
  1432.  
  1433. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1434. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1435. prt.Anchored=false
  1436. prt.CFrame=cframe
  1437. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1438. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  1439. game:GetService("Debris"):AddItem(prt,5)
  1440. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1441. for i=0,1,delay do
  1442. wait()
  1443. Weld.C0=euler(i*20,0,0)
  1444. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1445. Part.Transparency=i
  1446. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1447. end
  1448. Part.Parent=nil
  1449. end),prt,msh,wld)
  1450. end
  1451.  
  1452. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1453. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1454. prt.Anchored=true
  1455. prt.CFrame=cframe
  1456. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1457. game:GetService("Debris"):AddItem(prt,2)
  1458. coroutine.resume(coroutine.create(function(Part,Mesh)
  1459. for i=0,1,delay do
  1460. wait()
  1461. Part.CFrame=Part.CFrame
  1462. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1463. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1464. prt2.Anchored=true
  1465. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1466. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  1467. game:GetService("Debris"):AddItem(prt2,2)
  1468. coroutine.resume(coroutine.create(function(Part,Mesh)
  1469. for i=0,1,0.1 do
  1470. wait()
  1471. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  1472. end
  1473. Part.Parent=nil
  1474. end),prt2,msh2)
  1475. end
  1476. for i=0,1,delay*2 do
  1477. wait()
  1478. Part.CFrame=Part.CFrame
  1479. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  1480. end
  1481. Part.Parent=nil
  1482. end),prt,msh)
  1483. end
  1484.  
  1485. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1486. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1487. prt.Anchored=true
  1488. prt.CFrame=cframe
  1489. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1490. game:GetService("Debris"):AddItem(prt,2)
  1491. coroutine.resume(coroutine.create(function(Part,Mesh)
  1492. for i=0,1,delay do
  1493. wait()
  1494. Part.CFrame=Part.CFrame
  1495. Part.Transparency=i
  1496. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1497. end
  1498. Part.Parent=nil
  1499. end),prt,msh)
  1500. end
  1501.  
  1502. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  1503. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1504. prt.Anchored=true
  1505. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1506. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1507. game:GetService("Debris"):AddItem(prt,2)
  1508. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  1509. CF=Part.CFrame
  1510. Numbb=0
  1511. randnumb=math.random()/10
  1512. rand1=math.random()/10
  1513. for i=0,1,rand1 do
  1514. wait()
  1515. CF=CF*cf(0,math.random()/2,0)
  1516. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  1517. Part.CFrame=CF*euler(Numbb,0,0)
  1518. Part.Transparency=i
  1519. Numbb=Numbb+randnumb
  1520. end
  1521. Part.Parent=nil
  1522. end),prt,CF,Numbb,randnumb)
  1523. end
  1524.  
  1525. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1526. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1527. prt.Anchored=true
  1528. prt.CFrame=cframe
  1529. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1530. game:GetService("Debris"):AddItem(prt,5)
  1531. coroutine.resume(coroutine.create(function(Part,Mesh)
  1532. for i=0,1,delay do
  1533. wait()
  1534. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1535. Part.Transparency=i
  1536. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1537. end
  1538. Part.Parent=nil
  1539. end),prt,msh)
  1540. end
  1541.  
  1542. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1543. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1544. prt.Anchored=true
  1545. prt.CFrame=cframe
  1546. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1547. game:GetService("Debris"):AddItem(prt,2)
  1548. coroutine.resume(coroutine.create(function(Part,Mesh)
  1549. for i=0,1,delay do
  1550. wait()
  1551. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  1552. Part.Transparency=i
  1553. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1554. end
  1555. Part.Parent=nil
  1556. end),prt,msh)
  1557. end
  1558.  
  1559. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  1560. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1561. prt.Anchored=true
  1562. prt.CFrame=cframe*cf(x,y,z)
  1563. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  1564. game:GetService("Debris"):AddItem(prt,5)
  1565. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  1566. local num=math.random()
  1567. local num2=math.random(-3,2)+math.random()
  1568. local numm=0
  1569. for i=0,1,delay*2 do
  1570. swait()
  1571. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  1572. Part.Transparency=i
  1573. numm=numm+0.01
  1574. end
  1575. Part.Parent=nil
  1576. Mesh.Parent=nil
  1577. end),prt,msh,x,y,z)
  1578. end
  1579.  
  1580. function dmgstart(dmg,what)
  1581. hitcon = what.Touched:connect(function(hit)
  1582. local hum = hit.Parent:FindFirstChild("Humanoid")
  1583. if hum and not hum:IsDescendantOf(Character) then
  1584. hum:TakeDamage(dmg)
  1585. end
  1586. end)
  1587. end
  1588.  
  1589. function dmgstop()
  1590. hitcon:disconnect()
  1591. end
  1592.  
  1593. function Cloak()
  1594. Face.Parent=nil
  1595. cloaked=true
  1596. for _,v in pairs(Torso.Parent:children()) do
  1597. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  1598. coroutine.resume(coroutine.create(function()
  1599. for i=0,1,0.2 do
  1600. wait()
  1601. v.Transparency=i
  1602. end
  1603. v.Transparency=1
  1604. end))
  1605. end
  1606. if v.className=="Hat" then
  1607. hatp=v.Handle
  1608. coroutine.resume(coroutine.create(function(derp)
  1609. for i=0,1,0.2 do
  1610. wait()
  1611. derp.Transparency=i
  1612. end
  1613. derp.Transparency=1
  1614. end),hatp)
  1615. end
  1616. end
  1617. for _,v in pairs(m:children()) do
  1618. if v.className=="Part" then
  1619. coroutine.resume(coroutine.create(function()
  1620. for i=0,1,0.2 do
  1621. wait()
  1622. v.Transparency=i
  1623. end
  1624. v.Transparency=1
  1625. end))
  1626. end
  1627. end
  1628. end
  1629.  
  1630. function UnCloak()
  1631. so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
  1632. Face.Parent=Head
  1633. cloaked=false
  1634. for _,v in pairs(Torso.Parent:children()) do
  1635. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  1636. coroutine.resume(coroutine.create(function()
  1637. for i=0,1,0.1 do
  1638. wait()
  1639. v.Transparency=v.Transparency-0.1
  1640. end
  1641. v.Transparency=0
  1642. end))
  1643. end
  1644. if v.className=="Hat" then
  1645. hatp=v.Handle
  1646. coroutine.resume(coroutine.create(function(derp)
  1647. for i=0,1,0.1 do
  1648. wait()
  1649. derp.Transparency=derp.Transparency-0.1
  1650. end
  1651. derp.Transparency=0
  1652. end),hatp)
  1653. end
  1654. end
  1655. for _,v in pairs(m:children()) do
  1656. if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
  1657. coroutine.resume(coroutine.create(function()
  1658. for i=0,1,0.1 do
  1659. wait()
  1660. v.Transparency=v.Transparency-0.1
  1661. end
  1662. v.Transparency=0
  1663. end))
  1664. v.Transparency=0
  1665. end
  1666. end
  1667. end
  1668.  
  1669. function MakeMagic(Type,Color,Bullets,Size,Speed,Position,MagCircleScale,Delay,ExplosionScale,ExplosionVol,Explosionpit)
  1670. if Type == "PulsingBullet" then
  1671. for i = 0,1,0.1 do
  1672. swait()
  1673. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1674. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  1675. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4)
  1676. RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4)
  1677. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4)
  1678. end
  1679. local a = Instance.new("Part",Character)
  1680. a.Name = "Direction"
  1681. a.Anchored = true
  1682. a.BrickColor = Color
  1683. a.Material = "Neon"
  1684. a.Transparency = 0.5
  1685. a.CanCollide = false
  1686. local ray = Ray.new(
  1687. sorb.CFrame.p, -- origin
  1688. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1689. )
  1690. local ignore = Character
  1691. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1692. a.BottomSurface = 10
  1693. a.TopSurface = 10
  1694. local distance = (sorb.CFrame.p - position).magnitude
  1695. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1696. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1697. game:GetService("Debris"):AddItem(a, 3)
  1698. local thing = Instance.new("SpecialMesh",a)
  1699. thing.MeshType = "Sphere"
  1700. thing.Scale = vt(0,0,1)
  1701. for i = 0, 9 do
  1702. ray = Ray.new(
  1703. sorb.CFrame.p, -- origin
  1704. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1705. )
  1706. ignore = Character
  1707. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1708. local distance = (sorb.CFrame.p - position).magnitude
  1709. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1710. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1711. thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0)
  1712. wait()
  1713. end
  1714. if Bullets == 1 then
  1715. local lb = Instance.new("Part")
  1716. CFuncs["Sound"].Create("rbxassetid://260433768", lb, 2.5, 1)
  1717. lb.Parent = char
  1718. lb.BrickColor = Color
  1719. lb.CanCollide = false
  1720. lb.Material = "Neon"
  1721. lb.Shape = "Ball"
  1722. lb.Anchored = true
  1723. lb.Transparency = 0
  1724. lb.Size = vt(1,1,1)
  1725. lb.CFrame = a.CFrame
  1726. local thingery = Instance.new("SpecialMesh",lb)
  1727. thingery.MeshType = "Sphere"
  1728. thingery.Scale = Size
  1729. lb.Anchored = false
  1730. local bv = Instance.new("BodyVelocity")
  1731. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1732. bv.velocity = a.CFrame.lookVector*Speed
  1733. bv.Parent = lb
  1734. wait(0.1)
  1735. local touched = false
  1736. lb.Touched:connect(function(hit)
  1737. if touched == false then
  1738. touched = true
  1739. lb.Transparency = 1
  1740. PulseDam(ExplosionScale,lb,lb.BrickColor)
  1741. lb.Anchored = true
  1742. end
  1743. end)
  1744. game:GetService("Debris"):AddItem(lb, Delay)
  1745. end
  1746. for i = 0, 9 do
  1747. ray = Ray.new(
  1748. sorb.CFrame.p, -- origin
  1749. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1750. )
  1751. ignore = Character
  1752. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1753. local distance = (sorb.CFrame.p - position).magnitude
  1754. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1755. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1756. thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0)
  1757. wait()
  1758. end
  1759. end
  1760. if Type == "ExplodingBullet" then
  1761. if Bullets == 1 then
  1762. for i = 0,1,0.1 do
  1763. swait()
  1764. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1765. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  1766. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4)
  1767. RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4)
  1768. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4)
  1769. end
  1770. end
  1771. if Bullets > 1 then
  1772. for i = 0,1,0.1 do
  1773. swait()
  1774. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1775. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  1776. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-90)),.4)
  1777. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4)
  1778. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.4)
  1779. end
  1780. end
  1781. local a = Instance.new("Part",Character)
  1782. a.Name = "Direction"
  1783. a.Anchored = true
  1784. a.BrickColor = Color
  1785. a.Material = "Neon"
  1786. a.Transparency = 0.5
  1787. a.CanCollide = false
  1788. local ray = Ray.new(
  1789. sorb.CFrame.p, -- origin
  1790. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1791. )
  1792. local ignore = Character
  1793. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1794. a.BottomSurface = 10
  1795. a.TopSurface = 10
  1796. local distance = (sorb.CFrame.p - position).magnitude
  1797. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1798. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1799. game:GetService("Debris"):AddItem(a, 3)
  1800. local thing = Instance.new("SpecialMesh",a)
  1801. thing.MeshType = "Sphere"
  1802. thing.Scale = vt(0,0,1)
  1803. for i = 0, 9 do
  1804. ray = Ray.new(
  1805. sorb.CFrame.p, -- origin
  1806. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1807. )
  1808. ignore = Character
  1809. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1810. local distance = (sorb.CFrame.p - position).magnitude
  1811. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1812. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1813. thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0)
  1814. wait()
  1815. end
  1816. if Bullets == 1 then
  1817. local lb = Instance.new("Part")
  1818. CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1)
  1819. lb.Parent = char
  1820. lb.BrickColor = Color
  1821. lb.CanCollide = false
  1822. lb.Material = "Neon"
  1823. lb.Shape = "Ball"
  1824. lb.Anchored = true
  1825. lb.Transparency = 0
  1826. lb.Size = vt(1,1,1)
  1827. lb.CFrame = a.CFrame
  1828. local thingery = Instance.new("SpecialMesh",lb)
  1829. thingery.MeshType = "Sphere"
  1830. thingery.Scale = Size
  1831. lb.Anchored = false
  1832. local bv = Instance.new("BodyVelocity")
  1833. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1834. bv.velocity = a.CFrame.lookVector*Speed
  1835. bv.Parent = lb
  1836. wait(0.1)
  1837. local touched = false
  1838. lb.Touched:connect(function(hit)
  1839. if touched == false then
  1840. touched = true
  1841. lb.Transparency = 1
  1842. Explode(ExplosionScale,lb,Explosionpit,ExplosionVol)
  1843. lb.Anchored = true
  1844. end
  1845. end)
  1846. game:GetService("Debris"):AddItem(lb, Delay)
  1847. end
  1848. if Bullets > 1 then
  1849. for i = 0, Bullets do
  1850. ray = Ray.new(
  1851. sorb.CFrame.p, -- origin
  1852. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1853. )
  1854. ignore = Character
  1855. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1856. local distance = (sorb.CFrame.p - position).magnitude
  1857. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1858. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1859. local lb = Instance.new("Part")
  1860. CFuncs["Sound"].Create("rbxassetid://203691467", lb, 1, 5.5)
  1861. lb.Parent = char
  1862. lb.BrickColor = Color
  1863. lb.CanCollide = false
  1864. lb.Material = "Neon"
  1865. lb.Shape = "Ball"
  1866. lb.Anchored = true
  1867. lb.Transparency = 0
  1868. lb.Size = vt(1,1,1)
  1869. lb.CFrame = a.CFrame
  1870. local thingery = Instance.new("SpecialMesh",lb)
  1871. thingery.MeshType = "Sphere"
  1872. thingery.Scale = Size
  1873. lb.Anchored = false
  1874. local bv = Instance.new("BodyVelocity")
  1875. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1876. bv.velocity = a.CFrame.lookVector*Speed
  1877. bv.Parent = lb
  1878. wait(0.035)
  1879. local touched = false
  1880. lb.Touched:connect(function(hit)
  1881. if touched == false then
  1882. touched = true
  1883. lb.Transparency = 1
  1884. ExplodeShort(ExplosionScale,lb,Explosionpit,ExplosionVol)
  1885. lb.Anchored = true
  1886. end
  1887. end)
  1888. game:GetService("Debris"):AddItem(lb, Delay)
  1889. end
  1890. end
  1891. for i = 0, 9 do
  1892. ray = Ray.new(
  1893. sorb.CFrame.p, -- origin
  1894. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1895. )
  1896. ignore = Character
  1897. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1898. local distance = (sorb.CFrame.p - position).magnitude
  1899. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1900. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1901. thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0)
  1902. wait()
  1903. end
  1904. end
  1905. if Type == "FireUltExplosion" then
  1906. hum.WalkSpeed = 16
  1907. local a = Instance.new("Part",Character)
  1908. a.Name = "Direction"
  1909. a.Anchored = true
  1910. a.BrickColor = Color
  1911. a.Material = "Neon"
  1912. a.Transparency = 0.5
  1913. a.Size = vt(1,1,1)
  1914. a.CanCollide = false
  1915. a.CFrame = root.CFrame + vt(0,5,0)
  1916. game:GetService("Debris"):AddItem(a, Delay)
  1917. local thing = Instance.new("SpecialMesh",a)
  1918. thing.MeshType = "Sphere"
  1919. thing.Scale = vt(0,1,0)
  1920. for i = 0,5,0.1 do
  1921. swait()
  1922. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1923. MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1924. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  1925. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
  1926. RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(150), math.rad(0), math.rad(30)), 0.1)
  1927. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(150), math.rad(0), math.rad(-30)), 0.1)
  1928. end
  1929. for i = 0, 9 do
  1930. thing.Scale = thing.Scale + vt(MagCircleScale,0,MagCircleScale)
  1931. wait()
  1932. end
  1933. for i = 0,5,0.1 do
  1934. swait()
  1935. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1936. MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1937. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  1938. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.1)
  1939. RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.1)
  1940. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.1)
  1941. end
  1942. for i = 0,1,0.1 do
  1943. swait()
  1944. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1945. MagicBlock(Color,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1946. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  1947. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.4)
  1948. RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(-30)), 0.4)
  1949. LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.4)
  1950. end
  1951. hum.WalkSpeed = 16
  1952. attack = false
  1953. for i = 0, 9 do
  1954. thing.Scale = thing.Scale - vt(MagCircleScale,0,MagCircleScale)
  1955. wait()
  1956. end
  1957. ExplodeLong(65,a,0.4,1)
  1958. end
  1959. if Type == "Bullet" then
  1960. for i = 0,1,0.1 do
  1961. swait()
  1962. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  1963. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(80)),.4)
  1964. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.4)
  1965. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)), 0.4)
  1966. LW.C0 = clerp(LW.C0, CFrame.new(-0.15, 0.5, -0.35) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4)
  1967. end
  1968. local a = Instance.new("Part",Character)
  1969. a.Name = "Direction"
  1970. a.Anchored = true
  1971. a.BrickColor = Color
  1972. a.Material = "Neon"
  1973. a.Transparency = 0.5
  1974. a.CanCollide = false
  1975. local ray = Ray.new(
  1976. sorb.CFrame.p, -- origin
  1977. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  1978. )
  1979. local ignore = Character
  1980. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1981. a.BottomSurface = 10
  1982. a.TopSurface = 10
  1983. local distance = (sorb.CFrame.p - position).magnitude
  1984. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1985. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  1986. game:GetService("Debris"):AddItem(a, 3)
  1987. local thing = Instance.new("SpecialMesh",a)
  1988. thing.MeshType = "Sphere"
  1989. thing.Scale = vt(0,0,1)
  1990. for i = 0, 9 do
  1991. thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0)
  1992. wait()
  1993. end
  1994. if Bullets == 1 then
  1995. local lb = Instance.new("Part")
  1996. CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1)
  1997. lb.Parent = char
  1998. lb.BrickColor = Color
  1999. lb.CanCollide = false
  2000. lb.Material = "Neon"
  2001. lb.Shape = "Ball"
  2002. lb.Anchored = true
  2003. lb.Transparency = 0.5
  2004. lb.Size = Size
  2005. lb.CFrame = a.CFrame
  2006. local thing = Instance.new("SpecialMesh",lb)
  2007. thing.MeshType = "Sphere"
  2008. lb.Anchored = false
  2009. local bv = Instance.new("BodyVelocity")
  2010. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2011. bv.velocity = a.CFrame.lookVector*Speed
  2012. bv.Parent = lb
  2013. lb.Touched:connect(function(hit)
  2014. Damagefunc(hit,9,15,math.random(10,20),"Normal",root,.2,1)
  2015. end)
  2016. game:GetService("Debris"):AddItem(lb, Delay)
  2017. end
  2018. if Bullets > 1 then
  2019. for i = 0, Bullets do
  2020. wait(0.075)
  2021. ray = Ray.new(
  2022. sorb.CFrame.p, -- origin
  2023. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  2024. )
  2025. ignore = Character
  2026. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2027. local distance = (sorb.CFrame.p - position).magnitude
  2028. a.Size = Vector3.new(0.1, 0.1, 0.1)
  2029. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  2030. local lb = Instance.new("Part")
  2031. CFuncs["Sound"].Create("rbxassetid://260433721", lb, 2.5, 1)
  2032. lb.Parent = char
  2033. lb.BrickColor = Color
  2034. lb.CanCollide = false
  2035. lb.Material = "Neon"
  2036. lb.Shape = "Ball"
  2037. lb.Anchored = true
  2038. lb.Transparency = 0.5
  2039. lb.Size = Size
  2040. lb.CFrame = a.CFrame
  2041. local thing = Instance.new("SpecialMesh",lb)
  2042. thing.MeshType = "Sphere"
  2043. lb.Anchored = false
  2044. local bv = Instance.new("BodyVelocity")
  2045. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2046. bv.velocity = a.CFrame.lookVector*Speed
  2047. bv.Parent = lb
  2048. lb.Touched:connect(function(hit)
  2049. Damagefunc(hit,3,5,math.random(10,20),"Normal",root,.2,1)
  2050. end)
  2051. game:GetService("Debris"):AddItem(lb, Delay)
  2052. end
  2053. end
  2054. for i = 0, 9 do
  2055. thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0)
  2056. wait()
  2057. end
  2058. end
  2059. if Type == "Beam" then
  2060. for i = 0,1,0.1 do
  2061. swait()
  2062. MagicBlock(Color,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  2063. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(80)),.4)
  2064. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.4)
  2065. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)), 0.4)
  2066. LW.C0 = clerp(LW.C0, CFrame.new(-0.15, 0.5, -0.35) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4)
  2067. end
  2068. local a = Instance.new("Part",Character)
  2069. a.Name = "Direction"
  2070. a.Anchored = true
  2071. a.BrickColor = Color
  2072. a.Material = "Neon"
  2073. a.Transparency = 0.5
  2074. a.CanCollide = false
  2075. local ray = Ray.new(
  2076. sorb.CFrame.p, -- origin
  2077. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  2078. )
  2079. local ignore = Character
  2080. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2081. a.BottomSurface = 10
  2082. a.TopSurface = 10
  2083. local distance = (sorb.CFrame.p - position).magnitude
  2084. a.Size = Vector3.new(0.1, 0.1, 0.1)
  2085. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  2086. game:GetService("Debris"):AddItem(a, 3)
  2087. local thing = Instance.new("SpecialMesh",a)
  2088. thing.MeshType = "Sphere"
  2089. thing.Scale = vt(0,0,1)
  2090. for i = 0, 9 do
  2091. thing.Scale = thing.Scale + vt(MagCircleScale,MagCircleScale,0)
  2092. wait()
  2093. end
  2094. if Bullets == 1 then
  2095. local a = Instance.new("Part",Character)
  2096. a.Name = "Direction"
  2097. a.Anchored = true
  2098. a.BrickColor = Color
  2099. a.Material = "Neon"
  2100. a.Transparency = 0.5
  2101. a.CanCollide = false
  2102. local ray = Ray.new(
  2103. sorb.CFrame.p, -- origin
  2104. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  2105. )
  2106. local ignore = Character
  2107. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2108. if hit then
  2109. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  2110.  
  2111. if not humanoid then
  2112. humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  2113. end
  2114. if humanoid then
  2115. if humanoid.Parent:IsA"Model" then
  2116. Damagefunc(hit,5,10,math.random(10,20),"Normal",RootPart,.2,1)
  2117. end
  2118. end
  2119. end
  2120. a.BottomSurface = 10
  2121. a.TopSurface = 10
  2122. CFuncs["Sound"].Create("rbxassetid://151414336", a, 2.5, 1)
  2123. local distance = (sorb.CFrame.p - position).magnitude
  2124. a.Size = Vector3.new(0.5, 0.5, distance)
  2125. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2)
  2126. game:GetService("Debris"):AddItem(a, 0.1)
  2127. end
  2128. if Bullets > 1 then
  2129. for i = 0, Bullets do
  2130. wait(0.05)
  2131. ray = Ray.new(
  2132. sorb.CFrame.p, -- origin
  2133. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  2134. )
  2135. ignore = Character
  2136. hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2137. local distance = (sorb.CFrame.p - position).magnitude
  2138. a.Size = Vector3.new(0.1, 0.1, 0.1)
  2139. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
  2140. local a = Instance.new("Part",Character)
  2141. a.Name = "Direction"
  2142. a.Anchored = true
  2143. a.BrickColor = Color
  2144. a.Material = "Neon"
  2145. a.Transparency = 0.5
  2146. a.CanCollide = false
  2147. local ray = Ray.new(
  2148. sorb.CFrame.p, -- origin
  2149. (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
  2150. )
  2151. local ignore = Character
  2152. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2153. if hit then
  2154. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  2155.  
  2156. if not humanoid then
  2157. humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  2158. end
  2159. if humanoid then
  2160. if humanoid.Parent:IsA"Model" then
  2161. Damagefunc(hit,5,10,math.random(10,20),"Normal",RootPart,.2,1)
  2162. end
  2163. end
  2164. end
  2165. a.BottomSurface = 10
  2166. a.TopSurface = 10
  2167. CFuncs["Sound"].Create("rbxassetid://151414336", a, 2.5, 1)
  2168. local distance = (sorb.CFrame.p - position).magnitude
  2169. a.Size = Vector3.new(0.5, 0.5, distance)
  2170. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2)
  2171. game:GetService("Debris"):AddItem(a, 0.1)
  2172. end
  2173. end
  2174. for i = 0, 9 do
  2175. thing.Scale = thing.Scale - vt(MagCircleScale,MagCircleScale,0)
  2176. wait()
  2177. end
  2178. end
  2179. hum.WalkSpeed = 16
  2180. end
  2181. function Teleport(col,rad,par)
  2182. attack = true
  2183. for i = 0,1,0.1 do
  2184. swait()
  2185. MagicBlock(col,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
  2186. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(90)),.4)
  2187. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-90)),.4)
  2188. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.4)
  2189. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.4)
  2190. end
  2191. local a = Instance.new("Part",Character)
  2192. a.Name = "Direction"
  2193. a.Anchored = true
  2194. a.BrickColor = col
  2195. a.Material = "Neon"
  2196. a.Transparency = 1
  2197. a.CanCollide = false
  2198. local ab = Instance.new("Part",Character)
  2199. ab.Name = "Direction"
  2200. ab.Anchored = true
  2201. ab.BrickColor = col
  2202. ab.Material = "Neon"
  2203. ab.Transparency = 1
  2204. ab.CanCollide = false
  2205. local ray = Ray.new(
  2206. sorb.CFrame.p, -- origin
  2207. (mouse.Hit.p - sorb.CFrame.p).unit * 75 -- direction
  2208. )
  2209. local ignore = Character
  2210. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2211. a.BottomSurface = 10
  2212. a.TopSurface = 10
  2213. CFuncs["Sound"].Create("rbxassetid://201858045", a, 2.5, 1.25)
  2214. local distance = (sorb.CFrame.p - position).magnitude
  2215. a.Size = Vector3.new(0.5, 0.5, distance)
  2216. ab.Size = Vector3.new(1,1,1)
  2217. a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance/2)
  2218. ab.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, -distance)
  2219. local expart = Instance.new("Part",char)
  2220. local expart2 = Instance.new("Part",char)
  2221. local partMesh = Instance.new("SpecialMesh",expart)
  2222. partMesh.MeshType = "Sphere"
  2223. local partMesh2 = Instance.new("SpecialMesh",expart2)
  2224. partMesh2.MeshType = "Sphere"
  2225. partMesh.Scale = vt(rad,rad,rad)
  2226. expart.Size = vt(1,1,1)
  2227. expart.Transparency = 0
  2228. expart.Anchored = true
  2229. expart.Material = "Neon"
  2230. expart.BrickColor = bc("White")
  2231. expart.CFrame = par.CFrame
  2232. partMesh2.Scale = vt(rad,rad,rad)
  2233. expart2.Size = vt(1.15,1.15,1.15)
  2234. expart2.Transparency = 0.5
  2235. expart2.Anchored = true
  2236. expart2.Material = "Neon"
  2237. expart2.BrickColor = col
  2238. expart2.CFrame = par.CFrame
  2239. expart.CanCollide = false
  2240. expart2.CanCollide = false
  2241.  
  2242. local expartb = Instance.new("Part",char)
  2243. local expart2b = Instance.new("Part",char)
  2244. expartb.CanCollide = false
  2245. expart2b.CanCollide = false
  2246. local partMeshb = Instance.new("SpecialMesh",expartb)
  2247. partMeshb.MeshType = "Sphere"
  2248. local partMesh2b = Instance.new("SpecialMesh",expart2b)
  2249. partMesh2b.MeshType = "Sphere"
  2250. partMeshb.Scale = vt(rad,rad,rad)
  2251. expartb.Size = vt(1,1,1)
  2252. expartb.Transparency = 0
  2253. expartb.Anchored = true
  2254. expartb.Material = "Neon"
  2255. expartb.BrickColor = bc("White")
  2256. expartb.CFrame = ab.CFrame
  2257. partMesh2b.Scale = vt(rad,rad,rad)
  2258. expart2b.Size = vt(1.15,1.15,1.15)
  2259. expart2b.Transparency = 0.5
  2260. expart2b.Anchored = true
  2261. expart2b.Material = "Neon"
  2262. expart2b.BrickColor = col
  2263. expart2b.CFrame = ab.CFrame
  2264. local value = 1*rad/10
  2265. for i = 0, 34 do
  2266. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2267. expart.CFrame = expart.CFrame
  2268. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2269. expart2.CFrame = expart.CFrame
  2270. partMeshb.Scale = partMeshb.Scale + vt(value,value,value)
  2271. expartb.CFrame = expartb.CFrame
  2272. partMesh2b.Scale = partMesh2b.Scale + vt(value,value,value)
  2273. expart2b.CFrame = expartb.CFrame
  2274. value = value - 0.035*rad/10
  2275. if value < 0 then
  2276. value = 0
  2277. end
  2278. swait()
  2279. end
  2280. value = 1.5*rad/10
  2281. CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127",tors,2.5, 1)
  2282. attack = false
  2283. tors.CFrame = ab.CFrame
  2284. for i = 0, 99 do
  2285. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2286. expart.CFrame = expart.CFrame
  2287. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2288. expart2.CFrame = expart.CFrame
  2289. partMeshb.Scale = partMeshb.Scale + vt(value,value,value)
  2290. expartb.CFrame = expartb.CFrame
  2291. partMesh2b.Scale = partMesh2b.Scale + vt(value,value,value)
  2292. expart2b.CFrame = expartb.CFrame
  2293. value = value - 0.035*rad/10
  2294. if value < 0 then
  2295. value = 0
  2296. expart.Transparency = expart.Transparency + 0.025
  2297. expart2.Transparency = expart2.Transparency + 0.025
  2298. expartb.Transparency = expartb.Transparency + 0.025
  2299. expart2b.Transparency = expart2b.Transparency + 0.025
  2300. end
  2301. swait()
  2302. end
  2303. game:GetService("Debris"):AddItem(a, 4)
  2304. game:GetService("Debris"):AddItem(ab, 4)
  2305. game:GetService("Debris"):AddItem(expart, 1)
  2306. game:GetService("Debris"):AddItem(expart2, 1)
  2307. game:GetService("Debris"):AddItem(expart2b, 1)
  2308. game:GetService("Debris"):AddItem(expartb, 1)
  2309. end
  2310. function Ultimate(rad,par,col) --- was doing this because idk
  2311. hum.WalkSpeed = 0
  2312. for i = 0,5,0.1 do
  2313. swait()
  2314. MagicBlock(col,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  2315. MagicBlock(col,sorb2.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  2316. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2317. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(15),math.rad(0),math.rad(0)),.05)
  2318. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -0.15) * angles(math.rad(80), math.rad(10), math.rad(-30)), 0.05)
  2319. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -0.15) * angles(math.rad(80), math.rad(0), math.rad(30)), 0.05)
  2320. end
  2321. for i = 0,10,0.1 do
  2322. swait()
  2323. MagicBlock(col,tors.CFrame,10,10,10,0.05,0.05,0.05,0.05)
  2324. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,100 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.05)
  2325. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(15),math.rad(0),math.rad(0)),.05)
  2326. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(20), math.rad(10), math.rad(80)), 0.05)
  2327. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-80)), 0.05)
  2328. end
  2329. local expart = Instance.new("Part",char)
  2330. local expart2 = Instance.new("Part",char)
  2331. local partMesh = Instance.new("SpecialMesh",expart)
  2332. partMesh.MeshType = "Sphere"
  2333. local partMesh2 = Instance.new("SpecialMesh",expart2)
  2334. partMesh2.MeshType = "Sphere"
  2335. expart.Size = vt(1,1,1)
  2336. expart.Transparency = 0
  2337. expart.Anchored = true
  2338. expart.Material = "Neon"
  2339. expart.BrickColor = bc("White")
  2340. expart.CFrame = par.CFrame
  2341. expart2.Size = vt(1.15,1.15,1.15)
  2342. expart2.Transparency = 0.5
  2343. expart2.Anchored = true
  2344. expart2.Material = "Neon"
  2345. expart2.BrickColor = col
  2346. expart2.CFrame = par.CFrame
  2347.  
  2348. local a = Instance.new("Part",Character)
  2349. a.Name = "Direction"
  2350. a.Anchored = true
  2351. a.BrickColor = col
  2352. a.Material = "Neon"
  2353. a.Transparency = 0.5
  2354. a.CanCollide = false
  2355. local ray = Ray.new(
  2356. tors.CFrame.p, -- origin
  2357. (mouse.Hit.p - tors.CFrame.p).unit * 500 -- direction
  2358. )
  2359. local ignore = Character
  2360. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2361. a.BottomSurface = 10
  2362. a.TopSurface = 10
  2363. local distance = (tors.CFrame.p - position).magnitude
  2364. a.Size = Vector3.new(0.1, 0.1, 0.1)
  2365. a.CFrame = CFrame.new(tors.CFrame.p, position) * CFrame.new(0, 0, 0)
  2366. local value = 1*rad/10
  2367. for i = 0, 99 do
  2368. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2369. expart.CFrame = expart.CFrame
  2370. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2371. expart2.CFrame = expart.CFrame
  2372. value = value - 0.035*rad/10
  2373. if value < 0 then
  2374. value = 0
  2375. end
  2376. swait()
  2377. end
  2378. for z = 0, 4 do
  2379. ray = Ray.new(
  2380. tors.CFrame.p, -- origin
  2381. (mouse.Hit.p - tors.CFrame.p).unit * 500 -- direction
  2382. )
  2383. local ignore = Character
  2384. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2385. local distance = (tors.CFrame.p - position).magnitude
  2386. a.Size = Vector3.new(0.1, 0.1, 0.1)
  2387. a.CFrame = CFrame.new(tors.CFrame.p, position) * CFrame.new(0, 0, 0)
  2388. local lb = Instance.new("Part")
  2389. lb.Parent = char
  2390. lb.BrickColor = col
  2391. lb.CanCollide = false
  2392. lb.Material = "Neon"
  2393. lb.Shape = "Ball"
  2394. lb.Anchored = true
  2395. lb.Transparency = 0
  2396. lb.Size = vt(1,1,1)
  2397. lb.CFrame = a.CFrame + a.CFrame.lookVector*45
  2398. local thingery = Instance.new("SpecialMesh",lb)
  2399. thingery.MeshType = "Sphere"
  2400. thingery.Scale = vt(25,25,25)
  2401. lb.Anchored = false
  2402. local bv = Instance.new("BodyVelocity")
  2403. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2404. bv.velocity = a.CFrame.lookVector*350
  2405. bv.Parent = lb
  2406. local touched = false
  2407. lb.Touched:connect(function(hit)
  2408. if touched == false then
  2409. touched = true
  2410. lb.Transparency = 1
  2411. Explode(10,lb,0.65,1.5)
  2412. lb.Anchored = true
  2413. end
  2414. end)
  2415. game:GetService("Debris"):AddItem(lb, 10)
  2416. for i = 0, 24 do
  2417. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2418. expart.CFrame = expart.CFrame
  2419. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2420. expart2.CFrame = expart.CFrame
  2421. value = value - 0.035*rad/25
  2422. swait()
  2423. end
  2424. for i = 0, 49 do
  2425. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2426. expart.CFrame = expart.CFrame
  2427. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2428. expart2.CFrame = expart.CFrame
  2429. value = value + 0.035*rad/25
  2430. swait()
  2431. end
  2432. for i = 0, 24 do
  2433. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2434. expart.CFrame = expart.CFrame
  2435. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2436. expart2.CFrame = expart.CFrame
  2437. value = value - 0.035*rad/25
  2438. swait()
  2439. end
  2440. end
  2441. for i = 0, 75 do
  2442. partMesh.Scale = partMesh.Scale + vt(value,value,value)
  2443. expart.CFrame = expart.CFrame
  2444. partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
  2445. expart2.CFrame = expart.CFrame
  2446. value = value - 0.035*rad/25
  2447. if value < 0 then
  2448. expart.Transparency = expart.Transparency + 0.025
  2449. expart2.Transparency = expart2.Transparency + 0.025
  2450. end
  2451. swait()
  2452. end
  2453. hum.WalkSpeed = 16
  2454. game:GetService("Debris"):AddItem(expart, 1)
  2455. game:GetService("Debris"):AddItem(expart2, 1)
  2456. game:GetService("Debris"):AddItem(a, 1)
  2457. end
  2458. local amount = 1
  2459. local size = 1
  2460. local speed = 50
  2461. local custocolor = BrickColor.new("Lime green")
  2462. function Move1()
  2463. attack = true
  2464. MakeMagic("ExplodingBullet",custocolor,9,vt(1,1,1),250,sorb.CFrame,5,10,5,1,1)
  2465. attack = false
  2466. end
  2467. function Move2()
  2468. attack = true
  2469. MakeMagic("ExplodingBullet",custocolor,1,vt(5,5,5),100,sorb.CFrame,10,25,7.5,1,1)
  2470. attack = false
  2471. end
  2472. function Ult()
  2473. attack = true
  2474. Ultimate(75,tors,custocolor)
  2475. attack = false
  2476. end
  2477.  
  2478. local coold = false
  2479. function PulsingShield(col)
  2480. attack = true
  2481. coold = true
  2482. hum.WalkSpeed = 0
  2483. for i = 0,3,0.1 do
  2484. swait()
  2485. MagicBlock(col,sorb.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  2486. MagicBlock(col,sorb2.CFrame,2,2,2,0.05,0.05,0.05,0.05)
  2487. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2488. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  2489. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(20), math.rad(10), math.rad(80)), 0.3)
  2490. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-80)), 0.3)
  2491. end
  2492. attack = false
  2493. hum.WalkSpeed = 16
  2494. PulseDam(25,tors,col)
  2495. coold = false
  2496. end
  2497.  
  2498. mouse.KeyDown:connect(function(k)
  2499. if k == "z" and attack == false then
  2500. Move1()
  2501. end
  2502. if k == "x" and attack == false then
  2503. Move2()
  2504. end
  2505. if k == "c" and attack == false then
  2506. Teleport(custocolor,5,tors)
  2507. end
  2508. if k == "v" and attack == false and coold == false then
  2509. PulsingShield(custocolor)
  2510. end
  2511. if k == "b" and attack == false then
  2512. Ult()
  2513. end
  2514. end)
  2515.  
  2516. Humanoid.Animator.Parent = nil
  2517. idleanim=.4
  2518. while true do
  2519. swait()
  2520. sine = sine + change
  2521. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2522. local velderp=RootPart.Velocity.y
  2523. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  2524. if equipped==true or equipped==false then
  2525. if attack==false then
  2526. idle=idle+1
  2527. else
  2528. idle=0
  2529. end
  2530. if idle>=500 then
  2531. if attack==false then
  2532. --Sheath()
  2533. end
  2534. end
  2535. if RootPart.Velocity.y > 1 and hitfloor==nil then
  2536. Anim="Jump"
  2537. if attack==false then
  2538. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  2539. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  2540. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2541. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  2542. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2543. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  2544. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2545. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  2546. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  2547. end
  2548. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2549. Anim="Fall"
  2550. if attack==false then
  2551. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  2552. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  2553. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  2554. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  2555. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2556. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  2557. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  2558. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  2559. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  2560. end
  2561. elseif torvel<1 and hitfloor~=nil then
  2562. Anim="Idle"
  2563. RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
  2564. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
  2565. if attack==false then
  2566. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  2567. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3)
  2568. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3)
  2569. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3)
  2570. end
  2571. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  2572. Anim="Walk"
  2573. RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
  2574. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
  2575. if attack==false then
  2576. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3)
  2577. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2578. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3)
  2579. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3)
  2580. end
  2581. elseif torvel>=22 and hitfloor~=nil then
  2582. Anim="Run"
  2583. RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
  2584. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
  2585. if attack==false then
  2586. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3)
  2587. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  2588. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3)
  2589. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3)
  2590. end
  2591. end
  2592. end
  2593. end
Advertisement
Add Comment
Please, Sign In to add comment