Advertisement
memberhero

Untitled

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