Advertisement
Finnegan5

greenlight

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