Advertisement
UltimateGate

BLACK MAGIC - Crystal Warden [2016]

May 8th, 2018
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.58 KB | None | 0 0
  1. Ply = game.Players.LocalPlayer
  2. --FIXED WITH TRIGECTORY's CheatSheet--
  3. cheatsheetplr = game.Players.LocalPlayer
  4. i = Instance.new("NumberValue", cheatsheetplr )
  5. i.Name = "FPSCH"
  6. Bin = Instance.new("HopperBin", cheatsheetplr .Backpack)
  7. script.Parent = Bin
  8. local cf = CFrame.new
  9. local RbxUtility = LoadLibrary("RbxUtility")
  10. local Create = RbxUtility.Create
  11. RW = Create("Weld")({Name = "Right Shoulder", Part0 = Tor, C0 = CFrame.new(1.5, 0.5, 0), C1 = CFrame.new(0, 0.5,
  12.  
  13. 0), Part1 = RA, Parent = Tor})
  14. LW = Create("Weld")({Name = "Left Shoulder", Part0 = Tor, C0 = CFrame.new(-1.5, 0.5, 0), C1 = CFrame.new(0, 0.5,
  15.  
  16. 0), Part1 = LA, Parent = Tor})
  17. --[[NIGHTOWLACE_WEAPONRY]]--
  18. wait(1 / 60)
  19. Effects = { }
  20. local Player = game.Players.localPlayer
  21. local Character = Player.Character
  22. local Humanoid = Character.Humanoid
  23. local mouse = Player:GetMouse()
  24. local m = Instance.new('Model', Character)
  25. m.Name = "WeaponModel"
  26. local LeftArm = Character["Left Arm"]
  27. local RightArm = Character["Right Arm"]
  28. local LeftLeg = Character["Left Leg"]
  29. local RightLeg = Character["Right Leg"]
  30. local Head = Character.Head
  31. local Torso = Character.Torso
  32. local cam = game.Workspace.CurrentCamera
  33. local RootPart = Character.HumanoidRootPart
  34. local RootJoint = RootPart.RootJoint
  35. local equipped = false
  36. local attack = false
  37. local Anim = 'Idle'
  38. local idle = 0
  39. local attacktype = 1
  40. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  41. local velocity = RootPart.Velocity.y
  42. local sine = 0
  43. local change = 1
  44. local grabbed = false
  45. local cn = CFrame.new
  46. local mr = math.rad
  47. local angles = CFrame.Angles
  48. local ud = UDim2.new
  49. local c3 = Color3.new
  50.  
  51. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  52.  
  53. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  54. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  55. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  56.  
  57. function clerp(a, b, t)
  58. return a:lerp(b, t)
  59. end
  60.  
  61. ArtificialHB = Instance.new("BindableEvent", script)
  62. ArtificialHB.Name = "Heartbeat"
  63.  
  64. script:WaitForChild("Heartbeat")
  65.  
  66. frame = 1 / 30
  67. if game.Players.LocalPlayer.FPSCH.Value==true then
  68. frame = 1/60
  69. else
  70. frame=1/30
  71. end
  72. tf = 0
  73. allowframeloss = false
  74. tossremainder = false
  75. lastframe = tick()
  76. script.Heartbeat:Fire()
  77.  
  78. game:GetService("RunService").Heartbeat:connect(function(s, p)
  79. tf = tf + s
  80. if tf >= frame then
  81. if allowframeloss then
  82. script.Heartbeat:Fire()
  83. lastframe = tick()
  84. else
  85. for i = 1, math.floor(tf / frame) do
  86. script.Heartbeat:Fire()
  87. end
  88. lastframe = tick()
  89. end
  90. if tossremainder then
  91. tf = 0
  92. else
  93. tf = tf - frame * math.floor(tf / frame)
  94. end
  95. end
  96. end)
  97.  
  98. function swait(num)
  99. if num == 0 or num == nil then
  100. ArtificialHB.Event:wait()
  101. else
  102. for i = 0, num do
  103. ArtificialHB.Event:wait()
  104. end
  105. end
  106. end
  107.  
  108. local RbxUtility = LoadLibrary("RbxUtility")
  109. local Create = RbxUtility.Create
  110.  
  111. function RemoveOutlines(CreatePart)
  112. CreatePart.TopSurface, CreatePart.BottomSurface, CreatePart.LeftSurface, CreatePart.RightSurface, CreatePart.FrontSurface, CreatePart.BackSurface = 10, 10, 10, 10, 10, 10
  113. end
  114.  
  115. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  116. local Part = Create("Part"){
  117. Reflectance = Reflectance,
  118. Transparency = Transparency,
  119. CanCollide = false,
  120. Locked = true,
  121. BrickColor = BrickColor.new(tostring(BColor)),
  122. Name = Name,
  123. Size = Size,
  124. Material = Material,
  125. Parent = Parent,
  126. }
  127. RemoveOutlines(Part)
  128. return Part
  129. end
  130.  
  131. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  132. local Msh = Create(Mesh){
  133. Parent = Part,
  134. Offset = OffSet,
  135. Scale = Scale,
  136. }
  137. if Mesh == "SpecialMesh" then
  138. Msh.MeshType = MeshType
  139. Msh.MeshId = MeshId
  140. end
  141. return Msh
  142. end
  143.  
  144. function CreateWeld(Parent, Part0, Part1, C0, C1)
  145. local Weld = Create("Weld"){
  146. Parent = Parent,
  147. Part0 = Part0,
  148. Part1 = Part1,
  149. C0 = C0,
  150. C1 = C1,
  151. }
  152. return Weld
  153. end
  154.  
  155. function rayCast(Position, Direction, Range, Ignore)
  156. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  157. end
  158.  
  159. function CreateSound(id, par, vol, pit)
  160. coroutine.resume(coroutine.create(function()
  161. local sou = Instance.new("Sound", par or workspace)
  162. sou.Volume = vol
  163. sou.Pitch = pit or 1
  164. sou.SoundId = id
  165. swait()
  166. sou:play()
  167. game:GetService("Debris"):AddItem(sou, 6)
  168. end))
  169. end
  170.  
  171. local function getclosest(obj, distance)
  172. local last, lastx = distance + 1
  173. for i, v in pairs(workspace:GetChildren()) do
  174. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  175. local t = v.Torso
  176. local dist = (t.Position - obj.Position).magnitude
  177. if dist <= distance then
  178. if dist < last then
  179. last = dist
  180. lastx = v
  181. end
  182. end
  183. end
  184. end
  185. return lastx
  186. end
  187.  
  188. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  189. for i, v in pairs(hit:GetChildren()) do
  190. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  191. local find = v:FindFirstChild("Hitz")
  192. if not find then
  193. if v.Parent:findFirstChild("Head") then
  194. local BillG = Create("BillboardGui"){
  195. Parent = v.Parent.Head,
  196. Size = UDim2.new(1, 0, 1, 0),
  197. Adornee = v.Parent.Head,
  198. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  199. }
  200. local TL = Create("TextLabel"){
  201. Parent = BillG,
  202. Size = UDim2.new(3, 3, 3, 3),
  203. BackgroundTransparency = 1,
  204. Text = tostring(damage).."-",
  205. TextColor3 = Color1.Color,
  206. TextStrokeColor3 = Color2.Color,
  207. TextStrokeTransparency = 0,
  208. TextXAlignment = Enum.TextXAlignment.Center,
  209. TextYAlignment = Enum.TextYAlignment.Center,
  210. FontSize = Enum.FontSize.Size18,
  211. Font = "ArialBold",
  212. }
  213. coroutine.resume(coroutine.create(function()
  214. swait(2)
  215. for i = 0, 1, .1 do
  216. swait(2)
  217. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  218. end
  219. BillG:Destroy()
  220. end))
  221. end
  222. HitHealth=v.Health
  223. v.Health = v.Health - damage
  224.  
  225. if HitHealth~=v.Health and HitHealth~=0 and v.Health<=0 and v.Parent.Name~="Hologram" then
  226. print("gained spree")
  227. Player:FindFirstChild("leaderstats").Spree.Value=Player.leaderstats.Spree.Value+1
  228. end
  229. local bool = Create("BoolValue"){
  230. Parent = v,
  231. Name = 'Hitz',
  232. }
  233. if HSound ~= nil and HPitch ~= nil then
  234. CreateSound(HSound, hit, 1, HPitch)
  235. end
  236. game:GetService("Debris"):AddItem(bool, cooldown)
  237. end
  238. end
  239. end
  240. end
  241.  
  242. function MagnitudeDamage(Part, magni, mindam, maxdam)
  243. for _, c in pairs(workspace:children()) do
  244. local hum = c:findFirstChild("Humanoid")
  245. if hum ~= nil then
  246. local head = c:findFirstChild("Torso")
  247. if head ~= nil then
  248. local targ = head.Position - Part.Position
  249. local mag = targ.magnitude
  250. if mag <= magni and c.Name ~= Player.Name then
  251. Damage(head.Parent, math.random(mindam, maxdam), 0.5, BrickColor.new("Institutional white"), BrickColor.new("Toothpaste"), "", 1)
  252. end
  253. end
  254. end
  255. end
  256. end
  257.  
  258. Handle = CreatePart(m, Enum.Material.SmoothPlastic, 0, 1, "Mid gray", "Handle", Vector3.new(1.01999998, 2.00999999, 1.01999998))
  259. HandleWeld = CreateWeld(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(6.10351563e-005, -0.00500059128, -4.57763672e-005, 1, -9.14604001e-008, 5.96046377e-008, 9.14604001e-008, 1, 5.0481745e-008, -5.96046448e-008, -5.04817379e-008, 1))
  260. Hitbox = CreatePart(m, Enum.Material.SmoothPlastic, 0, 1, "Mid gray", "Hitbox", Vector3.new(1.01999998, 1.00999999, 1.01999998))
  261. Hitboxweld = CreateWeld(m, Handle, Hitbox, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0.499997139, 0, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  262. MagicPrt = CreatePart(m, Enum.Material.Neon, 0, 0.80000001192093, "Toothpaste", "MagicPrt", Vector3.new(0.600000024, 0.400000036, 0.600000024))
  263. MagicPrtweld = CreateWeld(m, Handle, MagicPrt, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.414996862, 0.510009766, 1.52587891e-005, 4.09648088e-015, -1, -7.10542736e-015, -1, -1.0114373e-014, 3.55271368e-015, 3.55271368e-015, 7.10542736e-015, -1))
  264. CreateMesh("SpecialMesh", MagicPrt, Enum.MeshType.Sphere, "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  265. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 0.200000003, 0.620000005))
  266. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.210006714, 0.915004253, -3.05175781e-005, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  267. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 0.610000014, 0.200000003))
  268. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.409973145, 0.0999991894, -0.210037231, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  269. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(1.01999998, 0.200000003, 0.200000003))
  270. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(3.05175781e-005, -0.294996262, -0.410003662, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  271. Part = CreatePart(m, Enum.Material.Neon, 0, 0.69999998807907, "Toothpaste", "Part", Vector3.new(0.400000036, 0.200000003, 0.400000036))
  272. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.414996386, 0.530059814, -1.52587891e-005, 4.09648088e-015, -1, -7.10542736e-015, -1, -1.0114373e-014, 3.55271368e-015, 3.55271368e-015, 7.10542736e-015, -1))
  273. CreateMesh("SpecialMesh", Part, Enum.MeshType.Sphere, "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  274. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 1.20999992, 0.200000003))
  275. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.209976196, 0.410007, -0.410018921, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  276. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.619999945, 0.200000003, 0.200000003))
  277. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199981689, 0.914999247, -0.0100097656, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  278. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(1.01999998, 0.200000003, 0.600000024))
  279. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(3.05175781e-005, -0.294999599, -0.00999450684, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  280. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(1.01999998, 0.200000003, 0.219999969))
  281. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(3.05175781e-005, -0.294999599, 0.399993896, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  282. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.800000012, 0.200000003, 1))
  283. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.404997349, 0.409973145, 1.52587891e-005, 4.09648088e-015, -1, -7.10542736e-015, -1, -1.0114373e-014, 3.55271368e-015, 3.55271368e-015, 7.10542736e-015, -1))
  284. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  285. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Mid gray", "Part", Vector3.new(1.01999998, 0.609999955, 1.01999998))
  286. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.699996233, 0, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  287. Part = CreatePart(m, Enum.Material.Neon, 0, 0.5, "Toothpaste", "Part", Vector3.new(0.25999999, 0.200000003, 0.200000003))
  288. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.612922668, 0.420043945, 0.230499268, -1.0086417e-008, -0.821694076, 0.569928885, -1, 1.33874041e-008, 1.60360258e-009, -8.94753072e-009, -0.569928944, -0.821694136))
  289. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 0.50000006))
  290. Part = CreatePart(m, Enum.Material.Neon, 0, 0.5, "Toothpaste", "Part", Vector3.new(0.25999999, 0.200000003, 0.200000003))
  291. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.80483532, 0.419967651, -0.0164337158, 1.27423683e-009, -0.999788642, -0.0205608252, -1, -1.27442534e-009, -4.51549909e-012, -2.16786589e-011, 0.0205608252, -0.999788582))
  292. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 0.400000095))
  293. Part = CreatePart(m, Enum.Material.Neon, 0, 0.5, "Toothpaste", "Part", Vector3.new(0.25999999, 0.200000003, 0.200000003))
  294. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.802575111, 0.419998169, -0.126342773, 1.27423683e-009, -0.999788642, -0.0205608252, -1, -1.27442534e-009, -4.51549909e-012, -2.16786589e-011, 0.0205608252, -0.999788582))
  295. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 0.400000095))
  296. Part = CreatePart(m, Enum.Material.Neon, 0, 0.5, "Toothpaste", "Part", Vector3.new(0.25999999, 0.200000003, 0.200000003))
  297. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.807302475, 0.419967651, 0.103515625, 1.27423683e-009, -0.999788642, -0.0205608252, -1, -1.27442534e-009, -4.51549909e-012, -2.16786589e-011, 0.0205608252, -0.999788582))
  298. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 0.400000095))
  299. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 0.610000014, 0.200000003))
  300. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.409988403, 0.100003958, 0.189987183, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  301. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Toothpaste", "Part", Vector3.new(0.800000012, 0.200000003, 0.660000026))
  302. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.414997339, 0.420028687, -4.57763672e-005, 4.09648088e-015, -1, -7.10542736e-015, -1, -1.0114373e-014, 3.55271368e-015, 3.55271368e-015, 7.10542736e-015, -1))
  303. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  304. Part = CreatePart(m, Enum.Material.Neon, 0, 0.5, "Toothpaste", "Part", Vector3.new(0.330000043, 0.200000003, 0.400000036))
  305. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.610003471, 0.41998291, 6.10351563e-005, 4.09648088e-015, -1, -7.10542736e-015, -1, -1.0114373e-014, 3.55271368e-015, 3.55271368e-015, 7.10542736e-015, -1))
  306. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  307. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 0.210000008, 0.200000003))
  308. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.409973145, 0.710000515, -0.00997924805, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  309. Part = CreatePart(m, Enum.Material.SmoothPlastic, 0, 0, "Institutional white", "Part", Vector3.new(0.200000003, 1.20999992, 0.200000003))
  310. Partweld = CreateWeld(m, Handle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.209991455, 0.410007, 0.409988403, 1, 3.00894606e-015, -3.55271368e-015, 3.00894606e-015, 1, 0, -3.55271368e-015, 0, 1))
  311.  
  312. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  313. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  314. prt.Anchored = true
  315. prt.CFrame = cframe
  316. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  317. game:GetService("Debris"):AddItem(prt, 10)
  318. if Type == 1 or Type == nil then
  319. table.insert(Effects, {
  320. prt,
  321. "Block1",
  322. delay,
  323. x3,
  324. y3,
  325. z3,
  326. msh
  327. })
  328. elseif Type == 2 then
  329. table.insert(Effects, {
  330. prt,
  331. "Block2",
  332. delay,
  333. x3,
  334. y3,
  335. z3,
  336. msh
  337. })
  338. end
  339. end
  340.  
  341. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  342. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  343. prt.Anchored = true
  344. prt.CFrame = cframe
  345. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  346. game:GetService("Debris"):AddItem(prt, 10)
  347. table.insert(Effects, {
  348. prt,
  349. "Cylinder",
  350. delay,
  351. x3,
  352. y3,
  353. z3,
  354. msh
  355. })
  356. end
  357.  
  358. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  359. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  360. prt.Anchored = true
  361. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  362. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  363. game:GetService("Debris"):AddItem(prt, 10)
  364. table.insert(Effects, {
  365. prt,
  366. "Cylinder",
  367. delay,
  368. x3,
  369. y3,
  370. z3,
  371. msh
  372. })
  373. end
  374.  
  375. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  376. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  377. prt.Anchored = true
  378. prt.CFrame = cframe
  379. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  380. game:GetService("Debris"):AddItem(prt, 10)
  381. table.insert(Effects, {
  382. prt,
  383. "Cylinder",
  384. delay,
  385. x3,
  386. y3,
  387. z3,
  388. msh
  389. })
  390. end
  391.  
  392. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  393. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  394. prt.Anchored = true
  395. prt.CFrame = cframe
  396. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  397. game:GetService("Debris"):AddItem(prt, 10)
  398. table.insert(Effects, {
  399. prt,
  400. "Cylinder",
  401. delay,
  402. x3,
  403. y3,
  404. z3,
  405. msh
  406. })
  407. end
  408.  
  409. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  410. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  411. prt.Anchored = true
  412. prt.CFrame = cframe
  413. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  414. game:GetService("Debris"):AddItem(prt, 10)
  415. table.insert(Effects, {
  416. prt,
  417. "Cylinder",
  418. delay,
  419. x3,
  420. y3,
  421. z3,
  422. msh
  423. })
  424. end
  425.  
  426. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  427. local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  428. prt.Anchored = true
  429. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  430. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  431. local num = math.random(10, 50) / 1000
  432. game:GetService("Debris"):AddItem(prt, 10)
  433. table.insert(Effects, {
  434. prt,
  435. "Shatter",
  436. num,
  437. prt.CFrame,
  438. math.random() - math.random(),
  439. 0,
  440. math.random(50, 100) / 100
  441. })
  442. end
  443.  
  444. RSH = Torso["Right Shoulder"]
  445. LSH = Torso["Left Shoulder"]
  446. RH = Torso["Right Hip"]
  447. LH = Torso["Left Hip"]
  448. Animate = Character.Animate
  449. Animator = Humanoid.Animator
  450.  
  451. function Equip()
  452. attack = true
  453. equipped = true
  454. RSH.Parent = nil
  455. LSH.Parent = nil
  456. Animator.Parent = nil
  457. Animate.Disabled = true
  458. RW = Create("Weld"){
  459. Name = "Right Shoulder",
  460. Part0 = Torso ,
  461. C0 = CFrame.new(1.5, 0.5, 0),
  462. C1 = CFrame.new(0, 0.5, 0),
  463. Part1 = RightArm ,
  464. Parent = Torso ,
  465. }
  466. LW = Create("Weld"){
  467. Name = "Left Shoulder",
  468. Part0 = Torso ,
  469. C0 = CFrame.new(-1.5, 0.5, 0),
  470. C1 = CFrame.new(0, 0.5, 0) ,
  471. Part1 = LeftArm ,
  472. Parent = Torso ,
  473. }
  474. attack = false
  475. end
  476.  
  477. function Unequip()
  478. attack = true
  479. for i = 0, 1, 0.1 do
  480. swait()
  481. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  482. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  483. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  484. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  485. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  486. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  487. end
  488. equipped = false
  489. RW.Parent = nil
  490. LW.Parent = nil
  491. RSH.Parent = Torso
  492. LSH.Parent = Torso
  493. Torso.Neck.C0 = NeckCF
  494. RootJoint.C0 = RootCF
  495. Animator.Parent = Humanoid
  496. Animate.Disabled = false
  497. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  498. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  499. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  500. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  501. attack = false
  502. end
  503.  
  504. local Crystals = {}
  505. local CrystalNumb = 0
  506. local crystalhold = false
  507. function MakeCrystals()
  508. attack = true
  509. Humanoid.WalkSpeed = 6
  510. for i = 0, 1, 0.1 do
  511. swait()
  512. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
  513. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(-50)), .3)
  514. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -.5) * angles(math.rad(0), math.rad(120), math.rad(90)), .3)
  515. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), .3)
  516. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  517. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  518. end
  519. for i = 0, 1, 0.1 do
  520. swait()
  521. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(60)), .3)
  522. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-50)), .3)
  523. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(60), math.rad(90)), .3)
  524. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-10)), .3)
  525. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(-30), math.rad(0)), .3)
  526. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(-30), math.rad(0)), .3)
  527. end
  528. while crystalhold == true do
  529. if CrystalNumb < 8 then
  530. SphereEffect(MagicPrt.BrickColor, MagicPrt.CFrame, .1, .1, .1, .5, .5, .5, .05)
  531. CreateSound("http://www.roblox.com/asset/?id=306247678", Torso, 1, 1.3)
  532. CrystalNumb = CrystalNumb + 1
  533. print(CrystalNumb)
  534. local base = CreatePart(m, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "Part1", Vector3.new(1, 1, 1))
  535. base.Anchored = true
  536. base.CFrame = MagicPrt.CFrame
  537. local crystall = CreatePart(base, "SmoothPlastic", 0.4, 0.3, MagicPrt.BrickColor, "Crystal", Vector3.new(2, 2, 2))
  538. local msh = CreateMesh("SpecialMesh", crystall, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(2, 2, 2))
  539. crystall.Anchored = false
  540. crystall.CFrame = base.CFrame
  541. table.insert(Crystals, crystall)
  542. end
  543. wait(0.5)
  544. end
  545. Humanoid.WalkSpeed = 16
  546. attack = false
  547. end
  548.  
  549. function attackone()
  550. attack = true
  551. hitted = false
  552. local randomnumb = math.random(1, #Crystals)
  553. local item = Crystals[randomnumb]
  554. item.CFrame = LeftArm.CFrame
  555. CrystalNumb = CrystalNumb - 1
  556. table.remove(Crystals, randomnumb)
  557. Cryst = item
  558. for i = 0, 1, 0.1 do
  559. swait()
  560. item.CFrame = clerp(item.CFrame, RootPart.CFrame * CFrame.new(10, 0, -2), .1)
  561. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .3)
  562. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(50)), .3)
  563. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(0), math.rad(20), math.rad(90)), .3)
  564. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), .3)
  565. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  566. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  567. end
  568. CreateSound("http://roblox.com/asset/?id=320557413", RightArm, 1, 1)
  569. local con1 = Cryst.Touched:connect(function(hit)
  570. MagnitudeDamage(Cryst, 4, 5, 15)
  571. if hit ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  572. CreateSound("http://www.roblox.com/asset/?id=12222005", Torso, 1, 1.5)
  573. Cryst.Parent = nil
  574. hitted = true
  575. for i = 1, math.random(4, 8) do
  576. local brokecryst = CreatePart(workspace, "SmoothPlastic", 0.4, 0.5, Cryst.BrickColor, "Crystal", Vector3.new(1, 1, 1))
  577. local mshh = CreateMesh("SpecialMesh", brokecryst, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(math.random() - math.random(), math.random() + math.random(0, 1), math.random() - math.random()))
  578. brokecryst.CanCollide = false
  579. brokecryst.CFrame = Cryst.CFrame * cn(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  580. brokecryst.Velocity = Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40))
  581. game:GetService("Debris"):AddItem(brokecryst, 4)
  582. end
  583. end
  584. end)
  585. for i = 0, 1, 0.1 do
  586. swait()
  587. item.CFrame = clerp(item.CFrame, RootPart.CFrame * CFrame.new(-5, 0, -5), .1)
  588. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.1) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
  589. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(-50)), .3)
  590. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -.5) * angles(math.rad(0), math.rad(120), math.rad(90)), .3)
  591. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), .3)
  592. RH.C0 = clerp(RH.C0, cn(1, -.8, 0) * RHCF * angles(math.rad(-3), math.rad(-30), math.rad(0)), .3)
  593. LH.C0 = clerp(LH.C0, cn(-1, -.8, 0) * LHCF * angles(math.rad(-10), math.rad(-30), math.rad(0)), .3)
  594. end
  595. con1:disconnect()
  596. if hitted == true then
  597. item.Parent = nil
  598. elseif hitted == false then
  599. CrystalNumb = CrystalNumb + 1
  600. table.insert(Crystals, item)
  601. end
  602. attack = false
  603. end
  604.  
  605. function ShardWave()
  606. attack = true
  607. Humanoid.WalkSpeed = 0
  608. for i = 0, 1, 0.05 do
  609. swait()
  610. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.7) * angles(math.rad(30), math.rad(0), math.rad(-30)), .2)
  611. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-20), math.rad(0), math.rad(30)), .2)
  612. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(-60), math.rad(30)), .2)
  613. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-30)), .2)
  614. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-3), math.rad(30), math.rad(-10)), .2)
  615. LH.C0 = clerp(LH.C0, cn(-1, -.3, 0) * LHCF * angles(math.rad(-10), math.rad(30), math.rad(-30)), .2)
  616. end
  617. local MainCF = RootPart.CFrame * CFrame.new(0, -3, -1)
  618. for i = 1, 10 do
  619. MainCF = MainCF * CFrame.new(0, 0, -2)
  620. local CrystDerp = CreatePart(workspace, "SmoothPlastic", 0.4, 0.5, MagicPrt.BrickColor, "Crystal", Vector3.new(5, 5, 5))
  621. local mshh = CreateMesh("SpecialMesh", CrystDerp, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(1 + math.random(), math.random(3, 8) + math.random(), 1 + math.random()))
  622. CrystDerp.CFrame = MainCF * CFrame.new(math.random(-5, 5), math.random(-20, -15), math.random(-5, 5))
  623. CrystDerp.Anchored = true
  624. game:GetService("Debris"):AddItem(CrystDerp, 4)
  625. coroutine.resume(coroutine.create(function(Part)
  626. for i = 1, 10 do
  627. swait(1.5)
  628. Part.CFrame = Part.CFrame * CFrame.new(0, 2, 0)
  629. end
  630. wait(.5)
  631. MagnitudeDamage(CrystDerp, 15, 15, 25)
  632. CreateSound("http://www.roblox.com/asset/?id=12222005", Part, 1, 1.5)
  633. for i = 1, math.random(2, 6) do
  634. local brokecryst = CreatePart(workspace, "SmoothPlastic", 0.4, 0.5, MagicPrt.BrickColor, "Crystal", Vector3.new(1, 1, 1))
  635. local mshh = CreateMesh("SpecialMesh", brokecryst, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(math.random() - math.random(), math.random() + math.random(0, 1), math.random() - math.random()))
  636. brokecryst.CanCollide = false
  637. brokecryst.CFrame = Part.CFrame * CFrame.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  638. brokecryst.Velocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  639. game:GetService("Debris"):AddItem(brokecryst, 4)
  640. end
  641. Part.Transparency = 1
  642. end), CrystDerp)
  643. end
  644. SphereEffect(MagicPrt.BrickColor, MagicPrt.CFrame, .1, .1, .1, .5, .5, .5, .05)
  645. for i = 0, 1, 0.03 do
  646. swait()
  647. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .15)
  648. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(0)), .15)
  649. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -.5) * angles(math.rad(0), math.rad(-90), math.rad(-120)), .15)
  650. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-10)), .15)
  651. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .15)
  652. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .15)
  653. end
  654. SphereEffect(MagicPrt.BrickColor, MagicPrt.CFrame, .1, .1, .1, .5, .5, .5, .05)
  655. for i = 0, 1, 0.05 do
  656. swait()
  657. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .15)
  658. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .15)
  659. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.7, -.2) * angles(math.rad(0), math.rad(-80), math.rad(-150)), .15)
  660. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50), math.rad(0), math.rad(-20)), .15)
  661. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .15)
  662. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .15)
  663. end
  664. Humanoid.WalkSpeed = 16
  665. attack = false
  666. end
  667.  
  668. function Shatter()
  669. attack = true
  670. Humanoid.WalkSpeed = 4
  671. for i = 0, 1, 0.05 do
  672. swait()
  673. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  674. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(-50)), .2)
  675. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -.5) * angles(math.rad(0), math.rad(130), math.rad(90)), .2)
  676. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-10)), .2)
  677. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .2)
  678. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .2)
  679. end
  680. for i = 0, 1, 0.05 do
  681. swait()
  682. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  683. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  684. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  685. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), .3)
  686. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  687. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  688. end
  689. for e = 1, #Crystals do
  690. CreateSound("http://www.roblox.com/asset/?id=12222005", Torso, 1, 1.5)
  691. CrystalNumb = CrystalNumb - 1
  692. Crystals[e].Parent = nil
  693. for i = 1, math.random(4, 10) do
  694. local brokecryst = CreatePart(workspace, "SmoothPlastic", 0.4, 0.5, MagicPrt.BrickColor, "Crystal", Vector3.new(1, 1, 1))
  695. local mshh = CreateMesh("SpecialMesh", brokecryst, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(math.random() - math.random(), math.random() + math.random(0, 1), math.random() - math.random()))
  696. brokecryst.CanCollide = false
  697. brokecryst.CFrame = Crystals[e].CFrame * CFrame.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  698. brokecryst.Velocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  699. game:GetService("Debris"):AddItem(brokecryst, 4)
  700. end
  701. end
  702. MagnitudeDamage(Torso, 25, 15, 17)
  703. for i = 1, 10 do
  704. print("nou")
  705. for e = 1, #Crystals do
  706. print(#Crystals)
  707. table.remove(Crystals, e)
  708. end
  709. end
  710. CrystalNumb = 0
  711. Humanoid.WalkSpeed = 16
  712. attack = false
  713. end
  714.  
  715. function SummonShards()
  716. attack = true
  717. Humanoid.WalkSpeed = 5
  718. for i = 0, 1, 0.05 do
  719. swait()
  720. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  721. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-90)), .3)
  722. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  723. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), .3)
  724. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  725. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  726. end
  727. for i = 1, 5 do
  728. local Shard = CreatePart(m, "Neon", 0, 0.5, MagicPrt.BrickColor, "Shard", Vector3.new(5, 5, 5))
  729. Shard.CanCollide = true
  730. local smsh = CreateMesh("SpecialMesh", Shard, "FileMesh", "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(.5, .5, 3))
  731. Shard.Anchored = true
  732. local newCF = CFrame.new(math.random(-600, 600) / 100, math.random(500, 1000) / 100, math.random(-600, 600) / 100)
  733. Shard.CFrame = CFrame.new(RootPart.Position) * newCF
  734. Shard.CFrame = CFrame.new(Shard.Position, mouse.Hit.p) * CFrame.fromEulerAnglesXYZ(3.14, 0, 0)
  735. SphereEffect(MagicPrt.BrickColor, Shard.CFrame, 5, 5, 10, 1, 1, 3, .5)
  736. CreateSound("http://roblox.com/asset/?id=278596476", Shard, 1, 1.5)
  737. game:GetService("Debris"):AddItem(Shard, 10)
  738. local hitt = false
  739. local con = Shard.Touched:connect(function(hit)
  740. hitt = true
  741. if hit.Name ~= "Shard" then
  742. Shard.Parent = nil
  743. print("hit")
  744. local ref = CreatePart(workspace, "Neon", 0, 1, BrickColor.new("Toothpaste"), "Effect", Vector3.new())
  745. ref.Anchored = true
  746. ref.CFrame = CFrame.new(Shard.Position)
  747. game:GetService("Debris"):AddItem(ref, 1)
  748. for i = 1, math.random(4, 10) do
  749. local brokecryst = CreatePart(workspace, "SmoothPlastic", 0.4, 0.5, MagicPrt.BrickColor, "Crystal", Vector3.new(1, 1, 1))
  750. local mshh = CreateMesh("SpecialMesh", brokecryst, "FileMesh", "http://www.roblox.com/asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(math.random() - math.random(), math.random() + math.random(0, 1), math.random() - math.random()))
  751. brokecryst.CanCollide = false
  752. brokecryst.CFrame = ref.CFrame * CFrame.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  753. brokecryst.Velocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  754. game:GetService("Debris"):AddItem(brokecryst, 4)
  755. end
  756. CreateSound("http://www.roblox.com/asset/?id=12222005", ref, 1, 1.5)
  757. MagnitudeDamage(Shard, 5, 15, 17)
  758. end
  759. end)
  760. coroutine.resume(coroutine.create(function(Part, Cframe, numb)
  761. while Part.Parent ~= nil do
  762. wait()
  763. numb = numb - 1
  764. if numb <= 0 then
  765. Part.CFrame = Part.CFrame * CFrame.new(0, 0, 5)
  766. else
  767. Part.CFrame = CFrame.new(RootPart.Position) * Cframe
  768. Part.CFrame = CFrame.new(Part.Position, mouse.Hit.p) * CFrame.fromEulerAnglesXYZ(3.14, 0, 0)
  769. end
  770. end
  771. end), Shard, newCF, i)
  772. end
  773. wait(.5)
  774. Humanoid.WalkSpeed = 16
  775. attack = false
  776. end
  777.  
  778. function ob1u()
  779.  
  780. end
  781.  
  782. function ob1d()
  783. if attack == true and equipped == true or CrystalNumb == 0 then
  784. return
  785. end
  786. attackone()
  787. end
  788.  
  789. function key(k)
  790. k = k:lower()
  791. if attack == false and equipped == false and k == 'f' then
  792. Equip()
  793. elseif attack == false and equipped == true and k == 'f' then
  794. Unequip()
  795. elseif attack == false and equipped == true and k == 'v' then
  796. crystalhold = true
  797. MakeCrystals()
  798. elseif attack == false and equipped == true and k == 'c' then
  799. ShardWave()
  800. elseif attack == false and equipped == true and k == 'x' and CrystalNumb >= 1 then
  801. Shatter()
  802. elseif attack == false and equipped == true and k == 'z' then
  803. SummonShards()
  804. end
  805. end
  806.  
  807. function keyup(k)
  808. if attack == true and equipped == true and k == 'v' and crystalhold == true then
  809. crystalhold = false
  810. end
  811. end
  812.  
  813. Bin=script.Parent
  814.  
  815. function ds(mouse)
  816. end
  817.  
  818. function s(mouse)
  819. print("Selected")
  820. mouse.Button1Down:connect(function() ob1d(mouse) end)
  821. mouse.Button1Up:connect(function() ob1u(mouse) end)
  822. mouse.KeyDown:connect(key)
  823. mouse.KeyUp:connect(keyup)
  824. end
  825.  
  826. Bin.Selected:connect(s)
  827. Bin.Deselected:connect(ds)
  828.  
  829. numbb = 0
  830. datnumb = 0
  831.  
  832. local walk = 0
  833.  
  834. local walkforw = false
  835.  
  836. while true do
  837. swait()
  838. for i, v in pairs(Character:GetChildren()) do
  839. if v:IsA("Part") then
  840. v.Material = "SmoothPlastic"
  841. elseif v:IsA("Hat") then
  842. v:WaitForChild("Handle").Material = "SmoothPlastic"
  843. end
  844. end
  845. walk = walk + .55
  846. if walk >= 15 - (5 * (Humanoid.WalkSpeed / 16)) then
  847. walk = 0
  848. if walkforw == true then
  849. walkforw = false
  850. elseif walkforw == false then
  851. walkforw = true
  852. end
  853. end
  854. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  855. velocity = RootPart.Velocity.y
  856. sine = sine + change
  857. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  858. if equipped == true then
  859. if RootPart.Velocity.y > 1 and hit == nil then
  860. Anim = "Jump"
  861. if attack == false then
  862. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  863. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(0)), .2)
  864. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20)), .2)
  865. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), .2)
  866. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(-20)), .2)
  867. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(20)), .2)
  868. end
  869. elseif RootPart.Velocity.y < -1 and hit == nil then
  870. Anim = "Fall"
  871. if attack == false then
  872. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  873. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), .2)
  874. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), .2)
  875. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-30)), .2)
  876. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-3), math.rad(0), math.rad(-10)), .2)
  877. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(10)), .2)
  878. end
  879. elseif Torsovelocity < 1 and hit ~= nil then
  880. Anim = "Idle"
  881. if attack == false then
  882. change = 1
  883. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.1 + .1 * math.sin(sine / 27)) * angles(math.rad(0), math.rad(0), math.rad(-30)), .2)
  884. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 + 3 * math.sin(sine / 26)), math.rad(0), math.rad(30)), .2)
  885. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(-30), math.rad(20 + 3 * math.sin(sine / 26))), .2)
  886. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10 + 3 * math.sin(sine / 26)), math.rad(0), math.rad(-5 - 2 * math.sin(sine / 26))), .2)
  887. RH.C0 = clerp(RH.C0, cn(1, -.9 - .1 * math.sin(sine / 27), 0) * RHCF * angles(math.rad(-3 + 1 * math.sin(sine / 27)), math.rad(10), math.rad(0)), .2)
  888. LH.C0 = clerp(LH.C0, cn(-1, -.9 - .1 * math.sin(sine / 27), 0) * LHCF * angles(math.rad(-3 + 1 * math.sin(sine / 27)), math.rad(10), math.rad(0)), .2)
  889. end
  890. elseif Torsovelocity > 2 and hit ~= nil then
  891. Anim = "Walk"
  892. if attack == false then
  893. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10 + 3 * math.sin(sine / 25)), math.rad(0), math.rad(0)), .2)
  894. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5 - 3 * math.sin(sine / 25)), math.rad(0), math.rad(0)), .2)
  895. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(70), math.rad(-40), math.rad(40 + 3 * math.sin(sine / 26))), .2)
  896. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(-5 + 3 * math.sin(sine / 20))), .2)
  897. if walkforw == true then
  898. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(60)), .1)
  899. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(60)), .1)
  900. else
  901. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-3), math.rad(0), math.rad(-60)), .1)
  902. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(-60)), .12)
  903. end
  904. end
  905. end
  906. end
  907. if #Effects > 0 then
  908. for e = 1, #Effects do
  909. if Effects[e] ~= nil then
  910. local Thing = Effects[e]
  911. if Thing ~= nil then
  912. local Part = Thing[1]
  913. local Mode = Thing[2]
  914. local Delay = Thing[3]
  915. local IncX = Thing[4]
  916. local IncY = Thing[5]
  917. local IncZ = Thing[6]
  918. if Thing[1].Transparency <= 1 then
  919. if Thing[2] == "Block1" then
  920. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  921. Mesh = Thing[1].Mesh
  922. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  923. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  924. elseif Thing[2] == "Block2" then
  925. Thing[1].CFrame = Thing[1].CFrame
  926. Mesh = Thing[7]
  927. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  928. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  929. elseif Thing[2] == "Cylinder" then
  930. Mesh = Thing[1].Mesh
  931. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  932. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  933. elseif Thing[2] == "Blood" then
  934. Mesh = Thing[7]
  935. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  936. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  937. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  938. elseif Thing[2] == "Elec" then
  939. Mesh = Thing[1].Mesh
  940. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  941. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  942. elseif Thing[2] == "Disappear" then
  943. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  944. elseif Thing[2] == "Shatter" then
  945. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  946. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  947. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  948. Thing[6] = Thing[6] + Thing[5]
  949. end
  950. else
  951. Part.Parent = nil
  952. table.remove(Effects, e)
  953. end
  954. end
  955. end
  956. end
  957. end
  958. datnumb = 0
  959. BaseNumb = 6.28
  960. BaseNumb = BaseNumb / CrystalNumb
  961. for d, Crystal in pairs (Crystals) do
  962. datnumb = datnumb + BaseNumb
  963. Crystal.Anchored = true
  964. if Crystal.ClassName == "Part" then
  965. if #Crystals ~= 0 then
  966. Crystal.CFrame = Crystal.CFrame:lerp(CFrame.new(RootPart.Position) * CFrame.Angles(0, math.rad(360) / #Crystals * d, 0) * CFrame.new(0, 0, 5 + #Crystals / 3), .1)
  967. numbb = numbb + 0.05
  968. end
  969. end
  970. end
  971. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement