Advertisement
lafur

Untitled

Dec 28th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --[MegaBlaster]--
  6. --[Recolored by Cobalt1164]--
  7. --[For Ace]--
  8. Player = game:GetService("Players").LocalPlayer
  9. Character = Player.Character
  10. PlayerGui = Player.PlayerGui
  11. Backpack = Player.Backpack
  12. Torso = Character.Torso
  13. Head = Character.Head
  14. Humanoid = Character.Humanoid
  15. LeftArm = Character["Left Arm"]
  16. LeftLeg = Character["Left Leg"]
  17. RightArm = Character["Right Arm"]
  18. RightLeg = Character["Right Leg"]
  19. LS = Torso["Left Shoulder"]
  20. LH = Torso["Left Hip"]
  21. RS = Torso["Right Shoulder"]
  22. RH = Torso["Right Hip"]
  23. it=Instance.new
  24. vt=Vector3.new
  25. cf=CFrame.new
  26. euler=CFrame.fromEulerAnglesXYZ
  27. angles=CFrame.Angles
  28. attack = false
  29. attackdebounce = false
  30. attacktype = 1
  31. combo = 0
  32. damage = 3
  33. oridamage = 3
  34. walkdebounce = false
  35. sheathed = true
  36. act = {key = {}}
  37. walking = false
  38. hold=false
  39. MMouse=nil
  40. equipped=false
  41. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  42. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  43. con1=nil
  44. con2=nil
  45. con3=nil --lol
  46. mana=400
  47. offset=nil
  48. mode="Normal"
  49. modechange=false
  50. dodging=false
  51. --player
  52. player = nil
  53. --save shoulders
  54. RSH, LSH = nil, nil
  55. --welds
  56. RW, LW = it("Weld"), it("Weld")
  57. RW2, LW2 = it("Weld"), it("Weld")
  58. --what anim
  59. anim = "none"
  60.  
  61. if Character:findFirstChild("Weapon",true) ~= nil then
  62. Character:findFirstChild("Weapon",true).Parent = nil
  63. end
  64. if Player.PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  65. Player.PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  66. end
  67.  
  68. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  69. local fp = it("Part")
  70. fp.formFactor = formfactor
  71. fp.Parent = parent
  72. fp.Reflectance = reflectance
  73. fp.Transparency = transparency
  74. fp.CanCollide = false
  75. fp.BrickColor = brickcolor
  76. fp.Name = name
  77. fp.Size = size
  78. fp.Position = Torso.Position
  79. fp.BottomSurface="Smooth"
  80. fp.TopSurface="Smooth"
  81. fp:BreakJoints()
  82. return fp
  83. end
  84.  
  85. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  86. local mesh = it(Mesh)
  87. mesh.Parent = part
  88. if Mesh=="SpecialMesh" then
  89. mesh.MeshType = meshtype
  90. mesh.MeshId = meshid
  91. end
  92. mesh.Offset=offset
  93. mesh.Scale=scale
  94. return mesh
  95. end
  96.  
  97. function weld(parent,part0,part1,c0)
  98. local weld = it("Weld")
  99. weld.Parent = parent
  100. weld.Part0 = part0
  101. weld.Part1 = part1
  102. weld.C0 = c0
  103. return weld
  104. end
  105.  
  106. Ballprt=part(1,nil,0,0.3,BrickColor.new("Really black"),"Ball",vt(3,3,3))
  107. Ballmsh=mesh("SpecialMesh",Ballprt,"Sphere","",vt(0,0,0),vt(1,1,1))
  108. Ballwld=weld(Ballprt,Ballprt,Prt4,cf(0,0,0))
  109.  
  110. local Main=it("Model")
  111. Main.Parent=nil
  112. Main.Name="Weapon"
  113.  
  114. Prt1=part(1,Main,0,0,BrickColor.new("Really black"),"Part1",vt(1,4,1))
  115. Prt2=part(1,Main,0,0,BrickColor.new("Really black"),"Part2",vt(1,1,1))
  116. Prt3=part(1,Main,0,0,BrickColor.new("Really black"),"Part3",vt(1,1,1))
  117. Prt4=part(1,Main,0,0,BrickColor.new("Really black"),"Part4",vt(1,1,1))
  118. Prt5=part(1,Main,0,0,BrickColor.new("Really Really black"),"Part5",vt(1,1,1))
  119. Prt6=part(1,Main,0,0,BrickColor.new("Really black"),"Part6",vt(1,1,1))
  120. Prt7=part(1,Main,0,0,BrickColor.new("Really black"),"Part7",vt(1,1,1))
  121. Prt8=part(1,Main,0,0,BrickColor.new("Really black"),"Part8",vt(1,1,1))
  122. Prt9=part(1,Main,0,0,BrickColor.new("Really black"),"Part9",vt(1,1,1))
  123. Prt10=part(1,Main,0,0,BrickColor.new("Really black"),"Part10",vt(1,1,1))
  124. Prt11=part(1,Main,0,0,BrickColor.new("Really black"),"Part11",vt(1,1,1))
  125. Prt12=part(1,Main,0,0,BrickColor.new("Gold"),"Part12",vt(1,1,1))
  126. Prt13=part(1,Main,0,0,BrickColor.new("Gold"),"Part13",vt(1,1,1))
  127. Prt14=part(1,Main,0,0,BrickColor.new("Gold"),"Part14",vt(1,1,1))
  128. Prt15=part(1,Main,0,0,BrickColor.new("Gold"),"Part15",vt(1,1,1))
  129. Prt16=part(1,Main,0,0,BrickColor.new("Gold"),"Part16",vt(1,1,1))
  130. Prt17=part(1,Main,0,0,BrickColor.new("Gold"),"Part17",vt(1,1,1))
  131. Prt18=part(1,Main,0,0,BrickColor.new("Really black"),"Part18",vt(1,1,1))
  132. Prt19=part(1,Main,0,0,BrickColor.new("Really black"),"Part19",vt(1,1,1))
  133. Prt20=part(1,Main,0.5,0,BrickColor.new("Gold"),"Part20",vt(1,1,1))
  134. Prt21=part(1,Main,0.5,0,BrickColor.new("Gold"),"Part21",vt(1,1,1))
  135. Prt22=part(1,Main,0,0,BrickColor.new("Gold"),"Part22",vt(1,1,1))
  136. Prt23=part(1,Main,0,0,BrickColor.new("Really black"),"Part23",vt(1,1,1))
  137.  
  138. Msh1=mesh("BlockMesh",Prt1,"","",vt(0,0,0),vt(1.1,1.2,1.1))
  139. Msh2=mesh("CylinderMesh",Prt2,"","",vt(0,0,0),vt(1.6,1,1.6))
  140. Msh3=mesh("BlockMesh",Prt3,"","",vt(0,0,0),vt(1.4,1,1))
  141. Msh4=mesh("CylinderMesh",Prt4,"","",vt(0,0,0),vt(1.7,2,1.7))
  142. Msh5=mesh("CylinderMesh",Prt5,"","",vt(0,0,0),vt(1.3,2,1.3))
  143. Msh6=mesh("SpecialMesh",Prt6,"Wedge","",vt(0,0,0),vt(0.5,1.4,0.7))
  144. Msh7=mesh("SpecialMesh",Prt7,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  145. Msh8=mesh("SpecialMesh",Prt8,"Wedge","",vt(0,0,0),vt(0.5,1.3,0.7))
  146. Msh9=mesh("SpecialMesh",Prt9,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  147. Msh10=mesh("SpecialMesh",Prt10,"Wedge","",vt(0,0,0),vt(0.5,1.3,0.7))
  148. Msh11=mesh("SpecialMesh",Prt11,"Wedge","",vt(0,0,0),vt(0.5,1,1.2))
  149. Msh12=mesh("CylinderMesh",Prt12,"","",vt(0,0,0),vt(1.9,0.3,1.9))
  150. Msh13=mesh("SpecialMesh",Prt13,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  151. Msh14=mesh("SpecialMesh",Prt14,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  152. Msh15=mesh("SpecialMesh",Prt15,"Wedge","",vt(0,0,0),vt(0.5,0.7,0.7))
  153. Msh16=mesh("BlockMesh",Prt16,"","",vt(0,0,0),vt(2,0.7,0.3))
  154. Msh17=mesh("BlockMesh",Prt17,"","",vt(0,0,0),vt(2,0.7,0.3))
  155. Msh18=mesh("BlockMesh",Prt18,"","",vt(0,0,0),vt(0.4,0.7,1))
  156. Msh19=mesh("BlockMesh",Prt19,"","",vt(0,0,0),vt(0.5,0.5,2))
  157. Msh20=mesh("BlockMesh",Prt20,"","",vt(0,0,0),vt(0.1,0.5,2))
  158. Msh21=mesh("SpecialMesh",Prt21,"Wedge","",vt(0,0,0),vt(0.1,0.5,0.5))
  159. Msh22=mesh("BlockMesh",Prt22,"","",vt(0,0,0),vt(0.6,0.3,1.8))
  160. Msh23=mesh("BlockMesh",Prt23,"","",vt(0,0,0),vt(1,0.6,1))
  161.  
  162. Wld1=weld(Main,Prt1,RightArm,cf(0,1.8,0))
  163. Wld2=weld(Main,Prt2,Prt1,cf(0,-1,0)*euler(0,0,0))
  164. Wld3=weld(Main,Prt3,Prt2,cf(0,0.3,0)*euler(1.57,0,0))
  165. Wld4=weld(Main,Prt4,Prt1,cf(0,1.4,0)*euler(0,0,0))
  166. Wld5=weld(Main,Prt5,Prt1,cf(0,1.41,0)*euler(0,0,0))
  167. Wld6=weld(Main,Prt6,Prt1,euler(0,-1.57,0)*cf(1,1,0))
  168. Wld7=weld(Main,Prt7,Prt1,euler(1.57,-1.57,0)*cf(1.3,2.2,0))
  169. Wld8=weld(Main,Prt8,Prt1,euler(0,1.57,0)*cf(-1,1,0))
  170. Wld9=weld(Main,Prt9,Prt1,euler(1.57,1.57,0)*cf(-1.3,2.2,0))
  171. Wld10=weld(Main,Prt10,Prt1,euler(0,0,0)*cf(0,1,1))
  172. Wld11=weld(Main,Prt11,Prt1,euler(1.57,0,0)*cf(0,2.2,1.3))
  173. Wld12=weld(Main,Prt12,Prt4,euler(0,0,0)*cf(0,0.7,0))
  174. Wld13=weld(Main,Prt13,Prt1,euler(1.57,-1.57,0)*cf(0.8,0.3,0))
  175. Wld14=weld(Main,Prt14,Prt1,euler(1.57,1.57,0)*cf(-0.8,0.3,0))
  176. Wld15=weld(Main,Prt15,Prt1,euler(1.57,0,0)*cf(0,0.3,0.8))
  177. Wld16=weld(Main,Prt16,Prt4,euler(0,0.785,0)*cf(0,-0.5,0))
  178. Wld17=weld(Main,Prt17,Prt4,euler(0,-0.785,0)*cf(0,-0.5,0))
  179. Wld18=weld(Main,Prt18,Prt4,euler(0.785,0,0)*cf(0,0.5,-0.9))
  180. Wld19=weld(Main,Prt19,Prt18,euler(0.785,0,0)*cf(0,0.4,-0.2))
  181. Wld20=weld(Main,Prt20,Prt19,euler(0,0,0)*cf(0,0.1,0.1))
  182. Wld21=weld(Main,Prt21,Prt20,euler(0,0,3.14)*cf(0,0,1.25))
  183. Wld22=weld(Main,Prt22,Prt19,euler(0,0,0)*cf(0,0,0))
  184. Wld23=weld(Main,Prt23,Prt4,euler(0,0,0)*cf(0,-0.4,-1))
  185.  
  186. local fengui = it("GuiMain")
  187. fengui.Parent = Player.PlayerGui
  188. fengui.Name = "manaGUI"
  189. local fenframe = it("Frame")
  190. fenframe.Parent = fengui
  191. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  192. fenframe.BackgroundTransparency = 1
  193. fenframe.BorderColor3 = Color3.new(17,17,17)
  194. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  195. local fentext = it("TextLabel")
  196. fentext.Parent = fenframe
  197. fentext.Text = "Mana("..mana..")"
  198. fentext.BackgroundTransparency = 1
  199. fentext.SizeConstraint = "RelativeXY"
  200. fentext.TextXAlignment = "Center"
  201. fentext.TextYAlignment = "Center"
  202. fentext.Position = UDim2.new(0,80,1,200)
  203. local fentext2 = it("TextLabel")
  204. fentext2.Parent = fenframe
  205. fentext2.Text = " "
  206. fentext2.BackgroundTransparency = 0
  207. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  208. fentext2.SizeConstraint = "RelativeXY"
  209. fentext2.TextXAlignment = "Center"
  210. fentext2.TextYAlignment = "Center"
  211. fentext2.Position = UDim2.new(0,10,1,170)
  212. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  213. local fentext3 = it("TextLabel")
  214. fentext3.Parent = fenframe
  215. fentext3.Text = " "
  216. fentext3.BackgroundTransparency = 0
  217. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  218. fentext3.SizeConstraint = "RelativeXY"
  219. fentext3.TextXAlignment = "Center"
  220. fentext3.TextYAlignment = "Center"
  221. fentext3.Position = UDim2.new(0,10,1,170)
  222. fentext3.Size = UDim2.new(mana*0.007,0,0.400000006,0)
  223.  
  224. local bg = it("BodyGyro")
  225. bg.Parent = nil
  226.  
  227.  
  228. if (script.Parent.className ~= "HopperBin") then
  229. Tool = it("HopperBin")
  230. Tool.Parent = Backpack
  231. Tool.Name = "Mega Blaster"
  232. script.Parent = Tool
  233. end
  234. Bin = script.Parent
  235.  
  236. function unequipweld()
  237. Main.Parent=nil
  238. end
  239.  
  240. function equipweld()
  241. Main.Parent=Character
  242. Wld1.Parent=Main
  243. end
  244.  
  245. function hideanim()
  246. equipped = false
  247. bg.Parent=nil
  248. unequipweld()
  249. for i = 0 , 1 , 0.1 do
  250. wait(0)
  251. Torso.Neck.C1 = euler(1.57,3.14,0) * cf(0,0,-0.5)
  252. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,0)
  253. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  254. RW.C0 = cf(1.5,0.5,0) * euler(0,0,0)
  255. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  256. end
  257. Torso.Neck.C0=necko*euler(0,0,0)
  258. end
  259.  
  260. function equipanim(mouse)
  261. equipped = true
  262. for i = 0,1,0.1 do
  263. wait()
  264. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5*i)
  265. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  266. RW.C0 = cf(1.5,0.5,0) * euler(3.14*i,0,0)
  267. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  268. end
  269. for i=0,2,0.05 do
  270. wait()
  271. MMMAGIC(RightArm,3,3,3,0,-math.random(0,3)-math.random(),0,BrickColor.new("Really black"))
  272. MMMAGIC(RightArm,3,3,3,0,-math.random(0,3)-math.random(),0,BrickColor.new("Gold"))
  273. end
  274. equipweld()
  275. for i = 0,1,0.1 do
  276. wait()
  277. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  278. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  279. RW.C0 = cf(1.5,0.5,0) * euler(3.14-1.9*i,0,0)
  280. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  281. end
  282. for i = 0,1,0.1 do
  283. wait()
  284. Torso.Neck.C0=necko*euler(0,0,0)
  285. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  286. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  287. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5*i)
  288. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  289. end
  290. Stance()
  291. end
  292.  
  293. function Stance()
  294. coroutine.resume(coroutine.create(function()
  295. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  296. bg.P = 5000
  297. bg.Parent = Torso
  298. while equipped==true and walking==false and attack==false do
  299. wait()
  300. if modechange==false then
  301. Torso.Neck.C0=necko*euler(0,0,1)
  302. end
  303. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  304. if mode=="Shoot" then
  305. local pos4 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  306. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  307. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  308. offset=offset/mag
  309. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  310. if dodging==false then
  311. bg.cframe = CFrame.new(Head.Position,pos4)*euler(0,1.57,0)
  312. bg.Parent = Torso
  313. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  314. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  315. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  316. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  317. end
  318. else
  319. if modechange==false then
  320. bg.cframe = cf(Torso.Position,pos4)*euler(0,-1,0)*cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  321. end
  322. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  323. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  324. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5)
  325. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  326. end
  327. end
  328. Torso.Neck.C0=necko*euler(0,0,0)
  329. bg.Parent=nil
  330. end))
  331. end
  332.  
  333. function Walking()
  334. attack=true
  335. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  336. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  337. RW.C0 = cf(1.5,0.5,0) * euler(1.24,0,0.5)
  338. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  339. walking=true
  340. attack=false
  341. end
  342.  
  343. function Mode()
  344. modechange=true
  345. attack=true
  346. if mode=="Normal" then
  347. mode="Shoot"
  348. Humanoid.WalkSpeed=0
  349. for i = 0,1,0.1 do
  350. wait()
  351. local pos4 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  352. bg.cframe = CFrame.new(Head.Position,pos4)*euler(0,1.57,0)
  353. bg.Parent = Torso
  354. Torso.Neck.C0=necko*euler(0,0,1-2.57*i)
  355. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  356. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  357. RW.C0 = cf(1.5,0.5,0) * euler(1.24+0.33*i,0,0.5+1.07*i)
  358. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  359. end
  360. wait()
  361. elseif mode=="Shoot" then
  362. mode="Normal"
  363. Humanoid.WalkSpeed=16
  364. end
  365. attack=false
  366. modechange=false
  367. Stance()
  368. end
  369.  
  370. function DodgeUp()
  371. CF=Torso.CFrame*euler(0,-1.57,0)
  372. local vel=Instance.new("BodyVelocity")
  373. vel.Parent=Torso
  374. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  375. vel.velocity=CF.lookVector*30
  376. for i=0,1,0.2 do
  377. wait()
  378. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5-0.5*i)
  379. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  380. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  381. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  382. end
  383. vel.Parent=nil
  384. for i=0,1,0.2 do
  385. wait()
  386. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5-0.5+0.5*i)
  387. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  388. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  389. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  390. end
  391. --wait(0.2)
  392. end
  393.  
  394. function DodgeLeft()
  395. CF=Torso.CFrame*euler(0,0,0)
  396. local vel=Instance.new("BodyVelocity")
  397. vel.Parent=Torso
  398. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  399. vel.velocity=CF.lookVector*30
  400. for i=0,1,0.2 do
  401. wait()
  402. LW.C0 = cf(-1.5,0.5,0) * euler(-0.5*i,0,-0.5)
  403. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  404. RW.C0 = cf(1.5,0.5,0) * euler(0,-0.5*i,1.57)
  405. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  406. end
  407. vel.Parent=nil
  408. for i=0,1,0.2 do
  409. wait()
  410. LW.C0 = cf(-1.5,0.5,0) * euler(-0.5+0.5*i,0,-0.5)
  411. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  412. RW.C0 = cf(1.5,0.5,0) * euler(0,-0.5+0.5*i,1.57)
  413. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  414. end
  415. --wait(0.2)
  416. end
  417.  
  418. function DodgeRight()
  419. CF=Torso.CFrame*euler(0,1.57,0)
  420. local vel=Instance.new("BodyVelocity")
  421. vel.Parent=Torso
  422. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  423. vel.velocity=CF.lookVector*30
  424. for i=0,1,0.2 do
  425. wait()
  426. LW.C0 = cf(-1.5+0.5*i,0.5,-0.5*i) * euler(0.7*i,0,-0.5+2*i)
  427. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  428. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  429. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  430. end
  431. vel.Parent=nil
  432. for i=0,1,0.2 do
  433. wait()
  434. LW.C0 = cf(-1.5+0.5-0.5*i,0.5,-0.5+0.5*i) * euler(0.7-0.7*i,0,-0.5+2-2*i)
  435. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  436. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  437. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  438. end
  439. --wait(0.2)
  440. end
  441.  
  442. function DodgeDown()
  443. CF=Torso.CFrame*euler(0,3.14,0)
  444. local vel=Instance.new("BodyVelocity")
  445. vel.Parent=Torso
  446. vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  447. vel.velocity=CF.lookVector*30
  448. for i=0,1,0.2 do
  449. wait()
  450. LW.C0 = cf(-1.5,0.5,0) * euler(0.5*i,0,-0.5)
  451. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  452. RW.C0 = cf(1.5,0.5,0) * euler(0,0.5*i,1.57)
  453. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  454. end
  455. vel.Parent=nil
  456. for i=0,1,0.2 do
  457. wait()
  458. LW.C0 = cf(-1.5,0.5,0) * euler(0.5-0.5*i,0,-0.5)
  459. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  460. RW.C0 = cf(1.5,0.5,0) * euler(0,0.5-0.5*i,1.57)
  461. RW.C1 = cf(0, 0.5, 0) * euler(offset,1.57,0)
  462. end
  463. --wait(0.2)
  464. end
  465.  
  466. function OverchargeBlast()
  467. attack=true
  468. for i=0,1,0.1 do
  469. wait()
  470. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  471. Torso.Neck.C0=necko*euler(0,0,1-1*i)
  472. bg.cframe = cf(Torso.Position,pos4)*euler(0,-1+1*i,0)*cf(0,0,0)
  473. bg.Parent = Torso
  474. LW.C0 = cf(-1.5+0.8*i,0.5+0.3*i,-0.5*i) * euler(2.8*i,0,-0.5+1.5*i)
  475. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  476. RW.C0 = cf(1.5,0.5,0) * euler(1.24+1.26*i,0,0.5-0.5*i)
  477. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  478. end
  479. wait(0.2)
  480. Ballprt.Parent=Main
  481. Ballwld.Parent=Main
  482. Ballwld.Part0=Ballprt
  483. Ballwld.Part1=Prt4
  484. Ballwld.C0=cf(0,3,0)
  485. for i=0,1,0.1 do
  486. wait()
  487. MMMAGIC3(Ballprt.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  488. EVENMOARMAGIX(Ballprt,1,1,1,0,0,0,0,0,0,BrickColor.new("Really black"))
  489. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  490. bg.cframe = cf(Torso.Position,pos4)*euler(0,0,0)*cf(0,0,0)
  491. bg.Parent = Torso
  492. LW.C0 = cf(-1.5+0.8,0.5+0.3,-0.5) * euler(2.8-1*i,0,1)
  493. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  494. RW.C0 = cf(1.5,0.5,0) * euler(2.5-1*i,0,0)
  495. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  496. end
  497. for i=0,10,0.1 do
  498. wait()
  499. MMMAGIC3(Ballprt.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  500. EVENMOARMAGIX(Ballprt,3,3,3,0,0,0,0,0,0,BrickColor.new("Really black"))
  501. MOREMAGIX(Ballprt,0,2,2,2,BrickColor.new("Gold"))
  502. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  503. bg.cframe = cf(Torso.Position,pos4)*euler(0,0,0)*cf(0,0,0)
  504. bg.Parent = Torso
  505. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  506. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  507. offset=offset/mag
  508. Torso.Neck.C0=necko*euler(offset,0,0)
  509. LW.C0 = cf(-1.5+0.8,0.5+0.3,-0.5) * euler(1.8,0,1)
  510. LW.C1 = cf(0, 0.5, 0) * euler(offset,0,0)
  511. RW.C0 = cf(1.5,0.5,0) * euler(1.57,0,0)
  512. RW.C1 = cf(0, 0.5, 0) * euler(offset,0,0)
  513. end
  514. Ballwld.Part1=nil
  515. Ballprt.Parent=nil
  516. wait(0.4)
  517. shoottrail3(Prt4,20)
  518. wait(1)
  519. attack=false
  520. end
  521.  
  522. function ss(pitch)
  523.  
  524. local SlashSound = it("Sound")
  525. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  526. SlashSound.Parent = workspace
  527. SlashSound.Volume = .7
  528. SlashSound.Pitch = pitch
  529. SlashSound.PlayOnRemove = true
  530. coroutine.resume(coroutine.create(function()
  531. wait(0)
  532. SlashSound.Parent = nil
  533. end))
  534. end
  535. function charge(pitch)
  536.  
  537. local SlashSound = it("Sound")
  538. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  539. SlashSound.Parent = workspace
  540. SlashSound.Volume = 1
  541. SlashSound.Pitch = pitch
  542. SlashSound.PlayOnRemove = true
  543. coroutine.resume(coroutine.create(function()
  544. wait(0)
  545. SlashSound.Parent = nil
  546. end))
  547. end
  548. function bewm(pitch)
  549.  
  550. local SlashSound = it("Sound")
  551. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2248511"
  552. SlashSound.Parent = workspace
  553. SlashSound.Volume = .7
  554. SlashSound.Pitch = pitch
  555. SlashSound.PlayOnRemove = true
  556. coroutine.resume(coroutine.create(function()
  557. wait(0)
  558. SlashSound.Parent = nil
  559. end))
  560. end
  561. function abscond(pitch)
  562.  
  563. local SlashSound = it("Sound")
  564. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2767090"
  565. SlashSound.Parent = workspace
  566. SlashSound.Volume = 1
  567. SlashSound.Pitch = pitch
  568. SlashSound.PlayOnRemove = true
  569. coroutine.resume(coroutine.create(function()
  570. wait(0)
  571. SlashSound.Parent = nil
  572. end))
  573. end
  574. function distort(pitch)
  575.  
  576. local SlashSound = it("Sound")
  577. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2974249"
  578. SlashSound.Parent = workspace
  579. SlashSound.Volume = 1
  580. SlashSound.Pitch = pitch
  581. SlashSound.PlayOnRemove = true
  582. coroutine.resume(coroutine.create(function()
  583. wait(0)
  584. SlashSound.Parent = nil
  585. end))
  586. end
  587. function fire1(pitch)
  588.  
  589. local SlashSound = it("Sound")
  590. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697431"
  591. SlashSound.Parent = workspace
  592. SlashSound.Volume = 0.3
  593. SlashSound.Pitch = pitch
  594. SlashSound.PlayOnRemove = true
  595. coroutine.resume(coroutine.create(function()
  596. wait(0)
  597. SlashSound.Parent = nil
  598. end))
  599. end
  600. function fire2(pitch)
  601.  
  602. local SlashSound = it("Sound")
  603. SlashSound.SoundId = "http://www.roblox.com/asset/?id=48618802 "
  604. SlashSound.Parent = workspace
  605. SlashSound.Volume = 0.5
  606. SlashSound.Pitch = pitch
  607. SlashSound.PlayOnRemove = true
  608. coroutine.resume(coroutine.create(function()
  609. wait(0)
  610. SlashSound.Parent = nil
  611. end))
  612. end
  613. function grip(pitch)
  614.  
  615. local SlashSound = it("Sound")
  616. SlashSound.SoundId = "rbxasset://sounds/swordslash.wav"
  617. SlashSound.Parent = workspace
  618. SlashSound.Volume = 1
  619. SlashSound.Pitch = pitch
  620. SlashSound.PlayOnRemove = true
  621. coroutine.resume(coroutine.create(function()
  622. wait(0)
  623. SlashSound.Parent = nil
  624. end))
  625. end
  626. function reload(pitch)
  627.  
  628. local SlashSound = it("Sound")
  629. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697295"
  630. SlashSound.Parent = workspace
  631. SlashSound.Volume = 1
  632. SlashSound.Pitch = pitch
  633. SlashSound.PlayOnRemove = true
  634. coroutine.resume(coroutine.create(function()
  635. wait(0)
  636. SlashSound.Parent = nil
  637. end))
  638. end
  639.  
  640. function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  641. local msh1 = it("BlockMesh")
  642. msh1.Scale = vt(0.5,0.5,0.5)
  643. S=it("Part")
  644. S.Name="Effect"
  645. S.formFactor=0
  646. S.Size=vt(x1,y1,z1)
  647. S.BrickColor=color
  648. S.Reflectance = 0
  649. S.TopSurface=0
  650. S.BottomSurface=0
  651. S.Transparency=0
  652. S.Anchored=true
  653. S.CanCollide=false
  654. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  655. S.Parent=workspace
  656. msh1.Parent = S
  657. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  658. end
  659.  
  660. function MMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  661. local msh1 = it("BlockMesh")
  662. msh1.Scale = vt(0.5,0.5,0.5)
  663. S=it("Part")
  664. S.Name="Effect"
  665. S.formFactor=0
  666. S.Size=vt(x1,y1,z1)
  667. S.BrickColor=color
  668. S.Reflectance = 0
  669. S.TopSurface=0
  670. S.BottomSurface=0
  671. S.Transparency=0
  672. S.Anchored=true
  673. S.CanCollide=false
  674. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  675. S.Parent=Character
  676. msh1.Parent = S
  677. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  678. end
  679.  
  680. function MMMAGIC2(part,x1,y1,z1,x2,y2,z2,color)
  681. local msh1 = it("BlockMesh")
  682. msh1.Scale = vt(0.5,0.5,0.5)
  683. S=it("Part")
  684. S.Name="Effect"
  685. S.formFactor=0
  686. S.Size=vt(x1,y1,z1)
  687. S.BrickColor=color
  688. S.Reflectance = 0
  689. S.TopSurface=0
  690. S.BottomSurface=0
  691. S.Transparency=0
  692. S.Anchored=true
  693. S.CanCollide=false
  694. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  695. S.Parent=workspace
  696. msh1.Parent = S
  697. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  698. end
  699.  
  700. function MMMAGIC3(part,x1,y1,z1,x2,y2,z2,color)
  701. local msh1 = it("BlockMesh")
  702. msh1.Scale = vt(0.5,0.5,0.5)
  703. S=it("Part")
  704. S.Name="Effect"
  705. S.formFactor=0
  706. S.Size=vt(x1,y1,z1)
  707. S.BrickColor=color
  708. S.Reflectance = 0
  709. S.TopSurface=0
  710. S.BottomSurface=0
  711. S.Transparency=0
  712. S.Anchored=true
  713. S.CanCollide=false
  714. S.CFrame=part*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  715. S.Parent=Character
  716. msh1.Parent = S
  717. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0,0.3,0) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  718. end
  719.  
  720. function UltimaMMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  721. local msh1 = it("BlockMesh")
  722. msh1.Scale = vt(x1,y1,z1)
  723. S=it("Part")
  724. S.Name="Effect"
  725. S.formFactor=0
  726. S.Size=vt(1,1,1)
  727. S.BrickColor=color
  728. S.Reflectance = 0
  729. S.TopSurface=0
  730. S.BottomSurface=0
  731. S.Transparency=0
  732. S.Anchored=true
  733. S.CanCollide=false
  734. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  735. S.Parent=workspace
  736. msh1.Parent = S
  737. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  738. end
  739.  
  740. function MOREMAGIX(part,cframe,x,y,z,color)
  741. p2=it("Part")
  742. p2.Name="Blast"
  743. p2.TopSurface=0
  744. p2.BottomSurface=0
  745. p2.CanCollide=false
  746. p2.Anchored=true
  747. p2.BrickColor=color
  748. p2.Size=vt(x,y,z)
  749. p2.formFactor="Symmetric"
  750. p2.CFrame=part.CFrame*cf(0,cframe,0)
  751. p2.Parent=Character
  752. m=it("BlockMesh")
  753. m.Parent=p2
  754. m.Name="BlastMesh"
  755. coroutine.resume(coroutine.create(function(part,dir) for loll=1, 15 do part.BlastMesh.Scale=part.BlastMesh.Scale-vt(.09,.09,.09) part.Transparency=loll/20 part.CFrame=part.CFrame*cf(dir)*euler(math.random(-100,100)/100, math.random(-100,100)/100, math.random(-100,100)/100) wait() end part.Parent=nil end),p2,vt(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10))
  756. end
  757.  
  758. function EVENMOARMAGIX(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  759. local msh1 = it("SpecialMesh")
  760. msh1.Scale = vt(0.5,0.5,0.5)
  761. msh1.MeshType = "Sphere"
  762. S=it("Part")
  763. S.Name="Effect"
  764. S.formFactor=0
  765. S.Size=vt(x1,y1,z1)
  766. S.BrickColor=color
  767. S.Reflectance = 0
  768. S.TopSurface=0
  769. S.BottomSurface=0
  770. S.Transparency=0
  771. S.Anchored=true
  772. S.CanCollide=false
  773. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  774. S.Parent=Character
  775. msh1.Parent = S
  776. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.15,0.15,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  777. end
  778.  
  779. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  780. local msh1 = it("SpecialMesh")
  781. msh1.Scale = vt(0.5,0.5,0.5)
  782. msh1.MeshType = "Sphere"
  783. S=it("Part")
  784. S.Name="Effect"
  785. S.formFactor=0
  786. S.Size=vt(x1,y1,z1)
  787. S.BrickColor=color
  788. S.Reflectance = 0
  789. S.TopSurface=0
  790. S.BottomSurface=0
  791. S.Transparency=0
  792. S.Anchored=true
  793. S.CanCollide=false
  794. S.CFrame=part
  795. S.Parent=workspace
  796. msh1.Parent = S
  797. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 14 do Part.Mesh.Scale = Part.Mesh.Scale + vt(1,1,1) Part.Transparency=Part.Transparency+0.1 wait() end Part.Parent=nil end),S,S.CFrame)
  798. end
  799.  
  800. function ChargeEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  801. local msh1 = it("SpecialMesh")
  802. msh1.Scale = vt(0.5,0.5,0.5)
  803. msh1.MeshType = "Sphere"
  804. S=it("Part")
  805. S.Name="Effect"
  806. S.formFactor=0
  807. S.Size=vt(x1,y1,z1)
  808. S.BrickColor=color
  809. S.Reflectance = 0
  810. S.TopSurface=0
  811. S.BottomSurface=0
  812. S.Transparency=0
  813. S.Anchored=false
  814. S.CanCollide=false
  815. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  816. S.Parent=modelzorz
  817. msh1.Parent = S
  818. coroutine.resume(coroutine.create(function(Part,CF)
  819. f=it("BodyPosition")
  820. f.P=800
  821. f.D=100
  822. f.maxForce=vt(math.huge,math.huge,math.huge)
  823. f.position=part.Position
  824. f.Parent=Part
  825. for i=0,1,0.1 do
  826. wait()
  827. Part.Transparency=Part.Transparency+0.1
  828. end
  829. Part.Parent=nil
  830. end),S,S.CFrame)
  831. end
  832.  
  833. function ChargeEffect2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  834. local msh1 = it("SpecialMesh")
  835. msh1.Scale = vt(0.5,0.5,0.5)
  836. msh1.MeshType = "Sphere"
  837. S=it("Part")
  838. S.Name="Effect"
  839. S.formFactor=0
  840. S.Size=vt(x1,y1,z1)
  841. S.BrickColor=color
  842. S.Reflectance = 0
  843. S.TopSurface=0
  844. S.BottomSurface=0
  845. S.Transparency=0
  846. S.Anchored=false
  847. S.CanCollide=false
  848. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  849. S.Parent=modelzorz
  850. msh1.Parent = S
  851. coroutine.resume(coroutine.create(function(Part,CF)
  852. f=it("BodyPosition")
  853. f.P=800
  854. f.D=100
  855. f.maxForce=vt(math.huge,math.huge,math.huge)
  856. f.position=part.Position+vt(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  857. f.Parent=Part
  858. for i=0,1,0.1 do
  859. wait()
  860. Part.Transparency=Part.Transparency+0.1
  861. end
  862. Part.Parent=nil
  863. end),S,S.CFrame)
  864. end
  865.  
  866. print("Y U NU GIVE CREDIT.")
  867.  
  868. function WaveEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  869. local msh1 = it("SpecialMesh")
  870. msh1.Scale = vt(x1,y1,z1)
  871. msh1.MeshId = "http://www.roblox.com/asset/?id=20329976"
  872. S=it("Part")
  873. S.Name="Effect"
  874. S.formFactor=0
  875. S.Size=vt(1,1,1)
  876. S.BrickColor=color
  877. S.Reflectance = 0
  878. S.TopSurface=0
  879. S.BottomSurface=0
  880. S.Transparency=0
  881. S.Anchored=true
  882. S.CanCollide=false
  883. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  884. S.Parent=workspace
  885. msh1.Parent = S
  886. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.3,0.3,0.3) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  887. end
  888.  
  889. function BlastEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  890. local msh1 = it("SpecialMesh")
  891. msh1.Scale = vt(x1,y1,z1)
  892. msh1.MeshId = "http://www.roblox.com/asset/?id=1323306"
  893. S=it("Part")
  894. S.Name="Effect"
  895. S.formFactor=0
  896. S.Size=vt(1,1,1)
  897. S.BrickColor=color
  898. S.Reflectance = 0
  899. S.TopSurface=0
  900. S.BottomSurface=0
  901. S.Transparency=0
  902. S.Anchored=true
  903. S.CanCollide=false
  904. S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(x3,y3,z3)
  905. S.Parent=workspace
  906. msh1.Parent = S
  907. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.5,0.8,0.5) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  908. end
  909.  
  910. function DerpMagic(part,x1,y1,z1,x2,y2,z2,color)
  911. local msh1 = it("BlockMesh")
  912. msh1.Scale = vt(0.5,0.5,0.5)
  913. S=it("Part")
  914. S.Name="Effect"
  915. S.formFactor=0
  916. S.Size=vt(x1,y1,z1)
  917. S.BrickColor=color
  918. S.Reflectance = 0
  919. S.TopSurface=0
  920. S.BottomSurface=0
  921. S.Transparency=0
  922. S.Anchored=false
  923. S.CanCollide=false
  924. S.CFrame=part.CFrame
  925. S.Parent=workspace
  926. msh1.Parent = S
  927. W=it("Weld")
  928. W.Parent=S
  929. W.Part0=S
  930. W.Part1=part
  931. W.C0=cf(x2,y2,z2) * euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  932. W.Parent=nil
  933. S.Anchored=true
  934. coroutine.resume(coroutine.create(function(Part,Weld) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) --[[Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))]] Part.Transparency=i*.1 wait() end Part.Parent=nil Weld.Parent=nil end),S,W)
  935. end
  936.  
  937. DarkRiftF=function(par) --Thank you turdulator for this :D
  938. PWN={}
  939. for _,v in pairs(workspace:children()) do
  940. if v.className=="Model" and v:FindFirstChild("Humanoid")~=nil then
  941. if v.Humanoid.Health>0 and v:FindFirstChild("Torso")~=nil then
  942. if v~=Character and (v.Torso.Position-par.Position).magnitude<=25 then
  943. table.insert(PWN,v.Torso)
  944. end
  945. end
  946. end
  947. end
  948. for _,t in pairs(PWN) do
  949. Mag=(par.Position-t.Position).magnitude/2
  950. t.Parent.Humanoid:TakeDamage(50)
  951. rl=it("BodyAngularVelocity")
  952. rl.P=3000
  953. rl.maxTorque=vt(500000,500000,500000)*5000
  954. rl.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))/10
  955. rl.Parent=t
  956. game:GetService("Debris"):AddItem(rl,.1)
  957. if Mag<=2 then
  958. t.Parent.Humanoid:TakeDamage(20)
  959. else
  960. vl=it("BodyVelocity")
  961. vl.P=3000
  962. vl.maxForce=vt(50000000000,50000000000,50000000000)
  963. vl.velocity=(t.Position-par.Position).unit*-(70/(Mag))
  964. vl.Parent=t
  965. game:GetService("Debris"):AddItem(vl,.1)
  966. end
  967. end
  968. wait(.08)
  969. end
  970.  
  971. DBHit=function(hit,Damage) --credits to turdulator for making this function :D
  972. if hit.Parent==nil then
  973. return
  974. end
  975. h=hit.Parent:FindFirstChild("Humanoid")
  976. t=hit.Parent:FindFirstChild("Torso")
  977. if h~=nil and t~=nil then
  978. if h.Parent==Character then
  979. return
  980. end
  981. c=it("ObjectValue")
  982. c.Name="creator"
  983. c.Value=game.Players.LocalPlayer
  984. c.Parent=h
  985. game:GetService("Debris"):AddItem(c,.5)
  986. if math.random(0,99)+math.random()<=7.8 then
  987. CRIT=true
  988. Damage=Damage*100
  989. --[[ Knockback=Knockback*2
  990. r=it("BodyAngularVelocity")
  991. r.P=3000
  992. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  993. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  994. r.Parent=hit.Parent.Torso]]
  995. s=it("Sound")
  996. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  997. s.Volume=1
  998. s.Pitch=2
  999. s.Parent=hit
  1000. s.PlayOnRemove=true
  1001. s.Parent=nil
  1002.  
  1003. end
  1004. h:TakeDamage(Damage)
  1005. showDamage(hit.Parent,Damage,30)
  1006. vl=it("BodyVelocity")
  1007. vl.P=4500
  1008. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1009. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,3,0)
  1010. vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,45,0)
  1011. vl.Parent=t
  1012. game:GetService("Debris"):AddItem(vl,.2)
  1013. rl=it("BodyAngularVelocity")
  1014. rl.P=3000
  1015. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1016. rl.angularvelocity=vt(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  1017. rl.Parent=t
  1018. game:GetService("Debris"):AddItem(rl,.2)
  1019. else
  1020. if hit.CanCollide==false then
  1021. return
  1022. end
  1023. MagicCom:disconnect()
  1024. -- DBExplode(DB)
  1025. end
  1026. end
  1027.  
  1028. DBHit2=function(hit,Damage) --credits to turdulator for making this function :D
  1029. if hit.Parent==nil then
  1030. return
  1031. end
  1032. h=hit.Parent:FindFirstChild("Humanoid")
  1033. t=hit.Parent:FindFirstChild("Torso")
  1034. if h~=nil and t~=nil then
  1035. if h.Parent==Character then
  1036. return
  1037. end
  1038. c=it("ObjectValue")
  1039. c.Name="creator"
  1040. c.Value=game.Players.LocalPlayer
  1041. c.Parent=h
  1042. game:GetService("Debris"):AddItem(c,.5)
  1043. if math.random(0,99)+math.random()<=7.8 then
  1044. CRIT=true
  1045. Damage=Damage*40
  1046. --[[ Knockback=Knockback*2
  1047. r=it("BodyAngularVelocity")
  1048. r.P=3000
  1049. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1050. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1051. r.Parent=hit.Parent.Torso]]
  1052. s=it("Sound")
  1053. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1054. s.Volume=1
  1055. s.Pitch=2
  1056. s.Parent=hit
  1057. s.PlayOnRemove=true
  1058. s.Parent=nil
  1059.  
  1060. end
  1061. h:TakeDamage(Damage)
  1062. showDamage(hit.Parent,Damage,60)
  1063. vl=it("BodyVelocity")
  1064. vl.P=4500
  1065. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1066. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,30,0)
  1067. vl.velocity=Head.CFrame.lookVector*35+Head.Velocity/1.05
  1068. vl.Parent=t
  1069. game:GetService("Debris"):AddItem(vl,.2)
  1070. rl=it("BodyAngularVelocity")
  1071. rl.P=3000
  1072. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1073. rl.angularvelocity=vt(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1074. rl.Parent=t
  1075. game:GetService("Debris"):AddItem(rl,.2)
  1076. else
  1077. if hit.CanCollide==false then
  1078. return
  1079. end
  1080. MagicCom:disconnect()
  1081. -- DBExplode(DB)
  1082. end
  1083. end
  1084.  
  1085. DOHHit=function(hit,Damage,Pos) --credits to turdulator for making this function :D
  1086. if hit.Parent==nil then
  1087. return
  1088. end
  1089. h=hit.Parent:FindFirstChild("Humanoid")
  1090. t=hit.Parent:FindFirstChild("Torso")
  1091. if h~=nil and t~=nil then
  1092. if h.Parent==Character then
  1093. return
  1094. end
  1095. c=it("ObjectValue")
  1096. c.Name="creator"
  1097. c.Value=game.Players.LocalPlayer
  1098. c.Parent=h
  1099. game:GetService("Debris"):AddItem(c,.5)
  1100. if math.random(0,99)+math.random()<=7.8 then
  1101. CRIT=true
  1102. Damage=Damage*50
  1103. --[[ Knockback=Knockback*2
  1104. r=it("BodyAngularVelocity")
  1105. r.P=3000
  1106. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1107. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1108. r.Parent=hit.Parent.Torso]]
  1109. s=it("Sound")
  1110. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1111. s.Volume=1
  1112. s.Pitch=2
  1113. s.Parent=hit
  1114. s.PlayOnRemove=true
  1115. s.Parent=nil
  1116.  
  1117. end
  1118. h:TakeDamage(Damage)
  1119. showDamage(hit.Parent,Damage,60)
  1120. vl=it("BodyVelocity")
  1121. vl.P=4500
  1122. vl.maxForce=vt(math.huge,math.huge,math.huge)
  1123. -- vl.velocity=vt(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+vt(0,60,0)
  1124. vl.velocity=Head.CFrame.lookVector+Head.Velocity/1.05
  1125. vl.Parent=t
  1126. game:GetService("Debris"):AddItem(vl,.2)
  1127. rl=it("BodyAngularVelocity")
  1128. rl.P=3000
  1129. rl.maxTorque=vt(500000,500000,500000)*50000000000000
  1130. rl.angularvelocity=vt(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1131. rl.Parent=t
  1132. game:GetService("Debris"):AddItem(rl,.2)
  1133. else
  1134. if hit.CanCollide==false then
  1135. return
  1136. end
  1137. MagicCom:disconnect()
  1138. -- DBExplode(DB)
  1139. end
  1140. end
  1141.  
  1142. Damagefunc1=function(hit,Damage,Knockback)
  1143. if attackdebounce == false then
  1144. attackdebounce = true
  1145. coroutine.resume(coroutine.create(function()
  1146. wait(0.1)
  1147. attackdebounce = false
  1148. end))
  1149. if hit.Parent==nil then
  1150. return
  1151. end
  1152. CPlayer=Bin
  1153. h=hit.Parent:FindFirstChild("Humanoid")
  1154. if h~=nil and hit.Parent.Name~="Fenrier" and hit.Parent:FindFirstChild("Torso")~=nil then
  1155. Damage=Damage
  1156. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1157. return
  1158. end]]
  1159. if mana<400 then
  1160. mana=mana+math.random(10,20)
  1161. else
  1162. mana=400
  1163. end
  1164. c=it("ObjectValue")
  1165. c.Name="creator"
  1166. c.Value=game.Players.LocalPlayer
  1167. c.Parent=h
  1168. game:GetService("Debris"):AddItem(c,.5)
  1169. -- print(c.Value)
  1170. if math.random(0,99)+math.random()<=7.8 then
  1171. CRIT=true
  1172. Damage=Damage*500
  1173. --[[ Knockback=Knockback*2
  1174. r=it("BodyAngularVelocity")
  1175. r.P=3000
  1176. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1177. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1178. r.Parent=hit.Parent.Torso]]
  1179. s=it("Sound")
  1180. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1181. s.Volume=1
  1182. s.Pitch=2
  1183. s.Parent=hit
  1184. s.PlayOnRemove=true
  1185. s.Parent=nil
  1186.  
  1187. end
  1188. Damage=Damage+math.random(0,100)
  1189. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/50))
  1190. h:TakeDamage(Damage)
  1191. showDamage(hit.Parent,Damage,100)
  1192. vp=it("BodyVelocity")
  1193. vp.P=500
  1194. vp.maxForce=vt(math.huge,0,math.huge)
  1195. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1196. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  1197. if Knockback>0 then
  1198. vp.Parent=hit.Parent.Torso
  1199. end
  1200. game:GetService("Debris"):AddItem(vp,1)
  1201. --[[ r=it("BodyAngularVelocity")
  1202. r.P=3000
  1203. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1204. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1205. r.Parent=hit.Parent.Torso]]
  1206. game:GetService("Debris"):AddItem(r,.5)
  1207. c=it("ObjectValue")
  1208. c.Name="creator"
  1209. c.Value=Player
  1210. c.Parent=h
  1211. game:GetService("Debris"):AddItem(c,.5)
  1212. CRIT=false
  1213. hitDeb=true
  1214. AttackPos=6
  1215. end
  1216. end
  1217. end
  1218.  
  1219. DOH=function(hit,Damage,Knockback)
  1220. if attackdebounce == false then
  1221. attackdebounce = true
  1222. coroutine.resume(coroutine.create(function()
  1223. wait(0.2)
  1224. attackdebounce = false
  1225. end))
  1226. if hit.Parent==nil then
  1227. return
  1228. end
  1229. CPlayer=Bin
  1230. h=hit.Parent:FindFirstChild("Humanoid")
  1231. if h~=nil and hit.Parent.Name~="Fenrier" and hit.Parent:FindFirstChild("Torso")~=nil then
  1232. Damage=Damage
  1233. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1234. return
  1235. end]]
  1236. c=it("ObjectValue")
  1237. c.Name="creator"
  1238. c.Value=game.Players.LocalPlayer
  1239. c.Parent=h
  1240. game:GetService("Debris"):AddItem(c,.5)
  1241. -- print(c.Value)
  1242. if math.random(0,99)+math.random()<=7.8 then
  1243. CRIT=true
  1244. Damage=Damage*100
  1245. --[[ Knockback=Knockback*2
  1246. r=it("BodyAngularVelocity")
  1247. r.P=3000
  1248. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1249. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1250. r.Parent=hit.Parent.Torso]]
  1251. s=it("Sound")
  1252. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1253. s.Volume=1
  1254. s.Pitch=2
  1255. s.Parent=hit
  1256. s.PlayOnRemove=true
  1257. s.Parent=nil
  1258.  
  1259. end
  1260. Damage=Damage+math.random(0,90)
  1261. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/90))
  1262. h:TakeDamage(Damage)
  1263. showDamage(hit.Parent,Damage,100)
  1264. vp=it("BodyVelocity")
  1265. vp.P=500
  1266. vp.maxForce=vt(math.huge,0,math.huge)
  1267. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1268. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  1269. if Knockback>0 then
  1270. vp.Parent=hit.Parent.Torso
  1271. end
  1272. game:GetService("Debris"):AddItem(vp,.25)
  1273. --[[ r=it("BodyAngularVelocity")
  1274. r.P=3000
  1275. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  1276. r.angularvelocity=vt(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1277. r.Parent=hit.Parent.Torso]]
  1278. game:GetService("Debris"):AddItem(r,.5)
  1279. c=it("ObjectValue")
  1280. c.Name="creator"
  1281. c.Value=Player
  1282. c.Parent=h
  1283. game:GetService("Debris"):AddItem(c,.5)
  1284. wait(1)
  1285. DOHeffect(hit,20,30,2,0,0)
  1286. bewm(workspace,1)
  1287. wait(0.1)
  1288. DOHeffect(hit,20,30,-2,0.5,0)
  1289. bewm(workspace,1)
  1290. wait(0.1)
  1291. DOHeffect(hit,20,30,2,1,0)
  1292. bewm(workspace,1)
  1293. wait(0.1)
  1294. DOHeffect(hit,20,30,-2,1.5,0)
  1295. bewm(workspace,1)
  1296. CRIT=false
  1297. hitDeb=true
  1298. AttackPos=6
  1299. end
  1300. end
  1301. end
  1302.  
  1303. showDamage=function(Char,Dealt,du)
  1304. m=it("Model")
  1305. m.Name=tostring(Dealt)
  1306. h=it("Humanoid")
  1307. h.Health=0
  1308. h.MaxHealth=0
  1309. h.Parent=m
  1310. c=it("Part")
  1311. c.Transparency=0
  1312. c.BrickColor=BrickColor:Red()
  1313. if CRIT==true then
  1314. c.BrickColor=BrickColor.new("Gold")
  1315. end
  1316. c.Name="Head"
  1317. c.TopSurface=0
  1318. c.BottomSurface=0
  1319. c.formFactor="Plate"
  1320. c.Size=vt(1,.4,1)
  1321. ms=it("CylinderMesh")
  1322. ms.Bevel=.1
  1323. ms.Scale=vt(.8,.8,.8)
  1324. if CRIT==true then
  1325. ms.Scale=vt(1.25,1.5,1.25)
  1326. ms.Bevel=.2
  1327. end
  1328. ms.Parent=c
  1329. c.Reflectance=0
  1330. it("BodyGyro").Parent=c
  1331. c.Parent=m
  1332. c.CFrame=cf(Char["Head"].CFrame.p+vt(0,1.5,0))
  1333. f=it("BodyPosition")
  1334. f.P=2000
  1335. f.D=100
  1336. f.maxForce=vt(math.huge,math.huge,math.huge)
  1337. f.position=c.Position+vt(0,3,0)
  1338. f.Parent=c
  1339. game:GetService("Debris"):AddItem(m,.5+du)
  1340. c.CanCollide=false
  1341. m.Parent=workspace
  1342. c.CanCollide=false
  1343. end
  1344.  
  1345. function shoottrail2(pos1,Damage)
  1346. coroutine.resume(coroutine.create(function()
  1347. spread2 = 0
  1348. range2 = 100
  1349. rangepower = 10
  1350. local spreadvector = (vt(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) * (pos1.Position).magnitude/100
  1351. local dir = Head.CFrame.lookVector+spreadvector
  1352. --local dir = pos1.CFrame.lookVector+spreadvector
  1353. local ammount = 100
  1354. local hit2,pos = rayCast(pos1.Position,dir,10,Main)
  1355. local rangepos = range2
  1356. local function drawtrail(From,To)
  1357. local effectsmsh = it("SpecialMesh")
  1358. local Damg = Damage*250
  1359. effectsmsh.Scale = vt(1,1,1)
  1360. effectsmsh.MeshType="Sphere"
  1361. effectsmsh.Name = "Mesh"
  1362. local effectsg = it("Part")
  1363. effectsg.formFactor = 3
  1364. effectsg.CanCollide = false
  1365. effectsg.Name = "Eff"
  1366. effectsg.Locked = true
  1367. effectsg.Anchored = true
  1368. effectsg.Size = vt(1,0.4,1)
  1369. effectsg.Parent = Main
  1370. effectsmsh.Parent = effectsg
  1371. effectsg.BrickColor = BrickColor.new("Gold")
  1372. effectsg.Reflectance = 0.25
  1373. local LP = From
  1374. local point1 = To
  1375. local mg = (LP - point1).magnitude
  1376. effectsmsh.Scale = vt(3,3,3)
  1377. effectsg.CFrame = cf((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1378. MMMAGIC(effectsg,4,4,4,0,0,0,BrickColor.new("Really black"))
  1379. MOREMAGIX(effectsg,0,2,2,2,BrickColor.new("Gold"))
  1380. coroutine.resume(coroutine.create(function()
  1381. --[[for i = 0 , 1 , 0.1 do
  1382. wait()
  1383. effectsg.Transparency = 1*i
  1384. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1385. end ]]
  1386. wait()
  1387. effectsg.Transparency = 1
  1388. wait(2)
  1389. effectsg.Parent = nil
  1390. end))
  1391. end
  1392. local newpos = pos1.Position
  1393. local inc = rangepower
  1394. ammount=100
  1395. local Damg = Damage*250
  1396. local decr = 0
  1397. repeat
  1398. wait()
  1399. decr = decr + 1
  1400. rangepos = rangepos - 10
  1401. dir = dir
  1402. --dir = dir
  1403. ammount=ammount-3
  1404. if decr == 2 then
  1405. Damg = Damg/2
  1406. decr=0
  1407. end
  1408. hit2,pos = rayCast(newpos,dir,inc,Main)
  1409. drawtrail(newpos,pos)
  1410. newpos = newpos + (dir * inc)
  1411. if alt==1 then
  1412. inc = 10
  1413. if inc >= 20 then
  1414. inc = inc - 10
  1415. end
  1416. end
  1417. if hit2 ~= nil then
  1418. rangepos = 0
  1419. end
  1420. until rangepos <= 0
  1421. EVENMOARMAGIX2(cf(newpos),2,2,2,0,0,0,0,0,0,BrickColor.new("Really black"))
  1422. local c = game.Workspace:GetChildren();
  1423. for i = 1, #c do
  1424. local hum = c[i]:findFirstChild("Humanoid")
  1425. if hum ~= nil and hum.Health ~= 0 then
  1426. local head = c[i]:findFirstChild("Head");
  1427. if head ~= nil then
  1428. local targ = head.Position - newpos;
  1429. local mag = targ.magnitude;
  1430. if mag <= 10 and c[i].Name ~= Player.Name then
  1431. attackdebounce=false
  1432. Damagefunc1(head,math.floor(Damg),100)
  1433. end
  1434. end
  1435. end
  1436. end
  1437. if hit2 ~= nil then
  1438. local effectsmsh = it("SpecialMesh")
  1439. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  1440. --effectsmsh.Scale = vt(1,1,2.5)
  1441. effectsmsh.Scale = vt(3,3,3)
  1442. local effectsg = it("Part")
  1443. effectsg.formFactor = 3
  1444. effectsg.CanCollide = false
  1445. effectsg.Name = "Arrow"
  1446. effectsg.Locked = true
  1447. effectsg.Transparency = 1
  1448. effectsg.Size = vt(0.2,0.2,0.2)
  1449. effectsg.Parent = Main
  1450. effectsg.BrickColor = BrickColor.new("Really black")
  1451. effectsmsh.Parent = effectsg
  1452. effectsg.CFrame = cf(newpos,pos) + cf(newpos,pos).lookVector*2.5*2
  1453. coroutine.resume(coroutine.create(function()
  1454. wait(0)
  1455. effectsg.Parent = nil
  1456. end))
  1457. local efwel = it("Weld")
  1458. efwel.Parent = effectsg
  1459. efwel.Part0 = effectsg
  1460. efwel.Part1 = hit2
  1461. efwel.Parent = nil
  1462. effectsg.Anchored = true
  1463. --local HitPos = effectsg.Position + cf(newpos,pos).lookVector*0.75
  1464. --local HitPos = prt1.Position + cf(newpos,pos).lookVector*0.75
  1465. local HitPos = Prt4.Position + (Head.CFrame.lookVector * .5)
  1466. local CJ = cf(HitPos)
  1467. local C0 = effectsg.CFrame:inverse() * CJ
  1468. local C1 = hit2.CFrame:inverse() * CJ
  1469. --efwel.C0 = C0
  1470. --efwel.C1 = C1
  1471. --efwel.Parent = effectsg
  1472. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  1473. hum = hit2.Parent.Humanoid
  1474. attackdebounce=false
  1475. Damagefunc1(hit2,math.floor(Damg),100)
  1476. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1477. hum = hit2.Parent.Parent.Humanoid
  1478. attackdebounce=false
  1479. Damagefunc1(hum,math.floor(Damg),250)
  1480. end
  1481. end
  1482. end))
  1483. end
  1484.  
  1485. function shoottrail3(pos1,Damage)
  1486. coroutine.resume(coroutine.create(function()
  1487. spread2 = 0
  1488. range2 = 1000
  1489. rangepower = 2
  1490. local spreadvector = (vt(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) * (pos1.Position).magnitude/100
  1491. local dir = Head.CFrame.lookVector+spreadvector
  1492. --local dir = pos1.CFrame.lookVector+spreadvector
  1493. local ammount = 100
  1494. local hit2,pos = rayCast(pos1.Position,dir,10,Character)
  1495. local rangepos = range2
  1496. local function drawtrail(From,To)
  1497. local effectsmsh = it("SpecialMesh")
  1498. local Damg = Damage*50
  1499. effectsmsh.Scale = vt(1,1,1)
  1500. effectsmsh.MeshType="Sphere"
  1501. effectsmsh.Name = "Mesh"
  1502. local effectsg = it("Part")
  1503. effectsg.formFactor = 3
  1504. effectsg.CanCollide = false
  1505. effectsg.Name = "Eff"
  1506. effectsg.Locked = true
  1507. effectsg.Anchored = true
  1508. effectsg.Size = vt(1,0.4,1)
  1509. effectsg.Parent = Main
  1510. effectsmsh.Parent = effectsg
  1511. effectsg.BrickColor = BrickColor.new("Really black")
  1512. effectsg.Reflectance = 0
  1513. effectsg.Transparency=0.3
  1514. local LP = From
  1515. local point1 = To
  1516. local mg = (LP - point1).magnitude
  1517. effectsmsh.Scale = vt(3,3,3)
  1518. effectsg.CFrame = cf((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1519. MMMAGIC3(effectsg.CFrame,1,6,1,0,0,0,BrickColor.new("Really black"))
  1520. EVENMOARMAGIX(effectsg,3,3,3,0,0,0,0,0,0,BrickColor.new("Really black"))
  1521. MOREMAGIX(effectsg,0,2,2,2,BrickColor.new("Gold"))
  1522. coroutine.resume(coroutine.create(function()
  1523. --[[for i = 0 , 1 , 0.1 do
  1524. wait()
  1525. effectsg.Transparency = 1*i
  1526. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1527. end ]]
  1528. wait()
  1529. effectsg.Transparency = 1
  1530. wait(2)
  1531. effectsg.Parent = nil
  1532. end))
  1533. end
  1534. local newpos = pos1.Position
  1535. local inc = rangepower
  1536. ammount=100
  1537. local Damg = Damage*90
  1538. local decr = 0
  1539. repeat
  1540. wait()
  1541. decr = decr + 1
  1542. rangepos = rangepos - 10
  1543. dir = dir
  1544. --dir = dir
  1545. ammount=ammount-3
  1546. hit2,pos = rayCast(newpos,dir,inc,Character)
  1547. drawtrail(newpos,pos)
  1548. newpos = newpos + (dir * inc)
  1549. if alt==1 then
  1550. inc = 10
  1551. if inc >= 20 then
  1552. inc = inc - 10
  1553. end
  1554. end
  1555. if hit2 ~= nil then
  1556. rangepos = 0
  1557. end
  1558. until rangepos <= 0
  1559. EVENMOARMAGIX2(cf(newpos),5,5,5,0,0,0,0,0,0,BrickColor.new("Really black"))
  1560. local c = game.Workspace:GetChildren();
  1561. for i = 1, #c do
  1562. local hum = c[i]:findFirstChild("Humanoid")
  1563. if hum ~= nil and hum.Health ~= 0 then
  1564. local head = c[i]:findFirstChild("Head");
  1565. if head ~= nil then
  1566. local targ = head.Position - newpos;
  1567. local mag = targ.magnitude;
  1568. if mag <= 30 and c[i].Name ~= Player.Name then
  1569. attackdebounce=false
  1570. Damagefunc1(head,math.floor(Damg),0.1)
  1571. end
  1572. end
  1573. end
  1574. end
  1575. if hit2 ~= nil then
  1576. print(hit2)
  1577. local effectsmsh = it("SpecialMesh")
  1578. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  1579. --effectsmsh.Scale = vt(1,1,2.5)
  1580. effectsmsh.Scale = vt(3,3,3)
  1581. local effectsg = it("Part")
  1582. effectsg.formFactor = 3
  1583. effectsg.CanCollide = false
  1584. effectsg.Name = "Arrow"
  1585. effectsg.Locked = true
  1586. effectsg.Transparency = 1
  1587. effectsg.Size = vt(0.2,0.2,0.2)
  1588. effectsg.Parent = Main
  1589. effectsg.BrickColor = BrickColor.new("Really black")
  1590. effectsmsh.Parent = effectsg
  1591. effectsg.CFrame = cf(newpos,pos) + cf(newpos,pos).lookVector*2.5*2
  1592. coroutine.resume(coroutine.create(function()
  1593. wait(0)
  1594. effectsg.Parent = nil
  1595. end))
  1596. local efwel = it("Weld")
  1597. efwel.Parent = effectsg
  1598. efwel.Part0 = effectsg
  1599. efwel.Part1 = hit2
  1600. efwel.Parent = nil
  1601. effectsg.Anchored = true
  1602. --local HitPos = effectsg.Position + cf(newpos,pos).lookVector*0.75
  1603. --local HitPos = prt1.Position + cf(newpos,pos).lookVector*0.75
  1604. local HitPos = Prt4.Position + (Head.CFrame.lookVector * .5)
  1605. local CJ = cf(HitPos)
  1606. local C0 = effectsg.CFrame:inverse() * CJ
  1607. local C1 = hit2.CFrame:inverse() * CJ
  1608. --efwel.C0 = C0
  1609. --efwel.C1 = C1
  1610. --efwel.Parent = effectsg
  1611. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  1612. hum = hit2.Parent.Humanoid
  1613. attackdebounce=false
  1614. Damagefunc1(hit2,math.floor(Damg),100)
  1615. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1616. hum = hit2.Parent.Parent.Humanoid
  1617. attackdebounce=false
  1618. Damagefunc1(hum,math.floor(Damg),90)
  1619. end
  1620. end
  1621. end))
  1622. end
  1623.  
  1624.  
  1625. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , Ignore Descendants
  1626. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1627. end
  1628.  
  1629. hold = false
  1630.  
  1631. function ob1d(mouse)
  1632. if attack == true then return end
  1633. hold=true
  1634. if mode=="Shoot" then
  1635. shoottrail2(Prt4,15)
  1636. attack=true
  1637. for i=0,1,0.4 do
  1638. wait()
  1639. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1640. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  1641. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1642. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  1643. RW.C1 = cf(0, 0.5, 0) * euler(offset-0.3*i,1.57,0)
  1644. end
  1645. for i=0,1,0.4 do
  1646. wait()
  1647. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1648. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.5)
  1649. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1650. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57)
  1651. RW.C1 = cf(0, 0.5, 0) * euler(offset-0.3+0.3*i,1.57,0)
  1652. end
  1653. attack=false
  1654. Stance()
  1655. end
  1656. end
  1657.  
  1658. function ob1u(mouse)
  1659. hold = false
  1660. end
  1661.  
  1662. buttonhold = false
  1663.  
  1664. function Key(key,mouse)
  1665. if attack == true then return end
  1666. if key=="f" then
  1667. Mode()
  1668. end
  1669. if key=="u" then
  1670. OverchargeBlast()
  1671. end
  1672. Stance()
  1673. pcall(function() act.key[key:lower()] = true end)
  1674. local kk = key:lower()
  1675. coroutine.resume(coroutine.create(function()
  1676. if kk == "w" or kk == "a" or kk == "s" or kk == "d" then
  1677. while act.key["w"] == true or act.key["a"] == true or act.key["s"] == true or act.key["d"] == true do
  1678. wait()
  1679. end
  1680. walking = false
  1681. end
  1682. end))
  1683. if kk == "w" or kk == "a" or kk == "s" or kk == "d" then
  1684. if walking == true then return end
  1685. while act.key["w"] == true or act.key["a"] == true or act.key["s"] == true or act.key["d"] == true do
  1686. if mode=="Normal" then
  1687. Walking()
  1688. elseif mode=="Shoot" then
  1689. dodging=true
  1690. Torso.Neck.C0=necko*euler(0,-offset,-1.57)
  1691. if kk=="w" then
  1692. DodgeUp()
  1693. elseif kk=="a" then
  1694. DodgeLeft()
  1695. elseif kk=="s" then
  1696. DodgeRight()
  1697. elseif kk=="d" then
  1698. DodgeDown()
  1699. end
  1700. dodging=false
  1701. Stance()
  1702. end
  1703. wait()
  1704. end
  1705. walking = false
  1706. Stance()
  1707. end
  1708. end
  1709.  
  1710. function Key2(key,mouse)
  1711. pcall(function() act.key[key:lower()] = false end)
  1712. end
  1713.  
  1714. function s(mouse)
  1715. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1716. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1717. mouse.KeyDown:connect(function(key) Key(key,mouse) end)
  1718. --mouse.KeyDown:connect(key2)
  1719. mouse.KeyUp:connect(function(key) Key2(key,mouse) end)
  1720. mouse.KeyUp:connect(function(k) act.keydown = false
  1721. pcall(function() act.key[k:lower()] = false end)
  1722. hold = false
  1723. end)
  1724. MMouse = mouse
  1725. sheathed = false
  1726. player = Player
  1727. ch = Character
  1728. RSH = ch.Torso["Right Shoulder"]
  1729. LSH = ch.Torso["Left Shoulder"]
  1730. RHP = ch.Torso["Right Hip"]
  1731. LHP = ch.Torso["Left Hip"]
  1732. --
  1733. RSH.Parent = nil
  1734. LSH.Parent = nil
  1735. --[[RHP.C0 = cf(-0.5, -1.5, 0) * euler(0,0,0)
  1736. RHP.C1 = cf(0, 0.5, 0)
  1737. LHP.C0 = cf(0.5, -1.5, 0) * euler(0,0,0)
  1738. LHP.C1 = cf(0, 0.5, 0) ]]
  1739. --
  1740. RW.Part0 = ch.Torso
  1741. RW.C0 = cf(1.5, 0.5, 0) --* euler(1.3, 0, -0.5)
  1742. RW.C1 = cf(0, 0.5, 0)
  1743. RW.Part1 = ch["Right Arm"]
  1744. RW.Parent = ch.Torso
  1745. --_G.R = RW
  1746. --
  1747. LW.Part0 = ch.Torso
  1748. LW.C0 = cf(-1.5, 0.5, 0) --* euler(1.7, 0, 0.8)
  1749. LW.C1 = cf(0, 0.5, 0)
  1750. LW.Part1 = ch["Left Arm"]
  1751. LW.Parent = ch.Torso
  1752. --_G.L = LW
  1753. --
  1754. --[[RW2.Part0 = ch.Torso
  1755. RW2.C0 = cf(0.5, -1.5, 0) --* euler(1.7, 0, 0.8)
  1756. RW2.C1 = cf(0, 0.5, 0)
  1757. RW2.Part1 = ch["Right Leg"]
  1758. RW2.Parent = ch.Torso
  1759. --_G.L = LW
  1760. --
  1761. LW2.Part0 = ch.Torso
  1762. LW2.C0 = cf(-0.5, -1.5, 0) --* euler(1.7, 0, 0.8)
  1763. LW2.C1 = cf(0, 0.5, 0)
  1764. LW2.Part1 = ch["Left Leg"]
  1765. LW2.Parent = ch.Torso
  1766. --_G.L = LW
  1767. -- ]]
  1768. equipanim(mouse)
  1769. end
  1770.  
  1771. function ds(mouse)
  1772. sheathed = true
  1773. guardy = false
  1774. walking = nil
  1775. Character.Humanoid.WalkSpeed = 16
  1776. Torso.Neck.C1 = euler(1.57,3.14,0) * cf(0,0,-0.5)
  1777. --[[RHP.C0 = cf(0.5, -1.5, 0) * euler(0,math.rad(90),0)
  1778. RHP.C1 = cf(0, 0, 0)
  1779. LHP.C0 = cf(-0.5, -1.5, 0) * euler(0,math.rad(90),0)
  1780. LHP.C1 = cf(0, 0, 0) ]]
  1781. hideanim()
  1782. RW.Parent = nil
  1783. LW.Parent = nil
  1784. RSH.Parent = player.Character.Torso
  1785. LSH.Parent = player.Character.Torso
  1786. end
  1787.  
  1788. Bin.Selected:connect(s)
  1789. Bin.Deselected:connect(ds)
  1790.  
  1791. increase=0
  1792. --[[while true do
  1793. wait()
  1794. RH.Part0 = Torso
  1795. LH.Part0 = Torso
  1796. if mana < 0 then
  1797. mana = 0
  1798. end
  1799. if mana >= 400 then
  1800. mana=400
  1801. end
  1802. increase = increase + 1
  1803. if increase == 5 then
  1804. if mana < 400 then
  1805. mana = mana + 1
  1806. end
  1807. increase = 0
  1808. end
  1809. fentext3.Size = UDim2.new(mana*0.007,0,0.200000006,0)
  1810. fentext.Text = "Dark Energy("..mana..")"
  1811. end ]]
  1812. -- lego mediafire This acts as a chat filter. Don't ask why I do it. I just do >.>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement