LeGoldenRobloxian

Duel Guantlets

Jun 2nd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.06 KB | None | 0 0
  1. --[[
  2. This Script is created by:
  3.  
  4. Fenrier: Everything
  5.  
  6. If you're gonna steal this, then please I ask you. Please don't forum,free model, give
  7. away, or anything like that to this script. Thank you very much :)
  8. ]]
  9. Player = game:GetService("Players").LocalPlayer
  10. Character = Player.Character
  11. PlayerGui = Player.PlayerGui
  12. Backpack = Player.Backpack
  13. Torso = Character.Torso
  14. Head = Character.Head
  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. bladecolor = BrickColor.new("New Yeller")
  24. attack = false
  25. attackdebounce = false
  26. colah = BrickColor.new("Really black")
  27. combo = 0
  28. mana = 400
  29. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. --player
  31. player = nil
  32. --save shoulders
  33. RSH, LSH = nil, nil
  34. --welds
  35. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  36. --what anim
  37. anim = "none"
  38.  
  39. if Character:findFirstChild("Gauntlets",true) ~= nil then
  40. Character:findFirstChild("Gauntlets",true).Parent = nil
  41. end
  42. if Player.PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  43. Player.PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  44. end
  45.  
  46.  
  47. local modelzorz = Instance.new("Model")
  48. modelzorz.Name = "Gauntlets"
  49. modelzorz.Parent = Character
  50.  
  51. local prt1 = Instance.new("Part")
  52. prt1.formFactor = 1
  53. prt1.Parent = modelzorz
  54. prt1.CanCollide = false
  55. prt1.BrickColor = BrickColor.new("Black")
  56. prt1.Name = "Gauntlet1"
  57. prt1.Transparency = 1
  58. prt1.Size = Vector3.new(1,1,1)
  59. prt1.CFrame = Torso.CFrame
  60. local part1 = Instance.new("Part")
  61. part1.formFactor = 1
  62. part1.Parent = modelzorz
  63. part1.CanCollide = false
  64. part1.BrickColor = BrickColor.new("Black")
  65. part1.Name = "Gauntlet1 "
  66. part1.Transparency = 1
  67. part1.Size = Vector3.new(1,1,1)
  68. part1.CFrame = RightArm.CFrame
  69. local prt2 = Instance.new("Part")
  70. prt2.formFactor = 1
  71. prt2.Parent = modelzorz
  72. prt2.CanCollide = false
  73. prt2.BrickColor = BrickColor.new("Really black")
  74. prt2.Name = "Gauntlet2"
  75. prt2.Size = Vector3.new(1,1,1)
  76. prt2.CFrame = Torso.CFrame
  77. local prt3 = Instance.new("Part")
  78. prt3.formFactor = 1
  79. prt3.Parent = modelzorz
  80. prt3.CanCollide = false
  81. prt3.BrickColor = BrickColor.new("Really black")
  82. prt3.Name = "Gauntlet3"
  83. prt3.Size = Vector3.new(1,1,1)
  84. prt3.CFrame = Torso.CFrame
  85. local prt4 = Instance.new("Part")
  86. prt4.formFactor = 1
  87. prt4.Parent = modelzorz
  88. prt4.CanCollide = false
  89. prt4.BrickColor = BrickColor.new("Really black")
  90. prt4.Name = "Gauntlet4"
  91. prt4.Size = Vector3.new(1,1,1)
  92. prt4.CFrame = Torso.CFrame
  93. local prt5 = Instance.new("Part")
  94. prt5.formFactor = 1
  95. prt5.Parent = modelzorz
  96. prt5.CanCollide = false
  97. prt5.BrickColor = BrickColor.new("Really black")
  98. prt5.Name = "Gauntlet5"
  99. prt5.Size = Vector3.new(1,1,1)
  100. prt5.CFrame = Torso.CFrame
  101. local prt6 = Instance.new("Part")
  102. prt6.formFactor = 1
  103. prt6.Parent = modelzorz
  104. prt6.CanCollide = false
  105. prt6.BrickColor = BrickColor.new("Really black")
  106. prt6.Name = "Gauntlet6"
  107. prt6.Size = Vector3.new(1,1,1)
  108. prt6.CFrame = Torso.CFrame
  109. local prt7 = Instance.new("Part")
  110. prt7.formFactor = 1
  111. prt7.Parent = modelzorz
  112. prt7.CanCollide = false
  113. prt7.BrickColor = BrickColor.new("Really black")
  114. prt7.Name = "Gauntlet7"
  115. prt7.Size = Vector3.new(1,1,1)
  116. prt7.CFrame = Torso.CFrame
  117. local prt8 = Instance.new("Part")
  118. prt8.formFactor = 1
  119. prt8.Parent = modelzorz
  120. prt8.CanCollide = false
  121. prt8.BrickColor = BrickColor.new("Really black")
  122. prt8.Name = "Gauntlet8"
  123. prt8.Size = Vector3.new(1,1,1)
  124. prt8.CFrame = RightArm.CFrame
  125. local prt9 = Instance.new("Part")
  126. prt9.formFactor = 1
  127. prt9.Parent = modelzorz
  128. prt9.CanCollide = false
  129. prt9.BrickColor = BrickColor.new("Really black")
  130. prt9.Name = "Gauntlet9"
  131. prt9.Size = Vector3.new(1,1,1)
  132. prt9.CFrame = RightArm.CFrame
  133. local prt10 = Instance.new("Part")
  134. prt10.formFactor = 1
  135. prt10.Parent = modelzorz
  136. prt10.CanCollide = false
  137. prt10.BrickColor = BrickColor.new("Really black")
  138. prt10.Name = "Gauntlet10"
  139. prt10.Size = Vector3.new(1,1,1)
  140. prt10.CFrame = RightArm.CFrame
  141. local prt11 = Instance.new("Part")
  142. prt11.formFactor = 1
  143. prt11.Parent = modelzorz
  144. prt11.CanCollide = false
  145. prt11.BrickColor = BrickColor.new("Really black")
  146. prt11.Name = "Gauntlet11"
  147. prt11.Size = Vector3.new(1,1,1)
  148. prt11.CFrame = RightArm.CFrame
  149. local prt12 = Instance.new("Part")
  150. prt12.formFactor = 1
  151. prt12.Parent = modelzorz
  152. prt12.CanCollide = false
  153. prt12.BrickColor = BrickColor.new("Really black")
  154. prt12.Name = "Gauntlet12"
  155. prt12.Size = Vector3.new(1,1,1)
  156. prt12.CFrame = RightArm.CFrame
  157. local prt13 = Instance.new("Part")
  158. prt13.formFactor = 1
  159. prt13.Parent = modelzorz
  160. prt13.CanCollide = false
  161. prt13.BrickColor = BrickColor.new("Really black")
  162. prt13.Name = "Gauntlet13"
  163. prt13.Size = Vector3.new(1,1,1)
  164. prt13.CFrame = RightArm.CFrame
  165. modelzorz:BreakJoints()
  166.  
  167. local msh1 = Instance.new("BlockMesh")
  168. msh1.Parent = prt1
  169. msh1.Scale = Vector3.new(1,1,1)
  170. local mesh1 = Instance.new("BlockMesh")
  171. mesh1.Parent = part1
  172. mesh1.Scale = Vector3.new(1,1,1)
  173. local msh2 = Instance.new("SpecialMesh")
  174. msh2.Parent = prt2
  175. msh2.MeshType = "Wedge"
  176. msh2.Scale = Vector3.new(1,0.3,1.2)
  177. local msh3 = Instance.new("SpecialMesh")
  178. msh3.Parent = prt3
  179. msh3.MeshType = "Wedge"
  180. msh3.Scale = Vector3.new(1,0.3,1.2)
  181. local msh4 = Instance.new("SpecialMesh")
  182. msh4.Parent = prt4
  183. msh4.MeshType = "Wedge"
  184. msh4.Scale = Vector3.new(1,0.3,1.2)
  185. local msh5 = Instance.new("SpecialMesh")
  186. msh5.Parent = prt5
  187. msh5.MeshType = "Wedge"
  188. msh5.Scale = Vector3.new(1,0.3,1.2)
  189. local msh6 = Instance.new("SpecialMesh")
  190. msh6.Parent = prt6
  191. msh6.MeshType = "Wedge"
  192. msh6.Scale = Vector3.new(0.2,0.2,0.8)
  193. local msh7 = Instance.new("SpecialMesh")
  194. msh7.Parent = prt7
  195. msh7.MeshType = "Wedge"
  196. msh7.Scale = Vector3.new(0.2,0.2,0.8)
  197. local msh8 = Instance.new("SpecialMesh")
  198. msh8.Parent = prt8
  199. msh8.MeshType = "Wedge"
  200. msh8.Scale = Vector3.new(1,0.3,1.2)
  201. local msh9 = Instance.new("SpecialMesh")
  202. msh9.Parent = prt9
  203. msh9.MeshType = "Wedge"
  204. msh9.Scale = Vector3.new(1,0.3,1.2)
  205. local msh10 = Instance.new("SpecialMesh")
  206. msh10.Parent = prt10
  207. msh10.MeshType = "Wedge"
  208. msh10.Scale = Vector3.new(1,0.3,1.2)
  209. local msh11 = Instance.new("SpecialMesh")
  210. msh11.Parent = prt11
  211. msh11.MeshType = "Wedge"
  212. msh11.Scale = Vector3.new(1,0.3,1.2)
  213. local msh12 = Instance.new("SpecialMesh")
  214. msh12.Parent = prt12
  215. msh12.MeshType = "Wedge"
  216. msh12.Scale = Vector3.new(0.2,0.2,0.8)
  217. local msh13 = Instance.new("SpecialMesh")
  218. msh13.Parent = prt13
  219. msh13.MeshType = "Wedge"
  220. msh13.Scale = Vector3.new(0.2,0.2,0.8)
  221.  
  222. local wld1 = Instance.new("Weld")
  223. wld1.Parent = prt1
  224. wld1.Part0 = prt1
  225. wld1.Part1 = LeftArm
  226. wld1.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,1.2,0)
  227. wld1.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  228. local weld1 = Instance.new("Weld")
  229. weld1.Parent = part1
  230. weld1.Part0 = part1
  231. weld1.Part1 = RightArm
  232. weld1.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,1.2,0)
  233. weld1.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  234. local wld2 = Instance.new("Weld")
  235. wld2.Parent = prt2
  236. wld2.Part0 = prt2
  237. wld2.Part1 = LeftArm
  238. wld2.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0) * CFrame.new(0,0.3,0.65)
  239. wld2.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  240. local wld3 = Instance.new("Weld")
  241. wld3.Parent = prt3
  242. wld3.Part0 = prt3
  243. wld3.Part1 = LeftArm
  244. wld3.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(90),0) * CFrame.new(-0.65,0.3,0)
  245. wld3.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  246. local wld4 = Instance.new("Weld")
  247. wld4.Parent = prt4
  248. wld4.Part0 = prt4
  249. wld4.Part1 = LeftArm
  250. wld4.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(0,0.3,-0.65)
  251. wld4.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  252. local wld5 = Instance.new("Weld")
  253. wld5.Parent = prt5
  254. wld5.Part0 = prt5
  255. wld5.Part1 = LeftArm
  256. wld5.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(270),0) * CFrame.new(0.65,0.3,0)
  257. wld5.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  258. local wld6 = Instance.new("Weld")
  259. wld6.Parent = prt6
  260. wld6.Part0 = prt6
  261. wld6.Part1 = LeftArm
  262. wld6.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(0.3,1,-0.5)
  263. wld6.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  264. local wld7 = Instance.new("Weld")
  265. wld7.Parent = prt7
  266. wld7.Part0 = prt7
  267. wld7.Part1 = LeftArm
  268. wld7.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(-0.3,1,-0.5)
  269. wld7.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  270. local wld8 = Instance.new("Weld")
  271. wld8.Parent = prt8
  272. wld8.Part0 = prt8
  273. wld8.Part1 = RightArm
  274. wld8.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0) * CFrame.new(0,0.3,0.65)
  275. wld8.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  276. local wld9 = Instance.new("Weld")
  277. wld9.Parent = prt9
  278. wld9.Part0 = prt9
  279. wld9.Part1 = RightArm
  280. wld9.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(90),0) * CFrame.new(-0.65,0.3,0)
  281. wld9.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  282. local wld10 = Instance.new("Weld")
  283. wld10.Parent = prt10
  284. wld10.Part0 = prt10
  285. wld10.Part1 = RightArm
  286. wld10.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(0,0.3,-0.65)
  287. wld10.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  288. local wld11 = Instance.new("Weld")
  289. wld11.Parent = prt11
  290. wld11.Part0 = prt11
  291. wld11.Part1 = RightArm
  292. wld11.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(270),0) * CFrame.new(0.65,0.3,0)
  293. wld11.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  294. local wld12 = Instance.new("Weld")
  295. wld12.Parent = prt12
  296. wld12.Part0 = prt12
  297. wld12.Part1 = RightArm
  298. wld12.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(0.3,1,-0.5)
  299. wld12.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  300. local wld13 = Instance.new("Weld")
  301. wld13.Parent = prt13
  302. wld13.Part0 = prt13
  303. wld13.Part1 = RightArm
  304. wld13.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(-0.3,1,-0.5)
  305. wld13.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  306.  
  307. local boulder = Instance.new("Part")
  308. boulder.formFactor = 1
  309. boulder.Parent = nil
  310. boulder.CanCollide = false
  311. boulder.BrickColor = BrickColor.new("Really black")
  312. boulder.Name = "Boulder"
  313. boulder.Transparency = 0
  314. boulder.Size = Vector3.new(5,5,5)
  315. boulder.CFrame = Torso.CFrame
  316. local bouldermsh = Instance.new("BlockMesh")
  317. bouldermsh.Parent = boulder
  318. bouldermsh.Scale = Vector3.new(1,1,1)
  319. local boulderwld = Instance.new("Weld")
  320. boulderwld.Parent = boulder
  321. --[[boulderwld.Part0 = boulder
  322. boulderwld.Part1 = Torso
  323. boulderwld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(180),0) * CFrame.new(-0.3,1,-0.5)
  324. boulderwld.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0) ]]
  325.  
  326. local fengui = Instance.new("GuiMain")
  327. fengui.Parent = Player.PlayerGui
  328. fengui.Name = "manaGUI"
  329. local fenframe = Instance.new("Frame")
  330. fenframe.Parent = fengui
  331. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  332. fenframe.BackgroundTransparency = 1
  333. fenframe.BorderColor3 = Color3.new(17,17,17)
  334. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  335. local fentext = Instance.new("TextLabel")
  336. fentext.Parent = fenframe
  337. fentext.Text = "Mana("..mana..")"
  338. fentext.BackgroundTransparency = 1
  339. fentext.SizeConstraint = "RelativeXY"
  340. fentext.TextXAlignment = "Center"
  341. fentext.TextYAlignment = "Center"
  342. fentext.Position = UDim2.new(0,80,1,200)
  343. local fentext2 = Instance.new("TextLabel")
  344. fentext2.Parent = fenframe
  345. fentext2.Text = " "
  346. fentext2.BackgroundTransparency = 0
  347. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  348. fentext2.SizeConstraint = "RelativeXY"
  349. fentext2.TextXAlignment = "Center"
  350. fentext2.TextYAlignment = "Center"
  351. fentext2.Position = UDim2.new(0,10,1,170)
  352. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  353. local fentext3 = Instance.new("TextLabel")
  354. fentext3.Parent = fenframe
  355. fentext3.Text = " "
  356. fentext3.BackgroundTransparency = 0
  357. fentext3.BackgroundColor3 = Color3.new(1,1,0)
  358. fentext3.SizeConstraint = "RelativeXY"
  359. fentext3.TextXAlignment = "Center"
  360. fentext3.TextYAlignment = "Center"
  361. fentext3.Position = UDim2.new(0,10,1,170)
  362. fentext3.Size = UDim2.new(mana*0.007,0,0.400000006,0)
  363. --2.9000001, 0}, {0.450000018, 0}
  364. local gairo = Instance.new("BodyGyro")
  365. gairo.Parent = nil
  366. gairo.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  367. gairo.P = 20e+003
  368.  
  369. if (script.Parent.className ~= "HopperBin") then
  370. Tool = Instance.new("HopperBin")
  371. Tool.Parent = Backpack
  372. Tool.Name = "Gauntlets"
  373. script.Parent = Tool
  374. end
  375. Bin = script.Parent
  376. if Bin:findFirstChild("ManaBar",true) ~= nil then
  377. mana=Bin.ManaBar.Value
  378. Bin:findFirstChild("ManaBar",true).Parent = nil
  379. end
  380. local bar=Instance.new("IntValue")
  381. bar.Parent=Bin
  382. bar.Name="ManaBar"
  383. bar.Value=mana
  384.  
  385. function hideanim()
  386.  
  387. end
  388.  
  389. function equipanim()
  390. for i = 0,1,0.1 do
  391. wait()
  392. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2*i,-1.57*i,0)
  393. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  394. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2*i,1.57*i,0)
  395. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  396. end
  397. wait(0.1)
  398. WaveEffect(Torso,3,3,3,0,-1,0,0,0,0,BrickColor.new("Really black"))
  399. magicsound(1.2)
  400. for i = 0,1,0.2 do
  401. wait()
  402. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2-3*i,-1.57+1.57*i,0)
  403. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  404. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2-3*i,1.57-1.57*i,0)
  405. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  406. end
  407. wait(0.2)
  408. for i = 0,1,0.1 do
  409. wait()
  410. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-1+2.5*i,-1*i,0)
  411. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  412. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-1+2*i,1*i,0)
  413. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  414. end
  415. end
  416.  
  417. function onehit()
  418. attack = true
  419. gairo.Parent = Head
  420. gairo.cframe = Head.CFrame
  421. ss(0.7)
  422. con1=prt1.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  423. for i = 0,1,0.2 do
  424. wait()
  425. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,-1*i) * CFrame.new(0,0,-0.5)
  426. LW.C0 = CFrame.new(-1.5,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(1.5+0.07*i,-1-0.57*i,0)
  427. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1*i,0,0)
  428. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1,1,0)
  429. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  430. end
  431. wait(0.1)
  432. con1:disconnect()
  433. gairo.Parent = nil
  434. attack = false
  435. end
  436.  
  437. function twohit()
  438. attack = true
  439. gairo.Parent = Head
  440. gairo.cframe = Head.CFrame
  441. ss(0.7)
  442. con2=part1.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  443. for i = 0,1,0.2 do
  444. wait()
  445. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,-1+2*i) * CFrame.new(0,0,-0.5)
  446. LW.C0 = CFrame.new(-1.5,0.5,-0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.57-2.57*i,-1.57,0)
  447. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1,0,0)
  448. RW.C0 = CFrame.new(1.5,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(1+0.57*i,1+0.57*i,0)
  449. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1*i,0,0)
  450. end
  451. wait(0.1)
  452. con2:disconnect()
  453. gairo.Parent = nil
  454. attack = false
  455. end
  456.  
  457. function threehit()
  458. attack = true
  459. gairo.Parent = Head
  460. gairo.cframe = Head.CFrame
  461. ss(0.8)
  462. con1=prt1.Touched:connect(function(hit) Damagefunc1(hit,25,10) end)
  463. for i = 0,1,0.2 do
  464. wait()
  465. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,1-1*i) * CFrame.new(0,0,-0.5)
  466. LW.C0 = CFrame.new(-1.5,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(-1+3*i,-1.57+1.57*i,0)
  467. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1-1*i,0,0)
  468. RW.C0 = CFrame.new(1.5,0.5,-0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.57-2.57*i,1.57,0)
  469. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1,0,0)
  470. end
  471. wait(0.1)
  472. con1:disconnect()
  473. gairo.Parent = nil
  474. attack = false
  475. end
  476.  
  477. function fourhit()
  478. attack = true
  479. gairo.Parent = Head
  480. gairo.cframe = Head.CFrame
  481. for i = 0,1,0.2 do
  482. wait()
  483. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,1.57*i) * CFrame.new(0,0,-0.5)
  484. LW.C0 = CFrame.new(-1.5,0.5,-0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(2-2*i,0,-0.2*i)
  485. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  486. RW.C0 = CFrame.new(1.5,0.5,-0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(-1+2.57*i,1.57-1.57*i,0)
  487. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1-1*i,3.14*i,-1.57*i)
  488. end
  489. wait(0.2)
  490. local testbrick = Instance.new("Part")
  491. testbrick.Parent = modelzorz
  492. testbrick.Anchored = true
  493. testbrick.Transparency = 1
  494. testbrick.CFrame = Torso.CFrame * CFrame.new(3,0,0)
  495. coroutine.resume(coroutine.create(function()
  496. local c = game.Workspace:GetChildren();
  497. for i = 1, #c do
  498. local hum = c[i]:findFirstChild("Humanoid")
  499. if hum ~= nil and hum.Health ~= 0 then
  500. local head = c[i]:findFirstChild("Head");
  501. if head ~= nil then
  502. local targ = head.Position - testbrick.Position;
  503. local mag = targ.magnitude;
  504. if mag <= 3 and c[i].Name ~= Player.Name then
  505. UpBlast(head,math.random(20,30))
  506. critsound(0.7)
  507. c=Instance.new("ObjectValue")
  508. c.Name="creator"
  509. c.Value=game.Players.LocalPlayer
  510. c.Parent=hum.Parent
  511. game:GetService("Debris"):AddItem(c,.5)
  512. end
  513. end
  514. end
  515. end
  516. end))
  517. --[[if workspace:findFirstChild("Base") ~= nil then
  518. colah = workspace.Base.BrickColor
  519. else
  520. colah = BrickColor.new("Really black")
  521. end ]]
  522. GroundEffect(Torso,1,6,1,3,-3,0,0,0,0,BrickColor.new("Gold"))
  523. for i = 1,4 do
  524. GroundEffect2(Torso,0.5,3,0.5,3,-3,0,math.random(-50,50),math.random(-50,50),math.random(-50,50),BrickColor.new("Gold"))
  525. end
  526. spikesound(7)
  527. for i = 0,1,0.2 do
  528. wait()
  529. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,1.57) * CFrame.new(0,0,-0.5)
  530. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,-0.2-0.3*i)
  531. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  532. RW.C0 = CFrame.new(1.5-0.5*i,0.5,-0.3*i) * CFrame.fromEulerAnglesXYZ(1.57-1.27*i,0,-0.5*i)
  533. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,3.14+1.57*i,-1.57+1.57*i)
  534. end
  535. wait(0.3)
  536. testbrick.Parent = nil
  537. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  538. gairo.Parent = nil
  539. attack = false
  540. end
  541.  
  542. function BoulderSmash()
  543. if mana >= 100 then
  544. attack = true
  545. torspos = Torso.Position
  546. bod = Instance.new("BodyPosition")
  547. bod.position = Torso.Position
  548. bod.Parent = Torso
  549. bod.maxForce = Vector3.new(10e+080, 10e+080, 10e+080)
  550. local b = Instance.new("BodyGyro")
  551. b.P=18000
  552. b.D=600
  553. b.maxTorque=Vector3.new(100000,100000000,100000)*50000000000000000000000000
  554. b.Parent = Torso
  555. b.cframe = Torso.CFrame
  556. --[[if workspace:findFirstChild("Base") ~= nil then
  557. colah = workspace.Base.BrickColor
  558. else
  559. colah = BrickColor.new("Really black")
  560. end ]]
  561. boulder.BrickColor = BrickColor.new("Gold")
  562. boulder.Parent = modelzorz
  563. boulder.Anchored = true
  564. boulder.CFrame = Torso.CFrame * CFrame.new(0,-10,-3.5)
  565. mana = mana - 100
  566. for i = 0,1,0.05 do
  567. wait()
  568. boulder.CFrame = Torso.CFrame * CFrame.new(0,-10+8*i,-3.5)
  569. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.5*i,0,0)
  570. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5-1*i,-1+1*i,0)
  571. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  572. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1-0.5*i,1-1*i,0)
  573. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  574. end
  575. boulder.Anchored = false
  576. wait(0.1)
  577. boulderwld.Parent = boulder
  578. boulderwld.Part0 = boulder
  579. boulderwld.Part1 = RightArm
  580. boulderwld.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(1.4,3.5,0)
  581. boulderwld.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  582. for i = 0,1,0.05 do
  583. wait()
  584. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.5-1*i,0,0)
  585. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5-1+3*i,0,0)
  586. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  587. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1-0.5+3*i,0,0)
  588. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  589. end
  590. wait(0.5)
  591. for i = 0,0.5,0.1 do
  592. wait()
  593. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(-0.5+0.5*i,0,0)
  594. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(3.5-2*i,0,0)
  595. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  596. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(3.5-2*i,0,0)
  597. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  598. end
  599. boulderwld.Parent = nil
  600. boulder.Velocity = Torso.CFrame.lookVector * 100
  601. boulder.CanCollide = true
  602. wait(0.1)
  603. bolcon=boulder.Touched:connect(function(hit) BoulderHit(hit,40,10) end)
  604. wait(0.4)
  605. for i = 0.5,1,0.1 do
  606. wait()
  607. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(-0.5+0.5*i,0,0)
  608. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(3.5-2*i,0,0)
  609. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  610. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(3.5-2*i,0,0)
  611. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  612. end
  613. Character:MoveTo(torspos)
  614. wait(1.5)
  615. bolcon:disconnect()
  616. boulderwld.Parent = nil
  617. boulder.Anchored = true
  618. boulder.CanCollide = false
  619. boulder.Parent = nil
  620. b.Parent = nil
  621. bod.Parent = nil
  622. Torso.Neck.C0=necko
  623. attack = false
  624. end
  625. end
  626.  
  627. --[[function RageSmash()
  628. attack = true
  629. for i = 0,1,0.1 do
  630. wait()
  631. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.5*i,0,0)
  632. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,-1+1*i,0.8*i)
  633. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  634. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1+0.5*i,1-1*i,-0.8*i)
  635. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  636. end
  637. wait(0.3)
  638. for i = 0,1,0.2 do
  639. wait()
  640. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.5-1*i,0,0)
  641. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,0,0.8-2*i)
  642. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  643. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,0,-0.8+2*i)
  644. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  645. end
  646. local hitpos, target = RayCast(Torso.Position,Torso.Position - Vector3.new(0, 10, 0), 30, 0.5)
  647. colah = target.BrickColor
  648. GroundEffect(Torso,1,7,1,3,-3,0,0,0,-0.5,colah)
  649. GroundEffect(Torso,1,7,1,-3,-3,0,0,0,0.5,colah)
  650. GroundEffect(Torso,1,7,1,0,-3,3,0.5,0,0,colah)
  651. GroundEffect(Torso,1,7,1,0,-3,-3,-0.5,0,0,colah)
  652. wait(0.3)
  653. GroundEffect(Torso,3,9,3,6,-3,0,0,0,-0.7,colah)
  654. GroundEffect(Torso,3,9,3,-6,-3,0,0,0,0.7,colah)
  655. GroundEffect(Torso,3,9,3,0,-3,6,0.7,0,0,colah)
  656. GroundEffect(Torso,3,9,3,0,-3,-6,-0.7,0,0,colah)
  657. wait(0.3)
  658. GroundEffect(Torso,5,11,5,8,-3,0,0,0,-0.9,colah)
  659. GroundEffect(Torso,5,11,5,-8,-3,0,0,0,0.9,colah)
  660. GroundEffect(Torso,5,11,5,0,-3,8,0.9,0,0,colah)
  661. GroundEffect(Torso,5,11,5,0,-3,-8,-0.9,0,0,colah)
  662. wait(0.5)
  663. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  664. attack = false
  665. end ]]
  666.  
  667. function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  668. local msh1 = Instance.new("BlockMesh")
  669. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  670. S=Instance.new("Part")
  671. S.Name="Effect"
  672. S.formFactor=0
  673. S.Size=Vector3.new(x1,y1,z1)
  674. S.BrickColor=color
  675. S.Reflectance = 0
  676. S.TopSurface=0
  677. S.BottomSurface=0
  678. S.Transparency=0
  679. S.Anchored=true
  680. S.CanCollide=false
  681. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  682. S.Parent=Character
  683. msh1.Parent = S
  684. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(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)
  685. end
  686.  
  687. function UltimaMMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  688. local msh1 = Instance.new("BlockMesh")
  689. msh1.Scale = Vector3.new(x1,y1,z1)
  690. S=Instance.new("Part")
  691. S.Name="Effect"
  692. S.formFactor=0
  693. S.Size=Vector3.new(1,1,1)
  694. S.BrickColor=color
  695. S.Reflectance = 0
  696. S.TopSurface=0
  697. S.BottomSurface=0
  698. S.Transparency=0
  699. S.Anchored=true
  700. S.CanCollide=false
  701. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  702. S.Parent=Character
  703. msh1.Parent = S
  704. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(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)
  705. end
  706.  
  707. function MOREMAGIX(part,cframe,x,y,z,color)
  708. p2=Instance.new("Part")
  709. p2.Name="Blast"
  710. p2.TopSurface=0
  711. p2.BottomSurface=0
  712. p2.CanCollide=false
  713. p2.Anchored=true
  714. p2.BrickColor=color
  715. p2.Size=Vector3.new(x,y,z)
  716. p2.formFactor="Symmetric"
  717. p2.CFrame=part.CFrame*CFrame.new(0,cframe,0)
  718. p2.Parent=workspace
  719. m=Instance.new("BlockMesh")
  720. m.Parent=p2
  721. m.Name="BlastMesh"
  722. coroutine.resume(coroutine.create(function(part,dir) for loll=1, 15 do part.BlastMesh.Scale=part.BlastMesh.Scale-Vector3.new(.09,.09,.09) part.Transparency=loll/20 part.CFrame=part.CFrame*CFrame.new(dir)*CFrame.fromEulerAnglesXYZ(math.random(-100,100)/100, math.random(-100,100)/100, math.random(-100,100)/100) wait() end part.Parent=nil end),p2,Vector3.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10))
  723. end
  724.  
  725. function EVENMOARMAGIX(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  726. local msh1 = Instance.new("SpecialMesh")
  727. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  728. msh1.MeshType = "Sphere"
  729. S=Instance.new("Part")
  730. S.Name="Effect"
  731. S.formFactor=0
  732. S.Size=Vector3.new(x1,y1,z1)
  733. S.BrickColor=color
  734. if Style == "WingBlade" and element == "Dark" then
  735. S.BrickColor=BrickColor.new("Black")
  736. end
  737. S.Reflectance = 0
  738. S.TopSurface=0
  739. S.BottomSurface=0
  740. S.Transparency=0
  741. S.Anchored=true
  742. S.CanCollide=false
  743. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  744. S.Parent=Character
  745. msh1.Parent = S
  746. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  747. end
  748.  
  749. function GroundEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  750. local msh1 = Instance.new("SpecialMesh")
  751. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  752. msh1.MeshId = "http://www.roblox.com/asset/?id=1778999"
  753. S=Instance.new("Part")
  754. S.Name="Effect"
  755. S.formFactor=0
  756. S.Size=Vector3.new(x1,y1,z1)
  757. S.BrickColor=color
  758. S.Reflectance = 0
  759. S.TopSurface=0
  760. S.BottomSurface=0
  761. S.Transparency=0
  762. S.Anchored=true
  763. S.CanCollide=false
  764. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  765. S.Parent=Character
  766. msh1.Parent = S
  767. coroutine.resume(coroutine.create(function(Part,CF)
  768. for i=1, 9 do
  769. Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.2,0.4,0.2)
  770. wait()
  771. end
  772. wait(3)
  773. for i=1, 9 do
  774. Part.Mesh.Scale = Part.Mesh.Scale - Vector3.new(0,0.45,0)
  775. wait()
  776. end
  777. Part.Parent=nil
  778. end),S,S.CFrame)
  779. end
  780.  
  781. function GroundEffect2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  782. local msh1 = Instance.new("BlockMesh")
  783. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  784. S=Instance.new("Part")
  785. S.Name="Effect"
  786. S.formFactor=0
  787. S.Size=Vector3.new(x1,y1,z1)
  788. S.BrickColor=color
  789. S.Reflectance = 0
  790. S.TopSurface=0
  791. S.BottomSurface=0
  792. S.Transparency=0
  793. S.Anchored=true
  794. S.CanCollide=false
  795. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  796. S.Parent=Character
  797. msh1.Parent = S
  798. coroutine.resume(coroutine.create(function(Part,CF)
  799. for i=1, 9 do
  800. Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.01,0.1,0.01)
  801. wait()
  802. end
  803. wait(3)
  804. for i=1, 9 do
  805. Part.Mesh.Scale = Part.Mesh.Scale - Vector3.new(0,0.15,0)
  806. wait()
  807. end
  808. Part.Parent=nil
  809. end),S,S.CFrame)
  810. end
  811.  
  812.  
  813. function WaveEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  814. local msh1 = Instance.new("SpecialMesh")
  815. msh1.Scale = Vector3.new(x1,y1,z1)
  816. msh1.MeshId = "http://www.roblox.com/asset/?id=20329976"
  817. S=Instance.new("Part")
  818. S.Name="Effect"
  819. S.formFactor=0
  820. S.Size=Vector3.new(1,1,1)
  821. S.BrickColor=color
  822. S.Reflectance = 0
  823. S.TopSurface=0
  824. S.BottomSurface=0
  825. S.Transparency=0
  826. S.Anchored=true
  827. S.CanCollide=false
  828. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  829. S.Parent=Character
  830. msh1.Parent = S
  831. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  832. end
  833.  
  834. function BlastEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  835. local msh1 = Instance.new("SpecialMesh")
  836. msh1.Scale = Vector3.new(x1,y1,z1)
  837. msh1.MeshId = "http://www.roblox.com/asset/?id=1323306"
  838. S=Instance.new("Part")
  839. S.Name="Effect"
  840. S.formFactor=0
  841. S.Size=Vector3.new(1,1,1)
  842. S.BrickColor=color
  843. S.Reflectance = 0
  844. S.TopSurface=0
  845. S.BottomSurface=0
  846. S.Transparency=0
  847. S.Anchored=true
  848. S.CanCollide=false
  849. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  850. S.Parent=Character
  851. msh1.Parent = S
  852. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  853. end
  854.  
  855. function DifferentEffect()
  856. p=Instance.new("Part")
  857. p.Name="FlameEm"
  858. p.Shape=0
  859. p.TopSurface=0
  860. p.BottomSurface=0
  861. derp = math.random(1,2)
  862. if derp == 1 then
  863. p.BrickColor=BrickColor.new("White")
  864. else
  865. p.BrickColor=BrickColor.new("Black")
  866. end
  867. p.Anchored=true
  868. p.CanCollide=false
  869. p.Size=Vector3.new(1,1,1)
  870. p.CFrame=CFrame.new(Character["Torso"].CFrame.p+Vector3.new(0,-3,0))+Vector3.new(math.random(-10,10)/3,0,math.random(-10,10)/3)
  871. p.Parent=workspace
  872. m=Instance.new("SpecialMesh")
  873. m.MeshType="Sphere"
  874. m.Parent=p
  875. m.Scale=Vector3.new(1,1,1)
  876. coroutine.resume(coroutine.create(function(p) for i=1, 9 do p.Mesh.Scale=p.Mesh.Scale+Vector3.new(0,1.5,0) p.Transparency=p.Transparency+1/9 wait(0) end p.Parent=nil end),p)
  877. end
  878.  
  879. function ss(pitch)
  880.  
  881. local SlashSound = Instance.new("Sound")
  882. --SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  883. SlashSound.SoundId = "http://roblox.com/asset/?id=10209645"
  884. SlashSound.Parent = workspace
  885.  
  886. SlashSound.Volume = .7
  887. SlashSound.Pitch = pitch
  888. SlashSound.PlayOnRemove = true
  889. coroutine.resume(coroutine.create(function()
  890. wait(0)
  891. SlashSound.Parent = nil
  892. end))
  893. end
  894. function magicsound(pitch)
  895.  
  896. local SlashSound = Instance.new("Sound")
  897. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2248511"
  898. SlashSound.Parent = workspace
  899.  
  900. SlashSound.Volume = .5
  901. SlashSound.Pitch = pitch
  902. SlashSound.PlayOnRemove = true
  903. coroutine.resume(coroutine.create(function()
  904. wait(0)
  905. SlashSound.Parent = nil
  906. end))
  907. end
  908. function critsound(pitch)
  909.  
  910. local SlashSound = Instance.new("Sound")
  911. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  912. SlashSound.Parent = workspace
  913.  
  914. SlashSound.Volume = .7
  915. SlashSound.Pitch = pitch
  916. SlashSound.PlayOnRemove = true
  917. coroutine.resume(coroutine.create(function()
  918. wait(0)
  919. SlashSound.Parent = nil
  920. end))
  921. end
  922. function spikesound(pitch)
  923.  
  924. local SlashSound = Instance.new("Sound")
  925. SlashSound.SoundId = "http://www.roblox.com/asset/?id=3264793"
  926. SlashSound.Parent = workspace
  927.  
  928. SlashSound.Volume = .7
  929. SlashSound.Pitch = pitch
  930. SlashSound.PlayOnRemove = true
  931. coroutine.resume(coroutine.create(function()
  932. wait(0)
  933. SlashSound.Parent = nil
  934. end))
  935. end
  936.  
  937. Damagefunc1=function(hit,Damage,Knockback)
  938. if attackdebounce == false then
  939. attackdebounce = true
  940. coroutine.resume(coroutine.create(function()
  941. wait(0.1)
  942. attackdebounce = false
  943. end))
  944. if hit.Parent==nil then
  945. return
  946. end
  947. CPlayer=Bin
  948. h=hit.Parent:FindFirstChild("Humanoid")
  949. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  950. if mana < 400 then
  951. mana = mana + math.random(5,15)
  952. end
  953. if mana > 400 then
  954. mana = 400
  955. end
  956. Damage=Damage
  957. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  958. return
  959. end]]
  960. c=Instance.new("ObjectValue")
  961. c.Name="creator"
  962. c.Value=game.Players.LocalPlayer
  963. c.Parent=h
  964. game:GetService("Debris"):AddItem(c,.5)
  965. -- print(c.Value)
  966. if math.random(0,99)+math.random()<=7.8 then
  967. CRIT=true
  968. Damage=Damage*3
  969. --[[ Knockback=Knockback*2
  970. r=Instance.new("BodyAngularVelocity")
  971. r.P=3000
  972. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  973. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  974. r.Parent=hit.Parent.Torso]]
  975. critsound(2)
  976.  
  977. end
  978. Damage=Damage+math.random(0,10)
  979. -- Blood(hit.CFrame*CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  980. h:TakeDamage(Damage)
  981. showDamage(hit.Parent,Damage,.5)
  982. vp=Instance.new("BodyVelocity")
  983. vp.P=500
  984. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  985. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  986. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  987. if Knockback>0 then
  988. vp.Parent=hit.Parent.Torso
  989. end
  990. game:GetService("Debris"):AddItem(vp,.25)
  991. --[[ r=Instance.new("BodyAngularVelocity")
  992. r.P=3000
  993. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  994. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  995. r.Parent=hit.Parent.Torso]]
  996. game:GetService("Debris"):AddItem(r,.5)
  997. c=Instance.new("ObjectValue")
  998. c.Name="creator"
  999. c.Value=Player
  1000. c.Parent=h
  1001. game:GetService("Debris"):AddItem(c,.5)
  1002. CRIT=false
  1003. hitDeb=true
  1004. AttackPos=6
  1005. end
  1006. end
  1007. end
  1008.  
  1009. UpBlast=function(hit,Damage) --credits to turdulator for making this function :D
  1010. if hit.Parent==nil then
  1011. return
  1012. end
  1013. h=hit.Parent:FindFirstChild("Humanoid")
  1014. t=hit.Parent:FindFirstChild("Torso")
  1015. if h~=nil and t~=nil then
  1016. if h.Parent==Character then
  1017. return
  1018. end
  1019. if mana < 400 then
  1020. mana = mana + math.random(10,20)
  1021. end
  1022. if mana > 400 then
  1023. mana = 400
  1024. end
  1025. if math.random(0,99)+math.random()<=7.8 then
  1026. CRIT=true
  1027. Damage=Damage*3
  1028. --[[ Knockback=Knockback*2
  1029. r=Instance.new("BodyAngularVelocity")
  1030. r.P=3000
  1031. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  1032. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1033. r.Parent=hit.Parent.Torso]]
  1034. critsound(2)
  1035.  
  1036. end
  1037. h:TakeDamage(Damage)
  1038. showDamage(hit.Parent,Damage,.5)
  1039. vl=Instance.new("BodyVelocity")
  1040. vl.P=4500
  1041. vl.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1042. -- vl.velocity=Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+Vector3.new(0,3,0)
  1043. vl.velocity=Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z)*1.05+Vector3.new(0,30,0)
  1044. vl.Parent=t
  1045. game:GetService("Debris"):AddItem(vl,.2)
  1046. rl=Instance.new("BodyAngularVelocity")
  1047. rl.P=3000
  1048. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1049. -- rl.angularvelocity=Vector3.new(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  1050. local tes = math.random(1,2)
  1051. if tes == 1 then
  1052. rl.angularvelocity=Vector3.new(0,0,math.random(-40,40))
  1053. elseif tes == 2 then
  1054. rl.angularvelocity=Vector3.new(math.random(-40,40),0,0)
  1055. end
  1056. rl.Parent=t
  1057. game:GetService("Debris"):AddItem(rl,.2)
  1058. else
  1059. if hit.CanCollide==false then
  1060. return
  1061. end
  1062. MagicCom:disconnect()
  1063. -- DBExplode(DB)
  1064. end
  1065. end
  1066.  
  1067. BoulderHit=function(hit,Damage,Knockback)
  1068. if attackdebounce == false then
  1069. attackdebounce = true
  1070. coroutine.resume(coroutine.create(function()
  1071. wait(0.1)
  1072. attackdebounce = false
  1073. end))
  1074. if hit.Parent==nil then
  1075. return
  1076. end
  1077. CPlayer=Bin
  1078. if hit.Name=="Handle" then hit:BreakJoints() end
  1079. critsound(1)
  1080. boulder.Parent = nil
  1081. local pe = Instance.new("Part")
  1082. pe.Parent = game.workspace
  1083. pe.CFrame = boulder.CFrame
  1084. pe.Size = Vector3.new(1,1,1)
  1085. pe.BrickColor = boulder.BrickColor
  1086. pe:BreakJoints()
  1087. coroutine.resume(coroutine.create(function(Part)
  1088. wait(5)
  1089. Part.Parent = nil
  1090. end),pe)
  1091. for i = 1,15 do
  1092. local p = pe:Clone()
  1093. p.Parent = game.workspace
  1094. p:BreakJoints()
  1095. coroutine.resume(coroutine.create(function(Part)
  1096. wait(5)
  1097. Part.Parent = nil
  1098. end),p)
  1099. end
  1100. he=hit.Parent.Parent:FindFirstChild("Humanoid")
  1101. if he~=nil then
  1102. h=he
  1103. else
  1104. h=hit.Parent:FindFirstChild("Humanoid")
  1105. end
  1106. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1107. Damage=Damage
  1108. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1109. return
  1110. end]]
  1111. c=Instance.new("ObjectValue")
  1112. c.Name="creator"
  1113. c.Value=game.Players.LocalPlayer
  1114. c.Parent=h
  1115. game:GetService("Debris"):AddItem(c,.5)
  1116. -- print(c.Value)
  1117. if math.random(0,99)+math.random()<=7.8 then
  1118. CRIT=true
  1119. Damage=Damage*3
  1120. --[[ Knockback=Knockback*2
  1121. r=Instance.new("BodyAngularVelocity")
  1122. r.P=3000
  1123. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  1124. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1125. r.Parent=hit.Parent.Torso]]
  1126.  
  1127. end
  1128. Damage=Damage+math.random(0,10)
  1129. -- Blood(hit.CFrame*CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  1130. h:TakeDamage(Damage)
  1131. showDamage(hit.Parent,Damage,.5)
  1132. r=Instance.new("BodyAngularVelocity")
  1133. r.P=3000
  1134. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  1135. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1136. r.Parent=hit.Parent.Torso
  1137. vp=Instance.new("BodyVelocity")
  1138. vp.P=500
  1139. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1140. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1141. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  1142. if Knockback>0 then
  1143. vp.Parent=hit.Parent.Torso
  1144. end
  1145. game:GetService("Debris"):AddItem(vp,.25)
  1146. --[[ r=Instance.new("BodyAngularVelocity")
  1147. r.P=3000
  1148. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  1149. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  1150. r.Parent=hit.Parent.Torso]]
  1151. game:GetService("Debris"):AddItem(r,.5)
  1152. c=Instance.new("ObjectValue")
  1153. c.Name="creator"
  1154. c.Value=Player
  1155. c.Parent=h
  1156. game:GetService("Debris"):AddItem(c,.5)
  1157. CRIT=false
  1158. hitDeb=true
  1159. AttackPos=6
  1160. end
  1161. end
  1162. end
  1163.  
  1164. showDamage=function(Char,Dealt,du)
  1165. m=Instance.new("Model")
  1166. m.Name=tostring(Dealt)
  1167. h=Instance.new("Humanoid")
  1168. h.Health=0
  1169. h.MaxHealth=0
  1170. h.Parent=m
  1171. c=Instance.new("Part")
  1172. c.Transparency=0
  1173. c.BrickColor=BrickColor:Red()
  1174. if CRIT==true then
  1175. c.BrickColor=BrickColor.new("Really red")
  1176. end
  1177. c.Name="Head"
  1178. c.TopSurface=0
  1179. c.BottomSurface=0
  1180. c.formFactor="Plate"
  1181. c.Size=Vector3.new(1,.4,1)
  1182. ms=Instance.new("CylinderMesh")
  1183. ms.Scale=Vector3.new(.8,.8,.8)
  1184. if CRIT==true then
  1185. ms.Scale=Vector3.new(1.25,1.5,1.25)
  1186. end
  1187. ms.Parent=c
  1188. c.Reflectance=0
  1189. Instance.new("BodyGyro").Parent=c
  1190. c.Parent=m
  1191. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1192. f=Instance.new("BodyPosition")
  1193. f.P=2000
  1194. f.D=100
  1195. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1196. f.position=c.Position+Vector3.new(0,3,0)
  1197. f.Parent=c
  1198. game:GetService("Debris"):AddItem(m,.5+du)
  1199. c.CanCollide=false
  1200. m.Parent=workspace
  1201. c.CanCollide=false
  1202. end
  1203.  
  1204. function getAllParts(from)
  1205. local t = {}
  1206. function getParts(where)
  1207. for i, v in pairs(where:children()) do
  1208. if v:IsA("BasePart") then
  1209. if v.Parent ~= char and v.Parent.Parent ~= char then
  1210. table.insert(t, v)
  1211. end
  1212. end
  1213. getParts(v)
  1214. end
  1215. end
  1216. getParts(workspace)
  1217. return t
  1218. end
  1219.  
  1220. function RayCast(pos1, pos2, maxDist, forward)
  1221. local list = getAllParts(workspace)
  1222. local pos0 = pos1
  1223. for dist = 1, maxDist, forward do
  1224. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p
  1225. for _, v in pairs(list) do
  1226. local pos3 = v.CFrame:pointToObjectSpace(pos0)
  1227. local s = v.Size
  1228. if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide == true then
  1229. return pos0, v
  1230. end
  1231. end
  1232. end
  1233. return pos0, nil
  1234. end
  1235.  
  1236.  
  1237. local hitpos, target = RayCast(Vector3.new(0, 20, 0), Vector3.new(0, -10, 0), 30, 0.5)
  1238. --[[if target then
  1239. target.BrickColor = BrickColor:Random()
  1240. end ]]
  1241.  
  1242. hold = false
  1243.  
  1244. function ob1d(mouse)
  1245. if attack == true then return end
  1246. hold = true
  1247. if combo == 0 then
  1248. combo = 1
  1249. onehit()
  1250. coroutine.resume(coroutine.create(function()
  1251. wait(0.5)
  1252. if attack == false then
  1253. combo = 0
  1254. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  1255. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,-1,0)
  1256. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1257. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1,1,0)
  1258. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1259. end
  1260. end))
  1261. elseif combo == 1 then
  1262. combo = 2
  1263. twohit()
  1264. coroutine.resume(coroutine.create(function()
  1265. wait(0.5)
  1266. if attack == false then
  1267. combo = 0
  1268. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  1269. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,-1,0)
  1270. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1271. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1,1,0)
  1272. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1273. end
  1274. end))
  1275. elseif combo == 2 then
  1276. combo = 3
  1277. threehit()
  1278. coroutine.resume(coroutine.create(function()
  1279. wait(0.5)
  1280. if attack == false then
  1281. combo = 0
  1282. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  1283. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,-1,0)
  1284. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1285. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1,1,0)
  1286. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1287. end
  1288. end))
  1289. elseif combo == 3 then
  1290. combo = 4
  1291. fourhit()
  1292. coroutine.resume(coroutine.create(function()
  1293. wait(0.5)
  1294. if attack == false then
  1295. combo = 0
  1296. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  1297. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5,-1,0)
  1298. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1299. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1,1,0)
  1300. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1301. end
  1302. end))
  1303. end
  1304. end
  1305.  
  1306. function ob1u(mouse)
  1307. hold = false
  1308. end
  1309.  
  1310. buttonhold = false
  1311.  
  1312. function key(key)
  1313. if attack == true then return end
  1314. if key == "z" then
  1315. BoulderSmash()
  1316. end
  1317. end
  1318.  
  1319.  
  1320. function key2(key)
  1321.  
  1322. end
  1323.  
  1324. function s(mouse)
  1325. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1326. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1327. mouse.KeyDown:connect(key)
  1328. mouse.KeyUp:connect(key2)
  1329. player = Player
  1330. ch = Character
  1331. RSH = ch.Torso["Right Shoulder"]
  1332. LSH = ch.Torso["Left Shoulder"]
  1333. --
  1334. RW.Part0 = ch.Torso
  1335. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1336. RW.C1 = CFrame.new(0, 0.5, 0)
  1337. RW.Part1 = ch["Right Arm"]
  1338. RW.Parent = ch.Torso
  1339. --_G.R = RW
  1340. --
  1341. LW.Part0 = ch.Torso
  1342. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1343. LW.C1 = CFrame.new(0, 0.5, 0)
  1344. LW.Part1 = ch["Left Arm"]
  1345. LW.Parent = ch.Torso
  1346. --_G.L = LW
  1347. --
  1348. equipanim()
  1349. end
  1350.  
  1351. function ds(mouse)
  1352. hideanim()
  1353. RW.Parent = nil
  1354. LW.Parent = nil
  1355. RSH.Parent = player.Character.Torso
  1356. LSH.Parent = player.Character.Torso
  1357. end
  1358.  
  1359. Bin.Selected:connect(s)
  1360. Bin.Deselected:connect(ds)
  1361.  
  1362. function onRunning(speed)
  1363. if attack == true then return end
  1364. if speed>0 then
  1365. walking = true
  1366. for i = 0,1,0.1 do
  1367. wait()
  1368. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5-2.5*i,-1+1*i,0)
  1369. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1370. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1-2*i,1-1*i,0)
  1371. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1372. end
  1373. else
  1374. walking = false
  1375. for i = 0,1,0.1 do
  1376. wait()
  1377. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.5-2.5+2.5*i,-1+1-1*i,0)
  1378. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1379. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1-2+2*i,1-1+1*i,0)
  1380. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1381. end
  1382.  
  1383. end
  1384. end
  1385. Character.Humanoid.Running:connect(onRunning)
  1386.  
  1387. while true do
  1388. wait(0)
  1389. bar.Value=mana
  1390. fentext3.Size = UDim2.new(mana*0.007,0,0.200000006,0)
  1391. fentext.Text = "Mana("..mana..")"
  1392. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  1393. end
  1394.  
  1395. wait()
  1396.  
  1397. local player = game.Players.LocalPlayer
  1398. local m = player:GetMouse()
  1399.  
  1400. local runService = game:GetService("RunService")
  1401.  
  1402. local dp = Vector3.new()
  1403. local dcf = CFrame.new()
  1404.  
  1405. local shrink
  1406. local magiccam = true
  1407. local camconnect
  1408.  
  1409. local oldPos = Vector3.new()
  1410. local oldx = Vector3.new()
  1411. local oldy = Vector3.new()
  1412. local oldz = Vector3.new()
  1413.  
  1414. local helpergui = Instance.new("ScreenGui", player.PlayerGui)
  1415. local camRot = Vector2.new()
  1416. local camDist = 10
  1417.  
  1418. function camera()
  1419. if magiccam then
  1420. local ax = CFrame.Angles(camRot.x, 0, 0)
  1421. local ay = CFrame.Angles(0, camRot.y, 0)
  1422. local a = CFrame.Angles(-(m.Y / helpergui.AbsoluteSize.y-0.5), -(m.X / helpergui.AbsoluteSize.x-0.5), 0) * ay * ax
  1423. local sx, sy, sz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = (player.Character.Head.CFrame * a):components()
  1424. local x = Vector3.new(m00, m10, m20)
  1425. local y = Vector3.new(m01, m11, m21)
  1426. local z = Vector3.new(m02, m12, m22)
  1427. local p = Vector3.new(sx, sy, sz)
  1428. local lv = (player.Character.Head.CFrame * ay * ax).lookVector
  1429. p = p - lv * camDist
  1430. p = p:Lerp(oldPos, 0.8)
  1431. x = x:Lerp(oldx, 0.8)
  1432. y = y:Lerp(oldy, 0.8)
  1433. z = z:Lerp(oldz, 0.8)
  1434. x = x / x.magnitude
  1435. y = y / y.magnitude
  1436. z = z / z.magnitude
  1437. oldx = x
  1438. oldy = y
  1439. oldz = z
  1440. oldPos = p
  1441. game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(p.x, p.y, p.z, x.x, y.x, z.x,
  1442. x.y, y.y, z.y,
  1443. x.z, y.z, z.z)
  1444. end
  1445. end
  1446.  
  1447. local mPos = Vector2.new()
  1448. local mb2d = false
  1449. m.Button2Down:connect(function ()
  1450. mb2d = true
  1451. mPos = Vector2.new(m.X, m.Y)
  1452. while mb2d do
  1453. camRot = Vector2.new(-((m.Y-mPos.y) / helpergui.AbsoluteSize.y) * math.pi * 1.5, -((m.X-mPos.x) / helpergui.AbsoluteSize.x) * math.pi * 2)
  1454. wait()
  1455. end
  1456. end)
  1457.  
  1458. m.Button2Up:connect(function ()
  1459. camRot = Vector2.new()
  1460. mb2d = false
  1461. end)
  1462.  
  1463. m.WheelForward:connect(function ()
  1464. camDist = math.max(camDist - 1, 3)
  1465. end)
  1466.  
  1467. m.WheelBackward:connect(function ()
  1468. camDist = math.min(camDist + 1, 50)
  1469. end)
  1470.  
  1471. player.Character.Humanoid.Died:connect(function ()
  1472. magiccam = false
  1473. game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
  1474. end)
  1475.  
  1476. runService.RenderStepped:connect(camera)
  1477.  
  1478. game.Workspace.CurrentCamera.CameraType = "Scriptable"
  1479.  
  1480.  
  1481. -- lego This acts as a chat filter. Don't ask why I do it. I just do >.>
  1482. --[[
  1483. Copyrighted (C) Fenrier 2011
  1484. This script is copyrighted for Fenrier. Any use of this script is breaking
  1485. this copyright.
  1486. All Rights Reserved.
  1487. ]]
Add Comment
Please, Sign In to add comment