Advertisement
CHARA-SCRIPTER

Octo

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