Advertisement
memberhero

Crystal Warden FE

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