Advertisement
vibrantsinger423

edited crystal

Jul 5th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.35 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. Humanoid = Character.Humanoid
  8. LeftArm = Character["Left Arm"]
  9. LeftLeg = Character["Left Leg"]
  10. RightArm = Character["Right Arm"]
  11. RightLeg = Character["Right Leg"]
  12. LS = Torso["Left Shoulder"]
  13. LH = Torso["Left Hip"]
  14. RS = Torso["Right Shoulder"]
  15. RH = Torso["Right Hip"]
  16. Neck = Torso.Neck
  17. sou.SoundId ("162580033")
  18. it=Instance.new
  19. vt=Vector3.new
  20. cf=CFrame.new
  21. euler=CFrame.fromEulerAnglesXYZ
  22. angles=CFrame.Angles
  23. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  25. attack = false
  26. attacktype = 1
  27. attackdebounce = false
  28. ssdebounce=false
  29. MMouse=nil
  30. combo=0
  31. local CrystalNumb=0
  32. local Crystals={}
  33. CrystalColor=BrickColor.new("Navy blue")
  34. crystal = BrickColor.new("Navy blue")
  35. --player
  36. player = nil
  37. --save shoulders
  38. RSH, LSH = nil, nil
  39. --welds
  40. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  41. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  42. if Character:findFirstChild("Crystal Gauntlet",true) ~= nil then
  43. Character:findFirstChild("Crystal Gauntlet",true).Parent = nil
  44. end
  45. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  46. local fp = it("Part")
  47. fp.Material = "SmoothPlastic"
  48. fp.formFactor = formfactor
  49. fp.Parent = parent
  50. fp.Reflectance = reflectance
  51. fp.Transparency = transparency
  52. fp.CanCollide = false
  53. fp.Locked=true
  54. fp.BrickColor = brickcolor
  55. fp.Name = name
  56. fp.Size = size
  57. fp.Position = Torso.Position
  58. fp.BottomSurface="SmoothNoOutlines"
  59. fp.TopSurface="SmoothNoOutlines"
  60. fp.LeftSurface="SmoothNoOutlines"
  61. fp.RightSurface="SmoothNoOutlines"
  62. fp:BreakJoints()
  63. return fp
  64. end
  65. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  66. local mesh = it(Mesh)
  67. mesh.Parent = part
  68. if Mesh=="SpecialMesh" then
  69. mesh.MeshType = meshtype
  70. mesh.MeshId = meshid
  71. end
  72. mesh.Offset=offset
  73. mesh.Scale=scale
  74. return mesh
  75. end
  76. function weld(parent,part0,part1,c0)
  77. local weld = it("Weld")
  78. weld.Parent = parent
  79. weld.Part0 = part0
  80. weld.Part1 = part1
  81. weld.C0 = c0
  82. return weld
  83. end
  84. local modelzorz = Instance.new("Model")
  85. modelzorz.Parent = Character
  86. modelzorz.Name = "Crystal Gauntlet"
  87. local prt1=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part1",vt(1,1,1))
  88. local prt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part2",vt(1,1,1))
  89. local prt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part3",vt(1,1,1))
  90. local prt4=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part4",vt(1,1,1))
  91. local prt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part5",vt(1,1,1))
  92. local prt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part6",vt(1,1,1))
  93. local prt7=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part7",vt(1,1,1))
  94. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1.1,0.6,1.1))
  95. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1.1,0.8,0.5))
  96. local msh3=mesh("CylinderMesh",prt3,"","",vt(0,0,0),vt(0.8,0.2,0.8))
  97. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1.05,0.2,1.05))
  98. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(0.5,0.65,0.2))
  99. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(0.2,0.65,1.01))
  100. local msh7=mesh("SpecialMesh",prt7,"Sphere","",vt(0,0,0),vt(0.6,0.6,0.6))
  101. local wld1=weld(prt1,prt1,LeftArm,euler(0,0,0)*cf(0,-0.5,0))
  102. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0.7,0))
  103. local wld3=weld(prt3,prt3,prt2,euler(0,0,1.57)*cf(0.5,0.4,0))
  104. local wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,0.2,0))
  105. local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0.3,0.3,0))
  106. local wld6=weld(prt6,prt6,prt4,euler(0,0,0)*cf(0,0.3,0))
  107. local wld7=weld(prt7,prt7,prt3,euler(0,0,0)*cf(0,0,0))
  108. if (script.Parent.className ~= "HopperBin") then
  109. Tool = Instance.new("HopperBin")
  110. Tool.Parent = Backpack
  111. Tool.Name = "Crystal Gauntlet"
  112. script.Parent = Tool
  113. end
  114. Bin = script.Parent
  115. local bg = it("BodyGyro")
  116. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  117. bg.P = 20e+003
  118. bg.Parent = nil
  119. so = function(id,par,vol,pit)
  120. coroutine.resume(coroutine.create(function()
  121. local sou = Instance.new("Sound",par or workspace)
  122. sou.Volume=vol
  123. sou.Pitch=pit or 1
  124. sou.SoundId=id
  125. wait()
  126. sou:play()
  127. wait(6)
  128. sou:Remove()
  129. end))
  130. end
  131. function hideanim()
  132. equipped=false
  133. wait(0.1)
  134. bg.Parent=nil
  135. end
  136. function equipanim()
  137. equipped=true
  138. wait(0.1)
  139. RW.C0=cf(1.5, 0.5, 0) * euler(0.2,0,0)
  140. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  141. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8,0,0)
  142. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5,0.4)
  143. end
  144. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  145. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  146. end
  147. spread=2
  148. range=500
  149. rangepower=50
  150. function shoottrail(mouse,baseprt)
  151. coroutine.resume(coroutine.create(function()
  152. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  153. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  154. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,modelzorz)
  155. local rangepos = range
  156. local function drawtrail(From,To)
  157. local effectsmsh = Instance.new("CylinderMesh")
  158. effectsmsh.Scale = Vector3.new(1,1,1)
  159. effectsmsh.Name = "Mesh"
  160. local effectsg = Instance.new("Part")
  161. effectsg.formFactor = 3
  162. effectsg.CanCollide = false
  163. effectsg.Name = "Eff"
  164. effectsg.Locked = true
  165. effectsg.Anchored = true
  166. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  167. effectsg.Parent = modelzorz
  168. effectsmsh.Parent = effectsg
  169. effectsg.BrickColor = CrystalColor
  170. effectsg.Reflectance = 0.4
  171. glow = Instance.new("PointLight")
  172. glow.Parent = prt
  173. glow.Range = 6
  174. glow.Brightness = 5
  175. glow.Color = crystal.Color
  176. local LP = From
  177. local point1 = To
  178. local mg = (LP - point1).magnitude
  179. effectsmsh.Scale = Vector3.new(2,mg*5,2)
  180. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  181. coroutine.resume(coroutine.create(function()
  182. for i = 0 , 1 , 0.1 do
  183. wait()
  184. effectsg.Transparency = 1*i
  185. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  186. end
  187. effectsg.Parent = nil
  188. end))
  189. end
  190. local newpos = baseprt.Position
  191. local inc = rangepower
  192. repeat
  193. wait() wait()
  194. rangepos = rangepos - 10
  195. dir = dir * CFrame.Angles(math.rad(-1),0,0)
  196. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  197. drawtrail(newpos,pos)
  198. newpos = newpos + (dir.lookVector * inc)
  199. if inc >= 20 then
  200. inc = inc - 10
  201. end
  202. if hit ~= nil then
  203. rangepos = 0
  204. end
  205. until rangepos <= 0
  206. if hit ~= nil then
  207. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  208. hum = hit.Parent.Humanoid
  209. tTorso=hit.Parent.Torso
  210. Damagefunc1(hit,5,30)
  211. attackdebounce=false
  212. --ADmg(hum,hit)
  213. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  214. hum = hit.Parent.Parent.Humanoid
  215. tTorso=hit.Parent.Parent.Torso
  216. Damagefunc1(hit.Parent.Parent.Torso,5,30)
  217. attackdebounce=false
  218. --ADmg(hum,hit)
  219. end
  220. end
  221. end))
  222. end
  223. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  224. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  225. prt.Anchored=true
  226. prt.CFrame=cframe*cf(x2,y2,z2)
  227. glow = Instance.new("PointLight")
  228. glow.Parent = prt
  229. glow.Range = 4
  230. glow.Brightness = 5
  231. glow.Color = crystal.Color
  232. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  233. coroutine.resume(coroutine.create(function()
  234. for i=0,1,0.1 do
  235. wait()
  236. prt.CFrame=prt.CFrame
  237. prt.Transparency=i
  238. msh.Scale=msh.Scale+vt(x3,y3,z3)
  239. end
  240. prt.Parent=nil
  241. end))
  242. end
  243. function SpecialEffect()
  244. local prt=part(3,workspace,1,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  245. prt.Anchored=true
  246. prt.CFrame=Torso.CFrame
  247. glow = Instance.new("PointLight")
  248. glow.Parent = prt
  249. glow.Range = 4
  250. glow.Brightness = 5
  251. glow.Color = crystal.Color
  252. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  253. coroutine.resume(coroutine.create(function(Part,Mesh)
  254. for i=0,1,0.2 do
  255. wait(0)
  256. Part.Transparency=i
  257. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  258. end
  259. prt.Parent=nil
  260. end),prt,msh)
  261. end
  262. Damagefunc1=function(hit,Damage,Knockback)
  263. if hit.Parent==nil then
  264. return
  265. end
  266. CPlayer=Bin
  267. h=hit.Parent:FindFirstChild("Humanoid")
  268. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  269. if attackdebounce == false then
  270. attackdebounce = true
  271. coroutine.resume(coroutine.create(function()
  272. wait(0.2)
  273. attackdebounce = false
  274. end))
  275. Damage=Damage
  276. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  277. return
  278. end]]
  279. -- hs(hit,1.2)
  280. c=Instance.new("ObjectValue")
  281. c.Name="creator"
  282. c.Value=game.Players.LocalPlayer
  283. c.Parent=h
  284. game:GetService("Debris"):AddItem(c,.5)
  285. Damage=Damage+math.random(0,10)
  286. -- h:TakeDamage(Damage)
  287. blocked=false
  288. block=hit.Parent:findFirstChild("Block")
  289. if block~=nil then
  290. print("herp")
  291. if block.Value>0 then
  292. blocked=true
  293. block.Value=block.Value-1
  294. print(block.Value)
  295. end
  296. end
  297. if blocked==false then
  298. -- h:TakeDamage(Damage)
  299. h.Health=h.Health-Damage
  300. showDamage(hit.Parent,Damage,.5)
  301. else
  302. h:TakeDamage(1)
  303. showDamage(hit.Parent,1,.5)
  304. end
  305. vp=Instance.new("BodyVelocity")
  306. vp.P=500
  307. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  308. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  309. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  310. if Knockback>0 then
  311. vp.Parent=hit.Parent.Torso
  312. end
  313. game:GetService("Debris"):AddItem(vp,.25)
  314. c=Instance.new("ObjectValue")
  315. c.Name="creator"
  316. c.Value=Player
  317. c.Parent=h
  318. game:GetService("Debris"):AddItem(c,.5)
  319. CRIT=false
  320. hitDeb=true
  321. AttackPos=6
  322. end
  323. end
  324. end
  325. Damagefunc2=function(hit,Damage,Knockback)
  326. if attackdebounce == false then
  327. attackdebounce = true
  328. coroutine.resume(coroutine.create(function()
  329. wait(0.1)
  330. attackdebounce = false
  331. end))
  332. if hit.Parent==nil then
  333. return
  334. end
  335. CPlayer=Bin
  336. blocked=false
  337. h=hit.Parent:FindFirstChild("Humanoid")
  338. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  339. Damage=Damage
  340. c=it("ObjectValue")
  341. c.Name="creator"
  342. c.Value=game.Players.LocalPlayer
  343. c.Parent=h
  344. game:GetService("Debris"):AddItem(c,.5)
  345. -- print(c.Value)
  346. --[[ if math.random(0,99)+math.random()<=7.8 then
  347. CRIT=true
  348. Damage=Damage*2
  349. s=it("Sound")
  350. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  351. s.Volume=1
  352. s.Pitch=2
  353. s.Parent=hit
  354. s.PlayOnRemove=true
  355. s.Parent=nil
  356.  
  357. end]]
  358. Damage=Damage+math.random(0,10)
  359. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  360. blocked=false
  361. block=hit.Parent:findFirstChild("Block")
  362. if block~=nil then
  363. print("herp")
  364. if block.Value>0 then
  365. blocked=true
  366. block.Value=block.Value-3
  367. print(block.Value)
  368. end
  369. end
  370. if blocked==false then
  371. -- h:TakeDamage(Damage)
  372. h.Health=h.Health-Damage
  373. showDamage(hit.Parent,Damage,.5)
  374. else
  375. h:TakeDamage(1)
  376. showDamage(hit.Parent,1,.5)
  377. end
  378. --if blocked==false then
  379. local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit
  380. print(angle)
  381. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  382. rl=Instance.new("BodyAngularVelocity")
  383. rl.P=3000
  384. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  385. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  386. rl.Parent=hit
  387. coroutine.resume(coroutine.create(function(vel)
  388. wait(1)
  389. vel:Remove()
  390. end),rl)
  391. --end
  392. local bodyVelocity=Instance.new("BodyVelocity")
  393. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  394. bodyVelocity.P=5000
  395. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  396. bodyVelocity.Parent=hit
  397. coroutine.resume(coroutine.create(function(Vel)
  398. wait(0.7)
  399. Vel:Remove()
  400. end),bodyVelocity)
  401. c=it("ObjectValue")
  402. c.Name="creator"
  403. c.Value=Player
  404. c.Parent=h
  405. game:GetService("Debris"):AddItem(c,.5)
  406. CRIT=false
  407. hitDeb=true
  408. AttackPos=6
  409. end
  410. end
  411. end
  412. showDamage=function(Char,Dealt,du)
  413. m=Instance.new("Model")
  414. m.Name=tostring(Dealt)
  415. h=Instance.new("Humanoid")
  416. h.Health=0
  417. h.MaxHealth=0
  418. h.Parent=m
  419. c=Instance.new("Part")
  420. c.Material = "SmoothPlastic"
  421. c.Transparency=0
  422. c.BrickColor=BrickColor:Red()
  423. if CRIT==true then
  424. c.BrickColor=BrickColor.new("Really red")
  425. end
  426. c.Name="Head"
  427. c.TopSurface=0
  428. c.BottomSurface=0
  429. c.formFactor="Plate"
  430. c.Size=Vector3.new(1,.4,1)
  431. ms=Instance.new("CylinderMesh")
  432. ms.Scale=Vector3.new(.8,.8,.8)
  433. if CRIT==true then
  434. ms.Scale=Vector3.new(1,1.25,1)
  435. end
  436. ms.Parent=c
  437. c.Reflectance=0
  438. Instance.new("BodyGyro").Parent=c
  439. c.Parent=m
  440. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  441. f=Instance.new("BodyPosition")
  442. f.P=2000
  443. f.D=100
  444. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  445. f.position=c.Position+Vector3.new(0,3,0)
  446. f.Parent=c
  447. game:GetService("Debris"):AddItem(m,.5+du)
  448. c.CanCollide=false
  449. m.Parent=workspace
  450. c.CanCollide=false
  451. end
  452. function CrystalEffect(crystal)
  453. clone=crystal:Clone()
  454. clone.Parent=workspace
  455. clone.Anchored=true
  456. clone.CFrame=crystal.CFrame
  457. glow = Instance.new("PointLight")
  458. glow.Parent = clone
  459. glow.Range = 9
  460. glow.Brightness = 6
  461. glow.Color = crystal.Color
  462. Mesh=clone.Mesh
  463. coroutine.resume(coroutine.create(function(Part,Meshh)
  464. for i=0.5,1,0.05 do
  465. wait()
  466. Part.Transparency=i
  467. Meshh.Scale=Meshh.Scale+vt(0.3,0.3,0.3)
  468. end
  469. Part.Parent=nil
  470. end),clone,Mesh)
  471. end
  472. function MakeCrystals()
  473. attack=true
  474. for i=0,1,0.1 do
  475. wait()
  476. RW.C0=cf(1.5, 0.5, 0) * euler(0.2-0.4*i,0,0)
  477. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  478. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8+0.77*i,0,0)
  479. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5+2.07*i,0.4-0.4*i)
  480. end
  481. while crystalhold==true do
  482. if CrystalNumb<25 then
  483. so("http://www.roblox.com/asset/?id=106626284",Torso,1,2)
  484. CrystalEffect(prt7)
  485. CrystalNumb=CrystalNumb+1
  486. print(CrystalNumb)
  487. local base=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Part1",vt(1,1,1))
  488. base.Anchored=true
  489. base.CFrame=prt7.CFrame
  490. table.insert(Crystals,base)
  491. local crystall=part(3,base,0.4,0,CrystalColor,"Crystal",vt(2,2,2))
  492. local msh=mesh("SpecialMesh",crystall,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(2,2,2))
  493. glow = Instance.new("PointLight")
  494. glow.Parent = crystall
  495. glow.Range = 4.5
  496. glow.Brightness = 4.5
  497. glow.Color = crystal.Color
  498. crystall.Anchored=false
  499. crystall.CFrame=base.CFrame
  500. fd=Instance.new("BodyPosition")
  501. fd.P=10000
  502. fd.D=1000
  503. fd.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  504. fd.position=base.Position
  505. fd.Parent=crystall
  506. coroutine.resume(coroutine.create(function(BodyPos,Part,BasePart)
  507. while BasePart.Parent~=nil do
  508. wait()
  509. BodyPos.position=BasePart.Position
  510. end
  511. Part.Parent=nil
  512. end),fd,crystall,base)
  513. end
  514. wait(0.5)
  515. end
  516. for i=0,1,0.1 do
  517. wait()
  518. RW.C0=cf(1.5, 0.5, 0) * euler(-0.2+0.4*i,0,0)
  519. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  520. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-0.77*i,0,0)
  521. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-2.07*i,0.4-0.4+0.4*i)
  522. end
  523. attack=false
  524. end
  525. function attackone()
  526. attack=true
  527. hitted=false
  528. CrystalEffect(prt7)
  529. randomnumb=math.random(1,#Crystals)
  530. item=Crystals[randomnumb]
  531. item.CFrame=LeftArm.CFrame*cf(0,-5,0)
  532. CrystalNumb=CrystalNumb-1
  533. table.remove(Crystals,randomnumb)
  534. for i=0,1,0.1 do
  535. wait()
  536. item.CFrame=LeftArm.CFrame*cf(0,-5,0)
  537. RW.C0=cf(1.5, 0.5, 0) * euler(0.2,0,0)
  538. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  539. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8-0.8*i,0,0)
  540. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5-1.07*i,0.4+1.17*i)
  541. end
  542. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  543. Cryst=item.Crystal
  544. con1=Cryst.Touched:connect(function(hit)
  545. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  546. so("http://www.roblox.com/asset/?id=12222005",Torso,1,1.5)
  547. Cryst.Parent=nil
  548. hitted=true
  549. for i=1,math.random(4,8) do
  550. local brokecryst=part(3,workspace,0.4,0,Cryst.BrickColor,"Crystal",vt(1,1,1))
  551. local mshh=mesh("SpecialMesh",brokecryst,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  552. glow = Instance.new("PointLight")
  553. glow.Parent = brokecryst
  554. glow.Range = 4
  555. glow.Brightness = 4.5
  556. glow.Color = crystal.Color
  557. brokecryst.CanCollide=true
  558. brokecryst.CFrame=Cryst.CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  559. brokecryst.Velocity=vt(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  560. game:GetService("Debris"):AddItem(brokecryst,4)
  561. end
  562. end
  563. Damagefunc1(hit,10,20)
  564. end)
  565. for i=0,1,0.2 do
  566. wait()
  567. item.CFrame=LeftArm.CFrame*cf(0,-5,0)
  568. RW.C0=cf(1.5, 0.5, 0) * euler(0.2,0,0)
  569. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  570. LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(0,-3*i,0)
  571. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57,1.57)
  572. end
  573. wait(0.5)
  574. con1:disconnect()
  575. if hitted==true then
  576. item.Parent=nil
  577. elseif hitted==false then
  578. CrystalNumb=CrystalNumb+1
  579. table.insert(Crystals,item)
  580. end
  581. attack=false
  582. end
  583. function Shatter()
  584. attack=true
  585. Damage=0
  586. for i=0,1,0.1 do
  587. wait()
  588. RW.C0=cf(1.5, 0.5, 0) * euler(0.2-0.4*i,0,0)
  589. LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(0.8+0.8*i,0,0)
  590. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5+0.5*i,0.4-1.6*i)
  591. end
  592. CrystalEffect(prt7)
  593. for e=1,#Crystals do
  594. Damage=Damage+5
  595. so("http://www.roblox.com/asset/?id=12222005",Torso,1,1.5)
  596. CrystalNumb=CrystalNumb-1
  597. Crystals[e].Parent=nil
  598. for i=1,math.random(4,10) do
  599. local brokecryst=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  600. local mshh=mesh("SpecialMesh",brokecryst,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  601. glow = Instance.new("PointLight")
  602. glow.Parent = brokecryst
  603. glow.Range = 4
  604. glow.Brightness = 4.5
  605. glow.Color = crystal.Color
  606. brokecryst.CanCollide=true
  607. brokecryst.CFrame=Crystals[e].CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  608. brokecryst.Velocity=vt(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  609. game:GetService("Debris"):AddItem(brokecryst,4)
  610. end
  611. --table.remove(Crystals,c)
  612. end
  613. local cc = game.Workspace:GetChildren()
  614. for i = 1, #cc do
  615. local hum = cc[i]:findFirstChild("Humanoid")
  616. if hum ~= nil and hum.Health ~= 0 then
  617. local head = cc[i]:findFirstChild("Head")
  618. if head ~= nil then
  619. local targ = head.Position - Torso.Position
  620. local mag = targ.magnitude
  621. if mag <= 20 and cc[i].Name ~= Player.Name then
  622. attackdebounce=false
  623. Damagefunc2(head,Damage,10)
  624. end
  625. end
  626. end
  627. end
  628. for i=1,10 do
  629. print("nou")
  630. for e=1,#Crystals do
  631. print(#Crystals)
  632. table.remove(Crystals,e)
  633. end
  634. end
  635. wait(0.4)
  636. for i=0,1,0.1 do
  637. wait()
  638. RW.C0=cf(1.5, 0.5, 0) * euler(-0.2+0.4*i,0,0)
  639. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1.6-0.8*i,0,0)
  640. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5*i,-1.2+1.6*i)
  641. end
  642. CrystalNumb=0
  643. attack=false
  644. end
  645. function ShardJab()
  646. attack=true
  647. for i=0,1,0.1 do
  648. wait()
  649. RW.C0=cf(1.5, 0.5, 0) * euler(0.2-0.4*i,0,0)
  650. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8+2.2*i,0,0)
  651. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5-1.07*i,0.4-0.4*i)
  652. end
  653. for i=1,3 do
  654. randomnumb=math.random(1,#Crystals)
  655. item=Crystals[randomnumb]
  656. item.CFrame=Torso.CFrame*cf(math.random(-6,6),math.random(6,8),math.random(-6,6))
  657. coroutine.resume(coroutine.create(function(Part)
  658. CrystalNumb=CrystalNumb-1
  659. table.remove(Crystals,randomnumb)
  660. CrystalEffect(prt7)
  661. wait(0.4)
  662. so("http://www.roblox.com/asset/?id=12222005",Part,1,1.5)
  663. Part.Crystal.Parent=nil
  664. for i=1,math.random(2,6) do
  665. local brokecryst=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  666. local mshh=mesh("SpecialMesh",brokecryst,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  667. brokecryst.CanCollide=true
  668. brokecryst.CFrame=Part.CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  669. brokecryst.Velocity=vt(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  670. game:GetService("Debris"):AddItem(brokecryst,4)
  671. end
  672. for i=1,3 do
  673. local Shard=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  674. local mshh=mesh("SpecialMesh",Shard,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.5,1.5,0.5))
  675. glow = Instance.new("PointLight")
  676. glow.Parent = Shard
  677. glow.Range = 9
  678. glow.Brightness = 6
  679. glow.Color = crystal.Color
  680. fd=Instance.new("BodyPosition")
  681. fd.P=10000
  682. fd.D=1000
  683. fd.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  684. fd.position=Part.Position+vt(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  685. fd.Parent=Shard
  686. local bg = it("BodyGyro")
  687. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  688. bg.P = 20e+003
  689. bg.Parent=Shard
  690. bg.cframe=CFrame.new(Shard.Position,MMouse.Hit.p)*euler(1.57,0,0)
  691. --bg.cframe=CFrame.new(pos1,targetpos)
  692. coroutine.resume(coroutine.create(function(Part)
  693. wait(0.5)
  694. shoottrail(MMouse,Part)
  695. Part.Parent=nil
  696. end),Shard)
  697. end
  698. end),item)
  699. end
  700. wait(1)
  701. for i=0,1,0.1 do
  702. wait()
  703. RW.C0=cf(1.5, 0.5, 0) * euler(-0.2+0.4*i,0,0)
  704. LW.C0=cf(-1.5, 0.5, 0) * euler(3-2.2*i,0,0)
  705. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.07*i,0.4*i)
  706. end
  707. item.Parent=nil
  708. attack=false
  709. end
  710.  
  711. function ShardWave()
  712. attack=true
  713. Humanoid.WalkSpeed=0
  714. for i=0,1,0.1 do
  715. wait()
  716. RW.C0=cf(1.5, 0.5, 0) * euler(0.2-0.4*i,0,0)
  717. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8+0.77*i,0,0)
  718. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5+0.5*i,0.4-0.4*i)
  719. end
  720. MainCF=Torso.CFrame*cf(0,0,-5)
  721. for i=1,10 do
  722. wait(0.1)
  723. MainCF=MainCF*cf(0,0,-2)
  724. CrystalEffect(prt7)
  725. local CrystDerp=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  726. glow = Instance.new("PointLight")
  727. glow.Parent = CrystDerp
  728. glow.Range = 5
  729. glow.Brightness = 4
  730. glow.Color = crystal.Color
  731. local mshh=mesh("SpecialMesh",CrystDerp,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(1+math.random(),math.random(1,2)+math.random(),1+math.random()))
  732. CrystDerp.CFrame=MainCF*cf(math.random(-5,5),math.random(-20,-15),math.random(-5,5))
  733. CrystDerp.Anchored=true
  734. game:GetService("Debris"):AddItem(CrystDerp,4)
  735. coroutine.resume(coroutine.create(function(Part)
  736. for i=1,10 do
  737. wait()
  738. Part.CFrame=Part.CFrame*cf(0,2,0)
  739. end
  740. wait(1)
  741. local cc = game.Workspace:GetChildren()
  742. for i = 1, #cc do
  743. local hum = cc[i]:findFirstChild("Humanoid")
  744. if hum ~= nil and hum.Health ~= 0 then
  745. local head = cc[i]:findFirstChild("Head")
  746. if head ~= nil then
  747. local targ = head.Position - Part.Position
  748. local mag = targ.magnitude
  749. if mag <= 5 and cc[i].Name ~= Player.Name then
  750. attackdebounce=false
  751. Damagefunc1(head,5,10)
  752. end
  753. end
  754. end
  755. end
  756. so("http://www.roblox.com/asset/?id=12222005",Part,1,1.5)
  757. for i=1,math.random(2,6) do
  758. local brokecryst=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  759. local mshh=mesh("SpecialMesh",brokecryst,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  760. brokecryst.CanCollide=true
  761. brokecryst.CFrame=Part.CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  762. brokecryst.Velocity=vt(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  763. game:GetService("Debris"):AddItem(brokecryst,4)
  764. end
  765. Part.Transparency=1
  766. end),CrystDerp)
  767. end
  768. Humanoid.WalkSpeed=16
  769. for i=0,1,0.1 do
  770. wait()
  771. RW.C0=cf(1.5, 0.5, 0) * euler(-0.2+0.4*i,0,0)
  772. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-0.77*i,0,0)
  773. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5*i,0.4*i)
  774. end
  775. attack=false
  776. end
  777.  
  778. function ShardBarrage()
  779. attack=true
  780. Humanoid.WalkSpeed=0
  781. for i=0,1,0.1 do
  782. wait()
  783. RW.C0=cf(1.5, 0.5, 0) * euler(0.2-0.4*i,0,0)
  784. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8+0.77*i,0,0)
  785. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5+0.5*i,0.4-0.4*i)
  786. end
  787. MainCF=Torso.CFrame*cf(0,0,-5)
  788. for i=1,35 do
  789. wait(0.1)
  790. MainCF=MainCF*cf(0,0,-2)
  791. CrystalEffect(prt7)
  792. local CrystDerp=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  793. local CrystDerp1=part(3,workspace,0.4,0,CrystalColor,"Crystal1",vt(1,1,1))
  794. local mshh=mesh("SpecialMesh",CrystDerp,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(1+math.random(5,5),math.random(7,9)+math.random(),1+math.random(5,5)))
  795. local mshh1=mesh("SpecialMesh",CrystDerp1,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(1+math.random(5,5),math.random(7,9)+math.random(),1+math.random(5,5)))
  796. CrystDerp.CFrame=MainCF*cf(math.random(-15,10),math.random(-25,-20),math.random(-30,15))
  797. CrystDerp.Anchored=true
  798. CrystDerp1.CFrame=MainCF*cf(math.random(-5,0),math.random(-20,-15),math.random(-10,10))
  799. CrystDerp1.Anchored=true
  800. game:GetService("Debris"):AddItem(CrystDerp,4)
  801. game:GetService("Debris"):AddItem(CrystDerp1,4)
  802. coroutine.resume(coroutine.create(function(Part)
  803. for i=1,10 do
  804. wait()
  805. Part.CFrame=Part.CFrame*cf(0,2,0)
  806. CrystDerp1.CFrame=CrystDerp1.CFrame*cf(0,2,0)
  807. end
  808. wait(1)
  809. local cc = game.Workspace:GetChildren()
  810. for i = 1, #cc do
  811. local hum = cc[i]:findFirstChild("Humanoid")
  812. if hum ~= nil and hum.Health ~= 0 then
  813. local head = cc[i]:findFirstChild("Head")
  814. if head ~= nil then
  815. local targ = head.Position - Part.Position
  816. local mag = targ.magnitude
  817. if mag <= 5 and cc[i].Name ~= Player.Name then
  818. attackdebounce=false
  819. Damagefunc1(head,25,40)
  820. end
  821. end
  822. end
  823. end
  824. local cc1 = game.Workspace:GetChildren()
  825. for e = 1, #cc1 do
  826. local hum1 = cc1[e]:findFirstChild("Humanoid")
  827. if hum1 ~= nil and hum1.Health ~= 0 then
  828. local head1 = cc1[e]:findFirstChild("Head")
  829. if head1 ~= nil then
  830. local targ1 = head1.Position - CrystDerp1.Position
  831. local mag1 = targ1.magnitude
  832. if mag1 <= 5 and cc1[e].Name ~= Player.Name then
  833. attackdebounce=false
  834. Damagefunc1(head1,25,40)
  835. end
  836. end
  837. end
  838. end
  839. so("http://www.roblox.com/asset/?id=12222005",Part,1,1.5)
  840. for i=1,math.random(2,6) do
  841. local brokecryst=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  842. local mshh=mesh("SpecialMesh",brokecryst,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  843. glow = Instance.new("PointLight")
  844. glow.Parent = brokecryst
  845. glow.Range = 4
  846. glow.Brightness = 4
  847. glow.Color = crystal.Color
  848. brokecryst.CanCollide=true
  849. brokecryst.CFrame=Part.CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  850. brokecryst.Velocity=vt(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  851. local brokecryst1=part(3,workspace,0.4,0,CrystalColor,"Crystal",vt(1,1,1))
  852. local mshh=mesh("SpecialMesh",brokecryst1,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(math.random()-math.random(),math.random()+math.random(0,1),math.random()-math.random()))
  853. glow = Instance.new("PointLight")
  854. glow.Parent = brokecryst1
  855. glow.Range = 4
  856. glow.Brightness = 4
  857. glow.Color = crystal.Color
  858. brokecryst1.CanCollide=true
  859. brokecryst1.CFrame=CrystDerp1.CFrame*cf(math.random(-3,3),math.random(-3,3),math.random(-3,3))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  860. brokecryst1.Velocity=vt(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  861. game:GetService("Debris"):AddItem(brokecryst,4)
  862. game:GetService("Debris"):AddItem(brokecryst1,4)
  863. end
  864. Part.Transparency=1
  865. CrystDerp1.Transparency=1
  866. end),CrystDerp)
  867. end
  868. Humanoid.WalkSpeed=16
  869. for i=0,1,0.1 do
  870. wait()
  871. RW.C0=cf(1.5, 0.5, 0) * euler(-0.2+0.4*i,0,0)
  872. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-0.77*i,0,0)
  873. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5*i,0.4*i)
  874. end
  875. attack=false
  876. end
  877.  
  878. function ob1d(mouse)
  879. if attack == true or CrystalNumb==0 then return end
  880. hold=true
  881. attackone()
  882. RW.C0=cf(1.5, 0.5, 0) * euler(0.2,0,0)
  883. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  884. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8,0,0)
  885. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5,0.4)
  886. end
  887. function ob1u(mouse)
  888. hold = false
  889. end
  890. buttonhold = false
  891. eul=0
  892. function key(key)
  893. if attack == true then return end
  894. if key=="z" then
  895. ShardWave()
  896. end
  897. if key=="b" then
  898. ShardBarrage()
  899. end
  900. if key=="x" and CrystalNumb>=0 then
  901. Shatter()
  902. end
  903. if key=="c" and CrystalNumb>=3 then
  904. ShardJab()
  905. end
  906. if key=="v" then
  907. crystalhold=true
  908. MakeCrystals()
  909. end
  910. RW.C0=cf(1.5, 0.5, 0) * euler(0.2,0,0)
  911. RW.C1=cf(0, 0.5, 0) * euler(0,0,-0.2)
  912. LW.C0=cf(-1.5, 0.5, 0) * euler(0.8,0,0)
  913. LW.C1=cf(0, 0.5, 0) * euler(0,-0.5,0.4)
  914. end
  915. function key2(key)
  916. if key=="v" then
  917. crystalhold=false
  918. end
  919. end
  920. function s(mouse)
  921. mouse.Button1Down:connect(function() ob1d(mouse) end)
  922. mouse.Button1Up:connect(function() ob1u(mouse) end)
  923. mouse.KeyDown:connect(key)
  924. mouse.KeyUp:connect(key2)
  925. unsheathed = true
  926. player = Player
  927. ch = Character
  928. MMouse = mouse
  929. RSH = ch.Torso["Right Shoulder"]
  930. LSH = ch.Torso["Left Shoulder"]
  931. --
  932. RSH.Parent = nil
  933. LSH.Parent = nil
  934. --
  935. RW.Part0 = ch.Torso
  936. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  937. RW.C1 = CFrame.new(0, 0.5, 0)
  938. RW.Part1 = ch["Right Arm"]
  939. RW.Parent = ch.Torso
  940. --_G.R = RW
  941. --
  942. LW.Part0 = ch.Torso
  943. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  944. LW.C1 = CFrame.new(0, 0.5, 0)
  945. LW.Part1 = ch["Left Arm"]
  946. LW.Parent = ch.Torso
  947. --_G.L = LW
  948. --
  949. equipanim()
  950. end
  951. function ds(mouse)
  952. hideanim()
  953. wait(0)
  954. RW.Parent = nil
  955. LW.Parent = nil
  956. RSH.Parent = player.Character.Torso
  957. LSH.Parent = player.Character.Torso
  958. end
  959. Bin.Selected:connect(s)
  960. Bin.Deselected:connect(ds)
  961. print("Crystal Gauntlet loaded.")
  962. print(#Crystals)
  963. numbb=0
  964. datnumb=0
  965. while true do
  966. wait()
  967. datnumb=0
  968. BaseNumb=6.28
  969. BaseNumb=BaseNumb/CrystalNumb
  970. for d=1,#Crystals do
  971. datnumb=datnumb+BaseNumb
  972. local Crystal=Crystals[d]
  973. if Crystal.className=="Part" then
  974. coroutine.resume(coroutine.create(function(Part)
  975. if #Crystals~=0 then
  976. Part.CFrame=CFrame.new(Torso.Position)*euler(0,1+datnumb,0)*cf(0,0,5+(CrystalNumb/3))
  977. numbb=numbb+0.05
  978. --print(BaseNumb)
  979. end
  980. end),Crystal)
  981. end
  982. end
  983. end
  984. -- mediafire
  985. --[[
  986. Copyrighted (C) Fenrier 2013
  987. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement