Advertisement
memberhero

Mage Script FE

Nov 25th, 2020 (edited)
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.97 KB | None | 0 0
  1. --FE Template
  2. if (game:GetService('RunService'):IsServer()) then return error('This script cannot be ran server-sided, please use hl/',0); end;
  3.  
  4. local remote = NS ([=[
  5.  
  6. --[[
  7. Mage script made by Fenrier.
  8. Made for an upcoming game I will be making. Don't expect it to be out anytime soon though.
  9. And hello hacker :D
  10. Have fun with my scripts by the way c:
  11. ]]
  12. Player = owner
  13. Character = Player.Character
  14. PlayerGui = Player.PlayerGui
  15. Backpack = Player.Backpack
  16. Torso = Character.Torso
  17. Head = Character.Head
  18. Humanoid = Character.Humanoid
  19. LeftArm = Character["Left Arm"]
  20. LeftLeg = Character["Left Leg"]
  21. RightArm = Character["Right Arm"]
  22. RightLeg = Character["Right Leg"]
  23. LS = Torso["Left Shoulder"]
  24. LH = Torso["Left Hip"]
  25. RS = Torso["Right Shoulder"]
  26. RH = Torso["Right Hip"]
  27. Neck = Torso.Neck
  28. it=Instance.new
  29. vt=Vector3.new
  30. cf=CFrame.new
  31. euler=CFrame.fromEulerAnglesXYZ
  32. angles=CFrame.Angles
  33. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  34. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  35. attack = false
  36. attacktype = 1
  37. damage = 5
  38. oridamage = 50
  39. attackdebounce = false
  40. ssdebounce=false
  41. MMouse=nil
  42. combo=0
  43. --player
  44. player = nil
  45. --save shoulders
  46. RSH, LSH = nil, nil
  47. --welds
  48. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  49. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  50. mana = 400
  51.  
  52.  
  53. if Character:findFirstChild("Staff",true) ~= nil then
  54. Character:findFirstChild("Staff",true).Parent = nil
  55. end
  56. if Character:findFirstChild("Block",true) ~= nil then
  57. Character:findFirstChild("Block",true).Parent = nil
  58. end
  59. if Player.PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  60. Player.PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  61. end
  62.  
  63. local fengui = Instance.new("GuiMain")
  64. fengui.Parent = Player.PlayerGui
  65. fengui.Name = "manaGUI"
  66. local fenframe = Instance.new("Frame")
  67. fenframe.Parent = fengui
  68. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  69. fenframe.BackgroundTransparency = 1
  70. fenframe.BorderColor3 = Color3.new(17,17,17)
  71. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  72. local fentext = Instance.new("TextLabel")
  73. fentext.Parent = fenframe
  74. fentext.Text = "Energy("..mana..")"
  75. fentext.BackgroundTransparency = 1
  76. fentext.SizeConstraint = "RelativeXY"
  77. fentext.TextXAlignment = "Center"
  78. fentext.TextYAlignment = "Center"
  79. fentext.Position = UDim2.new(0,80,1,200)
  80. local fentext2 = Instance.new("TextLabel")
  81. fentext2.Parent = fenframe
  82. fentext2.Text = " "
  83. fentext2.BackgroundTransparency = 0
  84. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  85. fentext2.SizeConstraint = "RelativeXY"
  86. fentext2.TextXAlignment = "Center"
  87. fentext2.TextYAlignment = "Center"
  88. fentext2.Position = UDim2.new(0,10,1,170)
  89. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  90. local fentext3 = Instance.new("TextLabel")
  91. fentext3.Parent = fenframe
  92. fentext3.Text = " "
  93. fentext3.BackgroundTransparency = 0
  94. fentext3.BackgroundColor3 = Color3.new(1,1,0)
  95. fentext3.SizeConstraint = "RelativeXY"
  96. fentext3.TextXAlignment = "Center"
  97. fentext3.TextYAlignment = "Center"
  98. fentext3.Position = UDim2.new(0,10,1,170)
  99. fentext3.Size = UDim2.new(mana*0.007,0,0.400000006,0)
  100.  
  101. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  102. local fp = it("Part")
  103. fp.formFactor = formfactor
  104. fp.Parent = parent
  105. fp.Reflectance = reflectance
  106. fp.Transparency = transparency
  107. fp.CanCollide = false
  108. fp.Locked=true
  109. fp.BrickColor = brickcolor
  110. fp.Name = name
  111. fp.Size = size
  112. fp.Position = Torso.Position
  113. fp.BottomSurface="Smooth"
  114. fp.TopSurface="Smooth"
  115. fp:BreakJoints()
  116. return fp
  117. end
  118.  
  119. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  120. local mesh = it(Mesh)
  121. mesh.Parent = part
  122. if Mesh=="SpecialMesh" then
  123. mesh.MeshType = meshtype
  124. mesh.MeshId = meshid
  125. end
  126. mesh.Offset=offset
  127. mesh.Scale=scale
  128. return mesh
  129. end
  130.  
  131. function weld(parent,part0,part1,c0)
  132. local weld = it("Weld")
  133. weld.Parent = parent
  134. weld.Part0 = part0
  135. weld.Part1 = part1
  136. weld.C0 = c0
  137. return weld
  138. end
  139.  
  140. local modelzorz = Instance.new("Model")
  141. modelzorz.Parent = Character
  142. modelzorz.Name = "Staff"
  143.  
  144. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
  145. local prt2=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part2",vt(0.5,5,0.5))
  146. local prt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.55,0.5,0.55))
  147. local prt7=part(3,modelzorz,0,0.3,BrickColor.new("White"),"Part7",vt(1,1,1))
  148. local prt8b=part(3,modelzorz,0,1,BrickColor.new("Black"),"Skill Crystal Reference",vt(0.2,0.2,0.2))
  149. local prt8=part(3,modelzorz,0,0.5,BrickColor.new("Bright red"),"Skill Crystal 1",vt(1,1,1))
  150. local prt9b=part(3,modelzorz,0,1,BrickColor.new("Black"),"Skill Crystal Reference",vt(0.2,0.2,0.2))
  151. local prt9=part(3,modelzorz,0,0.5,BrickColor.new("Bright blue"),"Skill Crystal 2",vt(1,1,1))
  152. local prt10b=part(3,modelzorz,0,1,BrickColor.new("Black"),"Skill Crystal Reference",vt(0.2,0.2,0.2))
  153. local prt10=part(3,modelzorz,0,0.5,BrickColor.new("Bright green"),"Skill Crystal 3",vt(1,1,1))
  154. local prt11b=part(3,modelzorz,0,1,BrickColor.new("Black"),"Skill Crystal Reference",vt(0.2,0.2,0.2))
  155. local prt11=part(3,modelzorz,0,0.5,BrickColor.new("Black"),"Skill Crystal 4",vt(1,1,1))
  156. local prt12=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part12",vt(0.6,0.5,0.6))
  157. local prt13=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox",vt(1,7,1))
  158.  
  159. local msh1=mesh("SpecialMesh",prt1,"Head","",vt(0,0,0),vt(0.6,1.8,0.6))
  160. local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(1,1,1))
  161. local msh3=mesh("SpecialMesh",prt3,"Head","",vt(0,0,0),vt(1,1,1))
  162. local msh7=mesh("SpecialMesh",prt7,"Sphere","",vt(0,0,0),vt(1,1,1))
  163. local msh8=mesh("SpecialMesh",prt8,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.3,0.5,0.3))
  164. local msh9=mesh("SpecialMesh",prt9,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.3,0.5,0.3))
  165. local msh10=mesh("SpecialMesh",prt10,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.3,0.5,0.3))
  166. local msh11=mesh("SpecialMesh",prt11,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.4,0.6,0.4))
  167. local msh12=mesh("SpecialMesh",prt12,"Head","",vt(0,0,0),vt(1,1,1))
  168.  
  169. local wld1=weld(prt1,prt1,Torso,euler(0,0,0.5)*cf(0,0,-0.6))
  170. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  171. local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,-2.4,0))
  172. local wld7=weld(prt7,prt7,prt2,euler(0,0,0)*cf(0,-3.5,0))
  173. local wld8b=weld(prt8b,prt8b,prt7,euler(0,0,0)*cf(1,0,0))
  174. local wld8=weld(prt8,prt8,prt8b,euler(0,0,0)*cf(0,0,0))
  175. local wld9b=weld(prt9b,prt9b,prt7,euler(0,0,0)*cf(0,0,1))
  176. local wld9=weld(prt9,prt9,prt9b,euler(0,0,0)*cf(0,0,0))
  177. local wld10b=weld(prt10b,prt10b,prt7,euler(0,0,0)*cf(-1,0,0))
  178. local wld10=weld(prt10,prt10,prt10b,euler(0,0,0)*cf(0,0,0))
  179. local wld11b=weld(prt11b,prt11b,prt7,euler(0,0,0)*cf(0,0,-1))
  180. local wld11=weld(prt11,prt11,prt11b,euler(0,0,0)*cf(0,0,0))
  181. local wld12=weld(prt12,prt12,prt2,euler(0,0,0)*cf(0,2.4,0))
  182. local wld13=weld(prt13,prt13,prt1,euler(0,0,0)*cf(0,-0.5,0))
  183. coroutine.resume(coroutine.create(function()
  184. while true do
  185. wait()
  186. wld8b.C0=wld8b.C0*euler(0,0.05,0)
  187. wld9b.C0=wld9b.C0*euler(0,0.05,0)
  188. wld10b.C0=wld10b.C0*euler(0,0.05,0)
  189. wld11b.C0=wld11b.C0*euler(0,0.05,0)
  190. end
  191. end))
  192.  
  193. for i=1,4 do
  194. if i==1 then
  195. numb=1
  196. numb2=-1.5
  197. numb3=0
  198. numb4=0
  199. elseif i==2 then
  200. numb=-1
  201. numb2=1.5
  202. elseif i==3 then
  203. numb=0
  204. numb2=0
  205. numb3=1
  206. numb4=-1.5
  207. elseif i==4 then
  208. numb3=-1
  209. numb4=1.5
  210. end
  211. local prt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part4",vt(0.2,0.8,0.2))
  212. local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part5",vt(0.2,0.2,0.2))
  213. local prt6=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part6",vt(0.2,0.8,0.2))
  214. local msh4=mesh("CylinderMesh",prt4,"","",vt(0,0,0),vt(1,1,1))
  215. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,1,1))
  216. local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(1,1,1))
  217. local wld4=weld(prt4,prt4,prt3,cf(0,-0.4,0)*euler(numb,0,numb3))
  218. local wld5=weld(prt5,prt5,prt4,cf(0,-0.4,0))
  219. local wld6=weld(prt6,prt6,prt5,cf(0,-0.4,0)*euler(numb2,0,numb4))
  220. end
  221.  
  222.  
  223.  
  224. local bg = it("BodyGyro")
  225. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  226. bg.P = 20e+003
  227. bg.Parent = nil
  228.  
  229. so = function(id,par,vol,pit)
  230. coroutine.resume(coroutine.create(function()
  231. local sou = Instance.new("Sound",par or workspace)
  232. sou.Volume=vol
  233. sou.Pitch=pit or 1
  234. sou.SoundId=id
  235. wait()
  236. sou:play()
  237. wait(6)
  238. sou:Remove()
  239. end))
  240. end
  241.  
  242. function unequipweld()
  243. wld1.Part1=Torso
  244. wld1.C0=euler(0,0,0.5)*cf(0,0,-0.6)
  245. wld1.C1=euler(0,0,0)
  246. end
  247.  
  248. function equipweld()
  249. wld1.Part1=RightArm
  250. wld1.C0=euler(1,0,0)*cf(0,1,0)
  251. end
  252.  
  253. function hideanim()
  254. equipped=false
  255. wait(0.1)
  256. bg.Parent=nil
  257. unequipweld()
  258. end
  259.  
  260. function equipanim()
  261. equipped=true
  262. wait(0.1)
  263. equipweld()
  264. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  265. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  266. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  267. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  268. end
  269.  
  270. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  271. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  272. end
  273.  
  274. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  275. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  276. prt.Anchored=true
  277. prt.CFrame=cframe
  278. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  279. coroutine.resume(coroutine.create(function()
  280. for i=0,1,0.1 do
  281. wait()
  282. prt.CFrame=prt.CFrame
  283. prt.Transparency=i
  284. msh.Scale=msh.Scale+vt(x3,y3,z3)
  285. end
  286. prt.Parent=nil
  287. end))
  288. end
  289.  
  290. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  291. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  292. prt.Anchored=true
  293. prt.CFrame=cframe*cf(x2,y2,z2)
  294. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  295. coroutine.resume(coroutine.create(function()
  296. for i=0,1,0.1 do
  297. wait()
  298. prt.CFrame=prt.CFrame
  299. prt.Transparency=i
  300. msh.Scale=msh.Scale+vt(x3,y3,z3)
  301. end
  302. prt.Parent=nil
  303. end))
  304. end
  305.  
  306. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  307. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  308. prt.Anchored=true
  309. prt.CFrame=cframe*cf(x2,y2,z2)
  310. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  311. coroutine.resume(coroutine.create(function()
  312. for i=0,1,0.03 do
  313. wait()
  314. prt.CFrame=prt.CFrame
  315. prt.Transparency=i
  316. msh.Scale=msh.Scale+vt(x3,y3,z3)
  317. end
  318. prt.Parent=nil
  319. end))
  320. end
  321.  
  322. function SpecialEffect()
  323. local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
  324. prt.Anchored=true
  325. prt.CFrame=Torso.CFrame
  326. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  327. coroutine.resume(coroutine.create(function(Part,Mesh)
  328. for i=0,1,0.2 do
  329. wait(0)
  330. Part.Transparency=i
  331. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  332. end
  333. prt.Parent=nil
  334. end),prt,msh)
  335. end
  336.  
  337. Damagefunc1=function(hit,Damage,Knockback)
  338. if hit.Parent==nil then
  339. return
  340. end
  341.  
  342. h=hit.Parent:FindFirstChild("Humanoid")
  343. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  344. if attackdebounce == false then
  345. attackdebounce = true
  346. coroutine.resume(coroutine.create(function()
  347. wait(0.2)
  348. attackdebounce = false
  349. end))
  350. Damage=Damage
  351. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  352. return
  353. end]]
  354. -- hs(hit,1.2)
  355. c=Instance.new("ObjectValue")
  356. c.Name="creator"
  357. c.Value=game.Players.LocalPlayer
  358. c.Parent=h
  359. game:GetService("Debris"):AddItem(c,.5)
  360. Damage=Damage+math.random(0,10)
  361. -- h:TakeDamage(Damage)
  362. blocked=false
  363. block=hit.Parent:findFirstChild("Block")
  364. if block~=nil then
  365. print("herp")
  366. if block.Value>0 then
  367. blocked=true
  368. block.Value=block.Value-1
  369. print(block.Value)
  370. end
  371. end
  372. if blocked==false then
  373. -- h:TakeDamage(Damage)
  374. HitHealth=h.Health
  375. h.Health=h.Health-Damage
  376.  
  377. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  378. print("gained spree")
  379. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value=game.Players.LocalPlayer.leaderstats.Spree.Value+1
  380. end
  381. showDamage(hit.Parent,Damage,.5)
  382. else
  383. h:TakeDamage(1)
  384. showDamage(hit.Parent,1,.5)
  385. end
  386. so("http://roblox.com/asset/?id=10209583",hit,1,1)
  387. vp=Instance.new("BodyVelocity")
  388. vp.P=500
  389. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  390. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  391. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  392. if Knockback>0 then
  393. vp.Parent=hit.Parent.Torso
  394. end
  395. game:GetService("Debris"):AddItem(vp,.25)
  396. game:GetService("Debris"):AddItem(r,.5)
  397. c=Instance.new("ObjectValue")
  398. c.Name="creator"
  399. c.Value=Player
  400. c.Parent=h
  401. game:GetService("Debris"):AddItem(c,.5)
  402. CRIT=false
  403. hitDeb=true
  404. AttackPos=6
  405. end
  406. end
  407. end
  408.  
  409. Damagefunc2=function(hit,Damage,Base)
  410. if attackdebounce == false then
  411. attackdebounce = true
  412. coroutine.resume(coroutine.create(function()
  413. wait(0.1)
  414. attackdebounce = false
  415. end))
  416. if hit.Parent==nil then
  417. return
  418. end
  419. CPlayer=Bin
  420. blocked=false
  421. h=hit.Parent:FindFirstChild("Humanoid")
  422. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  423. Damage=Damage
  424. c=it("ObjectValue")
  425. c.Name="creator"
  426. c.Value=game.Players.LocalPlayer
  427. c.Parent=h
  428. game:GetService("Debris"):AddItem(c,.5)
  429. -- print(c.Value)
  430. --[[ if math.random(0,99)+math.random()<=7.8 then
  431. CRIT=true
  432. Damage=Damage*2
  433. s=it("Sound")
  434. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  435. s.Volume=1
  436. s.Pitch=2
  437. s.Parent=hit
  438. s.PlayOnRemove=true
  439. s.Parent=nil
  440.  
  441. end]]
  442. Damage=Damage+math.random(0,10)
  443. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  444. blocked=false
  445. block=hit.Parent:findFirstChild("Block")
  446. if block~=nil then
  447. print("herp")
  448. if block.Value>0 then
  449. blocked=true
  450. block.Value=block.Value-3
  451. print(block.Value)
  452. end
  453. end
  454. if blocked==false then
  455. -- h:TakeDamage(Damage)
  456. h.Health=h.Health-Damage
  457. HitHealth=h.Health
  458. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  459. print("gained spree")
  460. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value=game.Players.LocalPlayer.leaderstats.Spree.Value+1
  461. end
  462. showDamage(hit.Parent,Damage,.5)
  463. else
  464. h:TakeDamage(1)
  465. showDamage(hit.Parent,1,.5)
  466. end
  467. --if blocked==false then
  468. local angle = (hit.Position-(Base.Position+Vector3.new(0,0,0))).unit
  469. print(angle)
  470. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  471. rl=Instance.new("BodyAngularVelocity")
  472. rl.P=3000
  473. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  474. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  475. rl.Parent=hit
  476. coroutine.resume(coroutine.create(function(vel)
  477. wait(1)
  478. vel:Remove()
  479. end),rl)
  480. --end
  481. local bodyVelocity=Instance.new("BodyVelocity")
  482. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  483. bodyVelocity.P=5000
  484. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  485. bodyVelocity.Parent=hit
  486. coroutine.resume(coroutine.create(function(Vel)
  487. wait(0.7)
  488. Vel:Remove()
  489. end),bodyVelocity)
  490. c=it("ObjectValue")
  491. c.Name="creator"
  492. c.Value=Player
  493. c.Parent=h
  494. game:GetService("Debris"):AddItem(c,.5)
  495. CRIT=false
  496. hitDeb=true
  497. AttackPos=6
  498. end
  499. end
  500. end
  501. freezeDamagefunc=function(hit,Damage,Knockback)
  502. if hit.Parent==nil then
  503. return
  504. end
  505. CPlayer=Bin
  506. h=hit.Parent:FindFirstChild("Humanoid")
  507. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  508. if attackdebounce == false then
  509. attackdebounce = true
  510. coroutine.resume(coroutine.create(function()
  511. wait(0.2)
  512. attackdebounce = false
  513. end))
  514. Damage=Damage
  515. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  516. return
  517. end]]
  518. -- hs(hit,1.2)
  519. c=Instance.new("ObjectValue")
  520. c.Name="creator"
  521. c.Value=game.Players.LocalPlayer
  522. c.Parent=h
  523. game:GetService("Debris"):AddItem(c,.5)
  524. Damage=Damage+math.random(0,10)
  525. -- h:TakeDamage(Damage)
  526. blocked=false
  527. block=hit.Parent:findFirstChild("Block")
  528. if block~=nil then
  529. print("herp")
  530. if block.Value>0 then
  531. blocked=true
  532. block.Value=block.Value-1
  533. print(block.Value)
  534. end
  535. end
  536. if blocked==false then
  537. -- h:TakeDamage(Damage)
  538. h.Health=h.Health-Damage
  539. HitHealth=h.Health
  540. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  541. print("gained spree")
  542. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value=game.Players.LocalPlayer.leaderstats.Spree.Value+1
  543. end
  544. showDamage(hit.Parent,Damage,.5)
  545. else
  546. h:TakeDamage(1)
  547. showDamage(hit.Parent,1,.5)
  548. end
  549. if math.random(1,1)==1 then
  550. BodPos=Instance.new("BodyPosition")
  551. BodPos.P=50000
  552. BodPos.D=1000
  553. BodPos.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  554. BodPos.position=hit.Parent.Torso.Position
  555. BodPos.Parent=hit.Parent.Torso
  556. BodGy = it("BodyGyro")
  557. BodGy.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  558. BodGy.P = 20e+003
  559. BodGy.Parent=hit.Parent.Torso
  560. BodGy.cframe = hit.Parent.Torso.CFrame
  561. showDamage(hit.Parent,"Freeze!",5)
  562. so("http://www.roblox.com/asset/?id=41763367",hit,1,2)
  563. for i=1,10 do
  564. local freezepart=part(3,hit.Parent,0.5,0.5,BrickColor.new("Bright blue"),"Ice Part",vt(math.random(2,3)+math.random(),math.random(2,3)+math.random(),math.random(2,3)+math.random()))
  565. freezepart.Anchored=true
  566. freezepart.CFrame=hit.Parent.Torso.CFrame*cf(math.random(-1,0)+math.random(),-2.5,math.random(-1,0)+math.random())*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  567. coroutine.resume(coroutine.create(function(Part)
  568. wait(5)
  569. Part.Anchored=false
  570. Part.Velocity=vt(math.random(-20,20),math.random(20,30),math.random(-20,20))
  571. wait(5)
  572. Part.Parent=nil
  573. end),freezepart)
  574. end
  575. coroutine.resume(coroutine.create(function(BodyPos,BodyGy,Hitted)
  576. wait(5)
  577. BodyPos.Parent=nil
  578. BodyGy.Parent=nil
  579. so("http://www.roblox.com/asset/?id=87015121",Hitted,1,2)
  580. end),BodPos,BodGy,hit)
  581. end
  582. vp=Instance.new("BodyVelocity")
  583. vp.P=500
  584. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  585. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  586. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  587. if Knockback>0 then
  588. vp.Parent=hit.Parent.Torso
  589. end
  590. game:GetService("Debris"):AddItem(vp,.25)
  591. c=Instance.new("ObjectValue")
  592. c.Name="creator"
  593. c.Value=Player
  594. c.Parent=h
  595. game:GetService("Debris"):AddItem(c,.5)
  596. CRIT=false
  597. hitDeb=true
  598. AttackPos=6
  599. end
  600. end
  601. end
  602.  
  603. showDamage=function(Char,Dealt,du)
  604. m=Instance.new("Model")
  605. m.Name=tostring(Dealt)
  606. h=Instance.new("Humanoid")
  607. h.Health=0
  608. h.MaxHealth=0
  609. h.Parent=m
  610. c=Instance.new("Part")
  611. c.Transparency=0
  612. c.BrickColor=BrickColor:Red()
  613. if CRIT==true then
  614. c.BrickColor=BrickColor.new("Really red")
  615. end
  616. c.Name="Head"
  617. c.TopSurface=0
  618. c.BottomSurface=0
  619. c.formFactor="Plate"
  620. c.Size=Vector3.new(1,.4,1)
  621. ms=Instance.new("CylinderMesh")
  622. ms.Scale=Vector3.new(.8,.8,.8)
  623. if CRIT==true then
  624. ms.Scale=Vector3.new(1,1.25,1)
  625. end
  626. ms.Parent=c
  627. c.Reflectance=0
  628. Instance.new("BodyGyro").Parent=c
  629. c.Parent=m
  630. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  631. f=Instance.new("BodyPosition")
  632. f.P=2000
  633. f.D=100
  634. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  635. f.position=c.Position+Vector3.new(0,3,0)
  636. f.Parent=c
  637. game:GetService("Debris"):AddItem(m,.5+du)
  638. c.CanCollide=false
  639. m.Parent=workspace
  640. c.CanCollide=false
  641. end
  642.  
  643. function CrystalEffect(crystal)
  644. clone=crystal:Clone()
  645. crystal.Transparency=1
  646. clone.Parent=workspace
  647. clone.Anchored=false
  648. clone.CFrame=crystal.CFrame
  649. Mesh=clone.Mesh
  650. coroutine.resume(coroutine.create(function()
  651. for i=0.5,1,0.05 do
  652. wait()
  653. clone.Transparency=i
  654. Mesh.Scale=Mesh.Scale+vt(0.3,0.3,0.3)
  655. end
  656. clone.Parent=nil
  657. end))
  658. end
  659.  
  660. function ChangeBaseColor(Colorr)
  661. clonee=prt7:Clone()
  662. clonee.Parent=prt7.Parent
  663. clonee.BrickColor=BrickColor.new(Colorr)
  664. if clonee:findFirstChild("Mesh")~=nil then
  665. clonee.Mesh.Scale=vt(1.4,1.4,1.4)
  666. end
  667. clonewld=weld(clonee,clonee,prt7,cf(0,0,0))
  668. coroutine.resume(coroutine.create(function(Part)
  669. for i=1,0.2,-0.05 do
  670. wait()
  671. Part.Transparency=i
  672. end
  673. while attack==true do
  674. wait()
  675. end
  676. for i=0.2,1,0.05 do
  677. wait()
  678. Part.Transparency=i
  679. end
  680. Part.Parent=nil
  681. end),clonee)
  682. end
  683.  
  684. function Explode()
  685. local basepart=part(3,workspace,0,1,BrickColor.new("Black"),"BasePart",vt(1,1,1))
  686. basepart.Anchored=true
  687. basepart.CFrame=Torso.CFrame*cf(0,0,-20)
  688. MagicCircle(BrickColor.new("Bright red"),basepart.CFrame,1,1,1,0,0,0,10,10,10)
  689. MagicRing(BrickColor.new("Bright red"),basepart.CFrame*euler(1.57,0,0),1,1,1,0,0,0,3,3,3)
  690. b=Instance.new("Explosion")
  691. b.Parent=workspace
  692. b.Position=basepart.Position
  693. b.BlastRadius=10
  694. b.BlastPressure=0
  695. so("http://www.roblox.com/asset/?id=2101148",basepart,1,0.6)
  696. local c = game.Workspace:GetChildren()
  697. for i = 1, #c do
  698. local hum = c[i]:findFirstChild("Humanoid")
  699. if hum ~= nil and hum.Health ~= 0 then
  700. local head = c[i]:findFirstChild("Head")
  701. if head ~= nil then
  702. local targ = head.Position - basepart.Position
  703. local mag = targ.magnitude
  704. if mag <= 20 and c[i].Name ~= Player.Name then
  705. attackdebounce=false
  706. Damagefunc2(head,10,basepart)
  707. end
  708. end
  709. end
  710. end
  711. game:GetService("Debris"):AddItem(basepart,1)
  712. end
  713.  
  714. function CreateIceSword(BaseCFrame)
  715. local basepart=part(3,workspace,0,1,BrickColor.new("Black"),"BasePart",vt(1,1,1))
  716. so("http://www.roblox.com/asset/?id=32656754",basepart,0.5,1)
  717. basepart.Anchored=true
  718. game:GetService("Debris"):AddItem(basepart,0.2)
  719. local icepart=part(3,workspace,0.5,0.5,BrickColor.new("Bright blue"),"IceSword",vt(2,6,2))
  720. icepart.CanCollide=true
  721. icepart.Anchored=true
  722. local icemesh=mesh("SpecialMesh",icepart,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(4,10,4))
  723. basepart.CFrame=BaseCFrame
  724. icepart.CFrame=basepart.CFrame*cf(0,-10,0)
  725. local c = game.Workspace:GetChildren()
  726. for i = 1, #c do
  727. local hum = c[i]:findFirstChild("Humanoid")
  728. if hum ~= nil and hum.Health ~= 0 then
  729. local head = c[i]:findFirstChild("Head")
  730. if head ~= nil then
  731. local targ = head.Position - basepart.Position
  732. local mag = targ.magnitude
  733. if mag <= 5 and c[i].Name ~= Player.Name then
  734. attackdebounce=false
  735. freezeDamagefunc(head,10,10)
  736. end
  737. end
  738. end
  739. end
  740. coroutine.resume(coroutine.create(function(Part)
  741. for i=0,1,0.1 do
  742. wait()
  743. Part.CFrame=Part.CFrame*cf(0,0.8,0)
  744. end
  745. wait(1)
  746. Part.Parent=nil
  747. end),icepart)
  748. end
  749.  
  750. function Rock()
  751. local rock=part(3,workspace,0,0,BrickColor.new("Bright green"),"Rock",vt(math.random(1,3)+math.random(),math.random(1,3)+math.random(),math.random(1,3)+math.random()))
  752. rock.Material="Slate"
  753. rock.Anchored=true
  754. rock.CanCollide=true
  755. rock.CFrame=Torso.CFrame*cf(math.random(-20,20),math.random(-15,-10)-math.random(),math.random(-20,20))
  756. coroutine.resume(coroutine.create(function(Part)
  757. for i=1,20 do
  758. wait()
  759. Part.CFrame=Part.CFrame*cf(0,1,0)
  760. end
  761. while rockthrow==false do
  762. wait()
  763. end
  764. Part.Anchored=false
  765. Part.Velocity=(Torso.CFrame.lookVector*90)+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  766. con1=Part.Touched:connect(function(hit)
  767. if hit.Parent:findFirstChild("Humanoid")~=nil and hit.Parent~=Character then
  768. Part.Parent=nil
  769. for i=1,math.random(2,5) do
  770. minirock=part(3,workspace,0,0,BrickColor.new("Bright green"),"Rock",vt(math.random(0,1)+math.random(),math.random(0,1)+math.random(),math.random(0,1)+math.random()))
  771. minirock.Material="Slate"
  772. minirock.CanCollide=true
  773. minirock.CFrame=Part.CFrame
  774. minirock.Velocity=vt(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  775. game:GetService("Debris"):AddItem(minirock,5)
  776. end
  777. h=hit.Parent.Humanoid
  778. Damage=math.random(10,20)
  779. blocked=false
  780. block=hit.Parent:findFirstChild("Block")
  781. if block~=nil then
  782. print("herp")
  783. if block.Value>0 then
  784. blocked=true
  785. block.Value=block.Value-1
  786. print(block.Value)
  787. end
  788. end
  789. if blocked==false then
  790. -- h:TakeDamage(Damage)
  791. h.Health=h.Health-Damage
  792. HitHealth=h.Health
  793. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  794. print("gained spree")
  795. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value=game.Players.LocalPlayer.leaderstats.Spree.Value+1
  796. end
  797. showDamage(hit.Parent,Damage,.5)
  798. else
  799. h:TakeDamage(1)
  800. showDamage(hit.Parent,1,.5)
  801. end
  802. vp=Instance.new("BodyVelocity")
  803. vp.P=500
  804. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  805. vp.velocity=Torso.CFrame.lookVector*20+Torso.Velocity/1.05
  806. vp.Parent=hit.Parent.Torso
  807. rl=Instance.new("BodyAngularVelocity")
  808. rl.P=3000
  809. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  810. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  811. rl.Parent=hit
  812. game:GetService("Debris"):AddItem(vp,.25)
  813. game:GetService("Debris"):AddItem(rl,.25)
  814. end
  815. end)
  816. game:GetService("Debris"):AddItem(Part,5)
  817. --[[wait(5)
  818. Part.Parent=nil]]
  819. end),rock)
  820. end
  821.  
  822. function Lightning(p0,p1,tym,ofs,col,th,tra)
  823. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  824. for i=1,tym do
  825. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = false li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  826. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  827. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  828. if tym == i then
  829. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  830. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  831. else
  832. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  833. end
  834. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,0.25)
  835. end
  836. end
  837.  
  838. DarkRiftF=function(par,DemMags)
  839. while rifting==true do
  840. wait()
  841. PWN={}
  842. for _,v in pairs(workspace:children()) do
  843. if v.className=="Model" and v:FindFirstChild("Humanoid")~=nil then
  844. if v.Humanoid.Health>0 and v:FindFirstChild("Torso")~=nil then
  845. if v~=Character and (v.Torso.Position-par.Position).magnitude<=DemMags then
  846. table.insert(PWN,v.Torso)
  847. end
  848. end
  849. end
  850. end
  851. for _,t in pairs(PWN) do
  852. Mag=(par.Position-t.Position).magnitude/2
  853. t.Parent.Humanoid:TakeDamage(1)
  854. rl=it("BodyAngularVelocity")
  855. rl.P=3000
  856. rl.maxTorque=vt(500000,500000,500000)*5000
  857. rl.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))/10
  858. rl.Parent=t
  859. game:GetService("Debris"):AddItem(rl,.1)
  860. if Mag<=2 then
  861. t.Parent.Humanoid:TakeDamage(.5)
  862. else
  863. vl=it("BodyVelocity")
  864. vl.P=3000
  865. vl.maxForce=vt(500000000,500000000,500000000)
  866. vl.velocity=(t.Position-par.Position).unit*-(70/(Mag))
  867. vl.Parent=t
  868. game:GetService("Debris"):AddItem(vl,.1)
  869. end
  870. end
  871. wait(.08)
  872. end
  873. end
  874.  
  875. function thwack()
  876. attack=true
  877. for i=0,1,0.2 do
  878. wait()
  879. RW.C0=cf(1.5, 0.5, 0) * euler(1+2.5*i,0,0)
  880. end
  881. so("http://roblox.com/asset/?id=10209640",RightArm,1,1.1)
  882. con1=prt13.Touched:connect(function(hit) Damagefunc1(hit,5,20) end)
  883. for i=0,1,0.2 do
  884. wait()
  885. wld1.C0=euler(1+1*i,0,0)*cf(0,1,0)
  886. RW.C0=cf(1.5, 0.5, 0) * euler(3.5-3*i,0,0)
  887. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5*i,0,-0.2)
  888. end
  889. con1:disconnect()
  890. attack=false
  891. end
  892.  
  893. function Explosion()
  894. if mana < 100 then return end
  895. mana=mana-100
  896. --SpecialEffect()
  897. attack=true
  898. CrystalEffect(prt8)
  899. ChangeBaseColor("Bright red")
  900. for i=0,1,0.1 do
  901. wait()
  902. wld1.C0=euler(1+0.57*i,0,0)*cf(0,1,0)
  903. RW.C0=cf(1.5, 0.5, 0) * euler(1+2.5*i,0,0)
  904. end
  905. so("http://roblox.com/asset/?id=10209640",RightArm,1,1.1)
  906. for i=0,1,0.2 do
  907. wait()
  908. RW.C0=cf(1.5, 0.5, 0) * euler(3.5-4*i,0,0)
  909. if i==0.8 then
  910. print("KABOOM")
  911. Explode()
  912. end
  913. end
  914. wait(0.5)
  915. for i=0,1,0.1 do
  916. wait()
  917. wld1.C0=euler(1.57-0.57*i,0,0)*cf(0,1,0)
  918. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+1.5*i,0,0)
  919. end
  920. attack=false
  921. end
  922.  
  923. function IceSword()
  924. if mana < 70 then return end
  925. mana=mana-70
  926. attack=true
  927. CrystalEffect(prt9)
  928. ChangeBaseColor("Bright blue")
  929. for i=0,1,0.1 do
  930. wait()
  931. wld1.C0=euler(1+0.57*i,0,0)*cf(0,1,0)
  932. RW.C0=cf(1.5, 0.5, 0) * euler(1-1.5*i,0,0)
  933. end
  934. for i=0,1,0.2 do
  935. wait()
  936. wld1.C0=euler(1.57+1*i,0,0)*cf(0,1,0)
  937. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2*i,0,0)
  938. end
  939. numb=-10
  940. for i=1,5 do
  941. CreateIceSword(Torso.CFrame*cf(0,0,numb))
  942. CreateIceSword(Torso.CFrame*euler(0,0.5,0)*cf(0,0,numb))
  943. CreateIceSword(Torso.CFrame*euler(0,1,0)*cf(0,0,numb))
  944. CreateIceSword(Torso.CFrame*euler(0,-0.5,0)*cf(0,0,numb))
  945. CreateIceSword(Torso.CFrame*euler(0,-1,0)*cf(0,0,numb))
  946. numb=numb-10
  947. wait(0.2)
  948. end
  949. for i=0,1,0.1 do
  950. wait()
  951. wld1.C0=euler(2.57-1.57*i,0,0)*cf(0,1,0)
  952. RW.C0=cf(1.5, 0.5, 0) * euler(1.5-0.5*i,0,0)
  953. end
  954. attack=false
  955. end
  956.  
  957. function RockSwarm()
  958. if mana < 80 then return end
  959. mana=mana-80
  960. attack=true
  961. rockthrow=false
  962. CrystalEffect(prt10)
  963. ChangeBaseColor("Bright green")
  964. for i=0,1,0.1 do
  965. wait()
  966. wld1.C0=euler(1+1.5*i,0,0)*cf(0,1,0)
  967. RW.C0=cf(1.5, 0.5, 0) * euler(1+1.5*i,0,0)
  968. end
  969. for i=1,15 do
  970. Rock()
  971. wait(0.1)
  972. end
  973. wait(0.5)
  974. for i=0,1,0.1 do
  975. wait()
  976. wld1.C0=euler(2.5-1*i,0,0)*cf(0,1,0)
  977. RW.C0=cf(1.5, 0.5, 0) * euler(2.5-2*i,0,0)
  978. end
  979. for i=0,1,0.2 do
  980. wait()
  981. wld1.C0=euler(1.5+1*i,0,0)*cf(0,1,0)
  982. RW.C0=cf(1.5, 0.5, 0) * euler(0.5+1*i,0,0)
  983. end
  984. rockthrow=true
  985. wait(1)
  986. for i=0,1,0.1 do
  987. wait()
  988. wld1.C0=euler(2.5-1.5*i,0,0)*cf(0,1,0)
  989. RW.C0=cf(1.5, 0.5, 0) * euler(1.5-0.5*i,0,0)
  990. end
  991. attack=false
  992. end
  993.  
  994. function Void()
  995. if mana < 110 then return end
  996. mana=mana-110
  997. attack=true
  998. print("Mage SS initiated.")
  999. CrystalEffect(prt11)
  1000. ChangeBaseColor("Black")
  1001. local basepart=part(3,workspace,0,0.1,BrickColor.new("Black"),"BasePart",vt(1,1,1))
  1002. local basemesh=mesh("SpecialMesh",basepart,"Sphere","",vt(0,0,0),vt(0,0,0))
  1003. basepart.Anchored=true
  1004. basepart.CFrame=Torso.CFrame*cf(0,0,-30)
  1005. numb=0
  1006. coroutine.resume(coroutine.create(function()
  1007. for i=0,1,0.05 do
  1008. wait()
  1009. wld1.C0=euler(1+2*i,0,0)*cf(0,1,0)
  1010. RW.C0=cf(1.5, 0.5, 0) * euler(1+0.5*i,0,0)
  1011. end
  1012. end))
  1013. for i=1,60 do
  1014. wait()
  1015. basemesh.Scale=basemesh.Scale+vt(0.1,0.1,0.1)
  1016. Lightning(prt7.Position,basepart.Position+vt(math.random(-numb,numb),math.random(-numb,numb),math.random(-numb,numb)),5,1,"Black",0.3,0.1)
  1017. numb=numb+0.05
  1018. end
  1019. if Humanoid.Health==0 then
  1020. basepart.Parent=nil
  1021. return
  1022. end
  1023. for i=0,1,0.1 do
  1024. wait()
  1025. wld1.C0=euler(3,0,0)*cf(0,1,0)
  1026. RW.C0=cf(1.5, 0.5, 0) * euler(1.5+1.5*i,0,0)
  1027. end
  1028. rifting=true
  1029. coroutine.resume(coroutine.create(function(Part)
  1030. coroutine.resume(coroutine.create(function(Partt)
  1031. for i=1,300 do
  1032. wait()
  1033. MagicBlock(BrickColor.new("Black"),Partt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,0.2,10,0.2)
  1034. MagicCircle(BrickColor.new("Black"),Partt.CFrame*cf(math.random(-50,50),-8,math.random(-50,50)),1,1,1,0,0,0,0.2,5,0.2)
  1035. end
  1036. rifting=false
  1037. basepart.Parent=nil
  1038. end),Part)
  1039. DarkRiftF(Part,30)
  1040. end),basepart)
  1041. wait(1)
  1042. for i=0,1,0.1 do
  1043. wait()
  1044. wld1.C0=euler(3-2*i,0,0)*cf(0,1,0)
  1045. RW.C0=cf(1.5, 0.5, 0) * euler(3-2*i,0,0)
  1046. end
  1047. attack=false
  1048. end
  1049.  
  1050. function ob1d(mouse)
  1051. if attack == true then return end
  1052. hold=true
  1053. repeat
  1054. thwack()
  1055. until hold==false
  1056. coroutine.resume(coroutine.create(function()
  1057. wait(0.5)
  1058. if attack==false then
  1059. combo=0
  1060. wld1.C0=euler(1,0,0)*cf(0,1,0)
  1061. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  1062. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1063. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  1064. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1065. end
  1066. end))
  1067. end
  1068.  
  1069. function ob1u(mouse)
  1070. hold = false
  1071. end
  1072.  
  1073. buttonhold = false
  1074.  
  1075. explosiondb=false
  1076. icesworddb=false
  1077. rockswarmdb=false
  1078. voiddb=false
  1079. function key(key)
  1080. if attack == true then return end
  1081. Humanoid.WalkSpeed=0
  1082. if key=="z" and explosiondb==false then
  1083. so("http://www.roblox.com/asset/?id=2101137",RightArm,1,1.5)
  1084. explosiondb=true
  1085. Explosion()
  1086. coroutine.resume(coroutine.create(function()
  1087. wait(5)
  1088. explosiondb=false
  1089. prt8.Transparency=0.5
  1090. end))
  1091. end
  1092. if key=="x" and icesworddb==false then
  1093. so("http://www.roblox.com/asset/?id=2101137",RightArm,1,1.3)
  1094. icesworddb=true
  1095. IceSword()
  1096. coroutine.resume(coroutine.create(function()
  1097. wait(10)
  1098. icesworddb=false
  1099. prt9.Transparency=0.5
  1100. end))
  1101. end
  1102. if key=="c" and rockswarmdb==false then
  1103. so("http://www.roblox.com/asset/?id=2101137",RightArm,1,1.3)
  1104. rockswarmdb=true
  1105. RockSwarm()
  1106. coroutine.resume(coroutine.create(function()
  1107. wait(15)
  1108. rockswarmdb=false
  1109. prt10.Transparency=0.5
  1110. end))
  1111. end
  1112. if key=="v" and voiddb==false then
  1113. so("http://www.roblox.com/asset/?id=2101137",RightArm,3,0.5)
  1114. voiddb=true
  1115. Void()
  1116. coroutine.resume(coroutine.create(function()
  1117. wait(30)
  1118. voiddb=false
  1119. prt11.Transparency=0.5
  1120. end))
  1121. end
  1122. Humanoid.WalkSpeed=16
  1123. end
  1124.  
  1125. function key2(key)
  1126. end
  1127.  
  1128. function s()
  1129.  
  1130. unsheathed = true
  1131. player = Player
  1132. ch = Character
  1133. MMouse = mouse
  1134. RSH = ch.Torso["Right Shoulder"]
  1135. LSH = ch.Torso["Left Shoulder"]
  1136. --
  1137. RSH.Parent = nil
  1138. LSH.Parent = nil
  1139. --
  1140. RW.Part0 = ch.Torso
  1141. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1142. RW.C1 = CFrame.new(0, 0.5, 0)
  1143. RW.Part1 = ch["Right Arm"]
  1144. RW.Parent = ch.Torso
  1145. --_G.R = RW
  1146. --
  1147. LW.Part0 = ch.Torso
  1148. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1149. LW.C1 = CFrame.new(0, 0.5, 0)
  1150. LW.Part1 = ch["Left Arm"]
  1151. LW.Parent = ch.Torso
  1152. --_G.L = LW
  1153. --
  1154. equipanim()
  1155. end
  1156.  
  1157. function ds()
  1158. hideanim()
  1159. wait(0)
  1160. RW.Parent = nil
  1161. LW.Parent = nil
  1162. RSH.Parent = player.Character.Torso
  1163. LSH.Parent = player.Character.Torso
  1164. end
  1165.  
  1166. coroutine.resume(coroutine.create(function()
  1167. while true do
  1168. wait(0)
  1169. fentext3.Size = UDim2.new(mana*0.007,0,0.200000006,0)
  1170. fentext.Text = "Mana("..mana..")"
  1171. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  1172. end
  1173. end))
  1174. coroutine.resume(coroutine.create(function()
  1175. while true do
  1176. wait(0.1)
  1177. if mana <= 0 and attack == false then
  1178. attack = true
  1179. while mana <= 400 do
  1180. wait(0.1)
  1181. mana = mana + 5
  1182. end
  1183. attack = false
  1184. end
  1185. if mana < 400 and attack == false then
  1186. mana = mana + 2
  1187. end
  1188. end
  1189. end))
  1190.  
  1191. print("Staff loaded.")
  1192. --[[
  1193. Copyrighted (C) Fenrier 2013
  1194. ]]
  1195.  
  1196. remote = Instance.new 'RemoteFunction';
  1197. remote.Parent = script;
  1198. remote.OnServerInvoke = function (player, request, ...)
  1199. if (player ~= owner) then
  1200. return error ('You cannot invoke this remote', 0);
  1201. end;
  1202. if (request == 1) then
  1203.  
  1204. ob1d(...)
  1205. end
  1206. if (request == 2) then
  1207. local k = ...;
  1208. key(k)
  1209.  
  1210. end;
  1211. if (request == 3) then
  1212.  
  1213. ob1u(...)
  1214. end
  1215. if (request == 4) then
  1216. s()
  1217. end;
  1218. if (request == 5) then
  1219. ds()
  1220. end;
  1221. if (request == 6) then
  1222. local k = ...;
  1223. key2(k)
  1224. end;
  1225. end
  1226. remote.Name = 'ServerRemote';
  1227. function getMouseHit()
  1228. return remote:InvokeClient (owner, 1);
  1229. end;
  1230. ]=], owner.Character):WaitForChild 'ServerRemote';
  1231.  
  1232. local plr = game.Players.LocalPlayer
  1233. local chr = plr.Character
  1234. local mouse = plr:GetMouse()
  1235.  
  1236. q = Instance.new('HopperBin', plr.Backpack)
  1237. q.Name = 'Staff'
  1238. Bin=q
  1239.  
  1240. Bin.Selected:connect(function(mouse)
  1241. remote:InvokeServer(4);
  1242. mouse.Button1Down:connect(function()
  1243. remote:InvokeServer (1,mouse);
  1244. end)
  1245. mouse.Button1Up:Connect(function()
  1246. remote:InvokeServer (3,mouse);
  1247. end)
  1248. mouse.KeyDown:connect(function(k)
  1249. k = k:lower()
  1250.  
  1251. remote:InvokeServer (2, k);
  1252. end)
  1253. mouse.KeyUp:connect(function(k)
  1254. k = k:lower()
  1255.  
  1256. remote:InvokeServer (6, k);
  1257. end)
  1258. end)
  1259.  
  1260. Bin.Deselected:Connect(function()
  1261. remote:InvokeServer(5);
  1262. end)
  1263.  
  1264. remote.OnClientInvoke = function (request, ...)
  1265. if (request == 1) then
  1266. return mouse.Hit.p;
  1267. end;
  1268. end;
  1269.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement