SHOW:
|
|
- or go back to the newest paste.
1 | --[[ MADE BY Thunderx10/TLua ]] | |
2 | --[[ Double tap W to dash ]] | |
3 | --[[ Q and E to swap spells]] | |
4 | --[[ UPDATE LOG/IDEAS ]---------------------------------------------------------- | |
5 | +Added Void Crush | |
6 | ||
7 | *Maybe add sparkles to fireworks (a trail of some kind) | |
8 | +Maybe add a puff of smoke to fireworks, from the wand at least | |
9 | *SPELL IDEAS: | |
10 | +Stop playing from moving and create a bubble of particles that shoots forward. Use the projectile system? | |
11 | +Add a way to lift up players? | |
12 | +Invisibility spell, leaves footprints or use the Trail script? | |
13 | +Healing spell, shoots a green projectile straight up, rains, each drop heals | |
14 | ++holding down bubbble spell, low damage, large knock back away from player, slowly float up (short range) | |
15 | +teleport opens hole beneath player, opens it above another location | |
16 | +++Chain someone to the floor with the new rope/spring stuff. put selection box on torso, use the connected line/wire to a glowing ball. for 3 sec | |
17 | +Maybe too hard, copy player, rotate but make it do same motions as player, will make it hard to tell which is the real, others fade/take damage to die | |
18 | --]] | |
19 | --[[ | |
20 | if script.ClassName == "LocalScript" then --advanced stuff I stole from aerx :) | |
21 | if game.PlaceId == 178350907 then | |
22 | script.Parent = nil | |
23 | else | |
24 | local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call) | |
25 | local oxbox = getfenv() setfenv(1, setmetatable({}, {__index = Environment})) | |
26 | Environment.coroutine.yield() | |
27 | oxbox.script:Destroy() | |
28 | end | |
29 | end | |
30 | --]] | |
31 | ----CUSTOMIZATION | |
32 | ||
33 | local MainColor = "Institutional white" | |
34 | local CharacterSpeed = 20 --16 is default | |
35 | local MaxMana = 100 | |
36 | local fireworkSounds = { | |
37 | "rbxassetid://160248280", | |
38 | "rbxassetid://160248302", | |
39 | "rbxassetid://269146157" | |
40 | } | |
41 | local magicSounds = { | |
42 | "rbxassetid://260433768", | |
43 | "rbxassetid://260433746", | |
44 | "rbxassetid://260433721", | |
45 | "rbxassetid://182765513", | |
46 | } | |
47 | local Rainbow = { --This is the main color set. Try to use more than just a few, make it fade in order as well | |
48 | - | "Crimson", |
48 | + | "Really black", |
49 | - | "Bright red", |
49 | + | "Really black", |
50 | - | "Neon orange", |
50 | + | "Really black", |
51 | - | "Deep orange", |
51 | + | "Really black", |
52 | - | "Bright yellow", |
52 | + | "Really black", |
53 | - | "New Yeller", |
53 | + | "Really black", |
54 | - | "Br. yellowish green", |
54 | + | "Br. Really black", |
55 | - | "Lime green", |
55 | + | "Really black", |
56 | - | "Sea green", |
56 | + | "Really black", |
57 | - | "Bright bluish green", |
57 | + | "Really black", |
58 | - | "Bright blue", |
58 | + | "Really black", |
59 | - | "Lavender", |
59 | + | "Really black", |
60 | - | "Royal purple", |
60 | + | "Really black", |
61 | - | "Eggplant", |
61 | + | "Really black", |
62 | - | "Hot pink" |
62 | + | "Really black" |
63 | } | |
64 | ||
65 | ||
66 | --Script starting | |
67 | local spells = {} | |
68 | ||
69 | function addSpell(nm,manac,colorz) | |
70 | table.insert(spells, { ["Name"] = nm, ["ManaCost"] = manac, ["Color"] = BrickColor.new(colorz)}) | |
71 | end | |
72 | ||
73 | - | addSpell("nigga", 69, "Brown") |
73 | + | |
74 | - | addSpell("nigga", 69, "Brown") |
74 | + | |
75 | - | addSpell("nigga", 69, "Brown") |
75 | + | |
76 | - | addSpell("nigga", 69, "Brown") |
76 | + | |
77 | addSpell("Teleport", 10, "Neon orange") | |
78 | addSpell("Stealth", 20, "Industrial white") | |
79 | ||
80 | local player = game:GetService("Players").LocalPlayer | |
81 | local me = player | |
82 | repeat wait() until player.Character ~= nil | |
83 | - | addSpell("nigga", 69, "Brown") |
83 | + | |
84 | - | addSpell("nigga", 69, "Brown") |
84 | + | |
85 | - | addSpell("nigga", 69, "Brown") |
85 | + | |
86 | - | addSpell("nigga", 69, "Brown") |
86 | + | |
87 | local Backpack = player.Backpack | |
88 | local PlayerGui = player.PlayerGui | |
89 | local Camera = workspace.CurrentCamera | |
90 | local Humanoid = char:WaitForChild("Humanoid") | |
91 | local torso = char:WaitForChild("Torso") | |
92 | local head = char:WaitForChild("Head") | |
93 | local rightArm = char:WaitForChild("Right Arm") | |
94 | local leftArm = char:WaitForChild("Left Arm") | |
95 | local rightLeg = char:WaitForChild("Right Leg") | |
96 | local leftLeg = char:WaitForChild("Left Leg") | |
97 | local rightShoulder = torso:WaitForChild("Right Shoulder") | |
98 | local leftShoulder = torso:WaitForChild("Left Shoulder") | |
99 | local rightHip = torso:WaitForChild("Right Hip") | |
100 | local leftHip = torso:WaitForChild("Left Hip") | |
101 | local neck = torso:WaitForChild("Neck") | |
102 | local rootpart = char:WaitForChild("HumanoidRootPart") | |
103 | local rj = rootpart:WaitForChild("RootJoint") | |
104 | local anim = char:WaitForChild("Animate") | |
105 | local TSTable = {} | |
106 | local SpinTable = {} | |
107 | ||
108 | local components = CFrame.new().components | |
109 | rightArm.CanCollide = false | |
110 | leftArm.CanCollide = false | |
111 | rightLeg.CanCollide = false | |
112 | leftLeg.CanCollide = false | |
113 | camera = workspace.CurrentCamera | |
114 | player.CameraMaxZoomDistance = math.huge | |
115 | pcall(function() | |
116 | if anim then anim:remove() | |
117 | for i,v in pairs(Humanoid:GetPlayingAnimationTracks()) do | |
118 | v:Stop() | |
119 | end | |
120 | end | |
121 | end) | |
122 | pcall(function() | |
123 | char["Health"].Disabled = true | |
124 | end) | |
125 | pcall(function() | |
126 | humanoid.Animator:Destroy() | |
127 | end) | |
128 | local rjo = rootpart.RootJoint:Clone() | |
129 | function createWeld(wp0, wp1, wc0x, wc0y, wc0z) | |
130 | local weld = Instance.new("Weld", wp1) | |
131 | weld.Part0 = wp0 | |
132 | weld.Part1 = wp1 | |
133 | weld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
134 | return weld | |
135 | end | |
136 | ||
137 | local leftArmJoint = createWeld(torso, leftArm, -1.5, 0.5, 0) | |
138 | leftArmJoint.C1 = CFrame.new(0, 0.5, 0) | |
139 | local rightArmJoint = createWeld(torso, rightArm, 1.5, 0.5, 0) | |
140 | rightArmJoint.C1 = CFrame.new(0, 0.5, 0) | |
141 | local neck = createWeld(torso, head, 0, 1, 0) | |
142 | local leftLegJoint = createWeld(torso, leftLeg, -0.5, -1, 0) | |
143 | leftLegJoint.C1 = CFrame.new(0, 1, 0) | |
144 | local rightLegJoint = createWeld(torso, rightLeg, 0.5, -1, 0) | |
145 | rightLegJoint.C1 = CFrame.new(0, 1, 0) | |
146 | local rj = rjo:Clone() | |
147 | rj.Part0 = rootpart | |
148 | rj.Part1 = torso | |
149 | rj.Parent = rootpart | |
150 | neck.C1 = CFrame.new(0, -(1/2), 0) | |
151 | neckc0 = neck.C0 | |
152 | lsc0 = leftArmJoint.C0 | |
153 | rsc0 = rightArmJoint.C0 | |
154 | llc0 = leftLegJoint.C0 | |
155 | rlc0 = rightLegJoint.C0 | |
156 | rootc0 = rj.C0 | |
157 | rootc1 = rj.C1 | |
158 | wait() | |
159 | ||
160 | local pressingW = false | |
161 | local inAction = false | |
162 | char.Humanoid.WalkSpeed = CharacterSpeed | |
163 | local beenHit = {} | |
164 | local jumpPower = 50 | |
165 | --Humanoid.JumpPower = 80 | |
166 | ||
167 | ||
168 | --GUI | |
169 | ||
170 | local x10Wand = Instance.new("ScreenGui") | |
171 | local SelectorBox = Instance.new("ImageLabel") | |
172 | ||
173 | x10Wand.Name = "x10Wand" | |
174 | x10Wand.Parent = me.PlayerGui | |
175 | ||
176 | SelectorBox.Name = "SelectorBox" | |
177 | SelectorBox.Parent = x10Wand | |
178 | SelectorBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
179 | SelectorBox.BackgroundTransparency = 1 | |
180 | SelectorBox.Position = UDim2.new(0.5, -50, 1, -100) | |
181 | SelectorBox.Size = UDim2.new(0, 100, 0, 50) | |
182 | SelectorBox.ZIndex = 10 | |
183 | SelectorBox.Image = "rbxassetid://129944699" | |
184 | SelectorBox.ImageColor3 = Color3.new(1, 0, 0) | |
185 | SelectorBox.ScaleType = Enum.ScaleType.Slice | |
186 | SelectorBox.SliceCenter = Rect.new(0, 10, 0, 195) | |
187 | ||
188 | currentSpell = { ["Name"] = spells[(math.floor(#spells/2)+1)].Name, ["ManaCost"] = spells[(math.floor(#spells/2)+1)].ManaCost } | |
189 | function loadSpellGui() | |
190 | currentSpell = { ["Name"] = spells[(math.floor(#spells/2)+1)].Name, ["ManaCost"] = spells[(math.floor(#spells/2)+1)].ManaCost } | |
191 | print(currentSpell.Name, currentSpell.ManaCost) | |
192 | for i,v in pairs(SelectorBox:GetChildren()) do | |
193 | v:Remove() | |
194 | end | |
195 | local spellPos = -100*(math.floor(#spells/2)) | |
196 | for i,v in pairs(spells) do | |
197 | local Spell = Instance.new("TextLabel") | |
198 | Spell.Name = "Spell" | |
199 | Spell.Parent = SelectorBox | |
200 | Spell.BackgroundColor3 = v.Color.Color | |
201 | Spell.BackgroundTransparency = math.abs(((math.floor(#spells/2)+1)-i))*0.2 | |
202 | if math.abs(((math.floor(#spells/2)+1)-i)) == 1 then | |
203 | Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*9) | |
204 | elseif math.abs(((math.floor(#spells/2)+1)-i)) == 2 then | |
205 | Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*14) | |
206 | elseif math.abs(((math.floor(#spells/2)+1)-i)) == 3 then | |
207 | Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*17) | |
208 | else | |
209 | Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*24) | |
210 | end | |
211 | if ((math.floor(#spells/2)+1)-i) < 0 then | |
212 | Spell.Rotation = math.abs(((math.floor(#spells/2)+1)-i))*3 | |
213 | else | |
214 | Spell.Rotation = -math.abs(((math.floor(#spells/2)+1)-i))*3 | |
215 | end | |
216 | Spell.BorderSizePixel = 3 | |
217 | Spell.Size = UDim2.new(0, 100, 0, 50) | |
218 | Spell.Font = Enum.Font.Code | |
219 | Spell.FontSize = Enum.FontSize.Size14 | |
220 | Spell.Text = v.Name | |
221 | Spell.ZIndex = (9-(math.abs(((math.floor(#spells/2)+1)-i)))) | |
222 | Spell.TextColor3 = Color3.new(0, 0, 0) | |
223 | Spell.TextWrapped = true | |
224 | ||
225 | local ManaCost = Instance.new("TextLabel") | |
226 | ManaCost.Name = "ManaCost" | |
227 | ManaCost.Parent = Spell | |
228 | ManaCost.BackgroundColor3 = Color3.new(1, 1, 1) | |
229 | ManaCost.BackgroundTransparency = 1 | |
230 | ManaCost.Size = UDim2.new(0, 100, 0, 50) | |
231 | ManaCost.Font = Enum.Font.Code | |
232 | ManaCost.ZIndex = 10000 | |
233 | ManaCost.FontSize = Enum.FontSize.Size14 | |
234 | ManaCost.Text = v.ManaCost | |
235 | ManaCost.TextColor3 = Color3.new(0.15, 0, 1) | |
236 | ManaCost.TextYAlignment = Enum.TextYAlignment.Bottom | |
237 | if Spell.Transparency >= 1 then | |
238 | Spell.Visible = false | |
239 | else | |
240 | Spell.Visible = true | |
241 | end | |
242 | ||
243 | spellPos = spellPos + 100 | |
244 | end | |
245 | end | |
246 | loadSpellGui() | |
247 | ||
248 | local Q = Instance.new("TextLabel") | |
249 | Q.Name = "Q" | |
250 | Q.Parent = x10Wand | |
251 | Q.BackgroundColor3 = Color3.new(1, 1, 1) | |
252 | Q.BackgroundTransparency = 1 | |
253 | Q.Position = UDim2.new(0.5, -350, 1, -100) | |
254 | Q.Size = UDim2.new(0, 100, 0, 50) | |
255 | Q.Font = Enum.Font.Cartoon | |
256 | Q.FontSize = Enum.FontSize.Size42 | |
257 | Q.Text = "Q" | |
258 | Q.TextColor3 = Color3.new(1, 1, 1) | |
259 | Q.TextStrokeTransparency = 0 | |
260 | ||
261 | local E = Instance.new("TextLabel") | |
262 | E.Name = "E" | |
263 | E.Parent = x10Wand | |
264 | E.BackgroundColor3 = Color3.new(1, 1, 1) | |
265 | E.BackgroundTransparency = 1 | |
266 | E.Position = UDim2.new(0.5, 250, 1, -100) | |
267 | E.Size = UDim2.new(0, 100, 0, 50) | |
268 | E.Font = Enum.Font.Cartoon | |
269 | E.FontSize = Enum.FontSize.Size42 | |
270 | E.Text = "E" | |
271 | E.TextColor3 = Color3.new(1, 1, 1) | |
272 | E.TextStrokeTransparency = 0 | |
273 | ||
274 | local Info = Instance.new("TextLabel") | |
275 | Info.Name = "Info" | |
276 | Info.Parent = x10Wand | |
277 | Info.BackgroundColor3 = Color3.new(1, 1, 1) | |
278 | Info.BackgroundTransparency = 1 | |
279 | Info.Draggable = true | |
280 | Info.Position = UDim2.new(0.5, -200, 1, -30) | |
281 | Info.Size = UDim2.new(0, 400, 0, 10) | |
282 | Info.ZIndex = 10 | |
283 | Info.Font = Enum.Font.SourceSans | |
284 | Info.FontSize = Enum.FontSize.Size18 | |
285 | Info.Text = "B" .. "y | " .. "Th" .. "un" .. "de" .. "r" .. "x" .. tostring(10) | |
286 | Info.TextColor3 = Color3.new(1, 1, 1) | |
287 | ||
288 | local ManaFrame = Instance.new("Frame") | |
289 | ManaFrame.Name = "ManaFrame" | |
290 | ManaFrame.Parent = x10Wand | |
291 | ManaFrame.BackgroundColor3 = Color3.new(0, 0, 0) | |
292 | ManaFrame.BorderSizePixel = 0 | |
293 | ManaFrame.Position = UDim2.new(0.5, 10, 1, -145) | |
294 | ManaFrame.Size = UDim2.new(0, 204, 0, 24) | |
295 | ||
296 | local ManaBar = Instance.new("Frame") | |
297 | ManaBar.Name = "ManaBar" | |
298 | ManaBar.Parent = ManaFrame | |
299 | ManaBar.BackgroundColor3 = Color3.new(0, 0.317647, 1) | |
300 | ManaBar.BorderSizePixel = 0 | |
301 | ManaBar.Position = UDim2.new(0, 2, 0, 2) | |
302 | ManaBar.Size = UDim2.new(0, 200, 0, 20) | |
303 | ManaBar.ZIndex = 2 | |
304 | ||
305 | local ManaText = Instance.new("TextLabel") | |
306 | ManaText.Name = "ManaText" | |
307 | ManaText.Parent = ManaFrame | |
308 | ManaText.BackgroundColor3 = Color3.new(1, 1, 1) | |
309 | ManaText.BackgroundTransparency = 1 | |
310 | ManaText.Size = UDim2.new(0, 204, 0, 24) | |
311 | ManaText.ZIndex = 4 | |
312 | ManaText.Font = Enum.Font.SciFi | |
313 | ManaText.FontSize = Enum.FontSize.Size18 | |
314 | ManaText.Text = MaxMana | |
315 | ManaText.TextColor3 = Color3.new(1, 1, 1) | |
316 | ||
317 | local HealthFrame = Instance.new("Frame") | |
318 | HealthFrame.Name = "HealthFrame" | |
319 | HealthFrame.Parent = x10Wand | |
320 | HealthFrame.BackgroundColor3 = Color3.new(0, 0, 0) | |
321 | HealthFrame.BorderSizePixel = 0 | |
322 | HealthFrame.Position = UDim2.new(0.5, -214, 1, -145) | |
323 | HealthFrame.Size = UDim2.new(0, 204, 0, 24) | |
324 | ||
325 | local HealthBar = Instance.new("Frame") | |
326 | HealthBar.Name = "HealthBar" | |
327 | HealthBar.Parent = HealthFrame | |
328 | HealthBar.BackgroundColor3 = Color3.new(0, 0.8, 0.02) | |
329 | HealthBar.BorderSizePixel = 0 | |
330 | HealthBar.Position = UDim2.new(0, 2, 0, 2) | |
331 | HealthBar.Size = UDim2.new(0, char.Humanoid.Health*2, 0, 20) | |
332 | HealthBar.ZIndex = 2 | |
333 | ||
334 | local HealthText = Instance.new("TextLabel") | |
335 | HealthText.Name = "HealthText" | |
336 | HealthText.Parent = HealthFrame | |
337 | HealthText.BackgroundColor3 = Color3.new(1, 1, 1) | |
338 | HealthText.BackgroundTransparency = 1 | |
339 | HealthText.Size = UDim2.new(0, 204, 0, 24) | |
340 | HealthText.ZIndex = 4 | |
341 | HealthText.Font = Enum.Font.SciFi | |
342 | HealthText.FontSize = Enum.FontSize.Size18 | |
343 | HealthText.Text = math.ceil(char.Humanoid.Health) | |
344 | HealthText.TextColor3 = Color3.new(1, 1, 1) | |
345 | ||
346 | --WEAPON | |
347 | ||
348 | local model = Instance.new("Model", char) | |
349 | model.Name = "x10Wand" | |
350 | ||
351 | local wm = Instance.new("Part", model) | |
352 | wm.Material = "SmoothPlastic" | |
353 | wm.BrickColor = BrickColor.new("Really black") | |
354 | wm.Size = Vector3.new(0,0,0) | |
355 | wm.CFrame = CFrame.new(0,5,0) | |
356 | wm.CanCollide = false | |
357 | wm.TopSurface = "Smooth" | |
358 | wm.BottomSurface = "Smooth" | |
359 | local Mesh = Instance.new("CylinderMesh", wm) | |
360 | Mesh.Scale = Vector3.new(1,9,1) | |
361 | ||
362 | local wmt = Instance.new("Part", model) | |
363 | wmt.Material = "SmoothPlastic" | |
364 | wmt.BrickColor = BrickColor.new(MainColor) | |
365 | wmt.Size = Vector3.new(0,0,0) | |
366 | wmt.CanCollide = false | |
367 | wmt.CFrame = CFrame.new(0,5,0) | |
368 | wmt.Material = "Neon" | |
369 | wmt.TopSurface = "Smooth" | |
370 | wmt.BottomSurface = "Smooth" | |
371 | local Mesh = Instance.new("CylinderMesh", wmt) | |
372 | Mesh.Scale = Vector3.new(1.1,1.8,1.1) | |
373 | ||
374 | local weld = Instance.new("Weld", wmt) | |
375 | weld.Part0 = wmt | |
376 | weld.Part1 = wm | |
377 | weld.C0 = CFrame.new(0, 0.8, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
378 | ||
379 | local weaponWeld = Instance.new("Weld") | |
380 | weaponWeld.Parent = wm | |
381 | weaponWeld.Part0 = wm | |
382 | weaponWeld.Part1 = char["Right Arm"] | |
383 | weaponWeld.C0 = CFrame.new(0, 0.3, -1)*CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) | |
384 | local weaponWeldc0 = weaponWeld.C0 | |
385 | ||
386 | --FUNCTIONS | |
387 | ||
388 | function takeDamage(position, damage, distance, platformStand) | |
389 | local playersHit = {} | |
390 | local currentPlayer = nil | |
391 | for i,v in pairs(workspace:GetChildren()) do | |
392 | if v.Name == "Dummy" then | |
393 | currentPlayer = v | |
394 | else | |
395 | if game:GetService("Players"):GetPlayerFromCharacter(v) ~= nil and v.Name ~= me.Name then | |
396 | currentPlayer = v | |
397 | end | |
398 | end | |
399 | if currentPlayer ~= nil then | |
400 | if currentPlayer:findFirstChild("Torso") and currentPlayer:findFirstChild("Humanoid") and (currentPlayer.Torso.Position - position).magnitude < distance then | |
401 | dealDamage(currentPlayer.Humanoid, damage) | |
402 | table.insert(playersHit, currentPlayer) | |
403 | currentPlayer.Humanoid.PlatformStand = platformStand | |
404 | end | |
405 | end | |
406 | end | |
407 | return playersHit | |
408 | end | |
409 | ||
410 | local SpikeCount = 0 | |
411 | function createPath() | |
412 | SpikeCount = SpikeCount + 1 | |
413 | if SpikeCount >= 10 then | |
414 | SpikeCount = 0 | |
415 | local spike = Instance.new("Part", model) | |
416 | table.insert(TSTable, spike) | |
417 | spike.Size = Vector3.new(0,0,0) | |
418 | spike.Name = "Ring" | |
419 | spike.Material = "Neon" | |
420 | spike.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) | |
421 | spike.Anchored = true | |
422 | spike.Transparency = 0.3 | |
423 | spike.CanCollide = false | |
424 | spike.CFrame = torso.CFrame*CFrame.new(0,0,3)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
425 | local spikemesh = Instance.new("SpecialMesh", spike) | |
426 | spikemesh.Name = "SpikeMesh" | |
427 | spikemesh.Scale = Vector3.new(5,5,5) | |
428 | spikemesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
429 | end | |
430 | ||
431 | local spike1 = Instance.new("Part", model) | |
432 | table.insert(TSTable, spike1) | |
433 | spike1.Size = Vector3.new(0,0,0) | |
434 | spike1.Material = "Neon" | |
435 | spike1.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) | |
436 | spike1.Anchored = true | |
437 | spike1.Transparency = 0 | |
438 | spike1.CanCollide = false | |
439 | spike1.CFrame = torso.CFrame*CFrame.new(0,0,1.5)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
440 | local spikemesh1 = Instance.new("CylinderMesh", spike1) | |
441 | spikemesh1.Name = "SpikeMesh" | |
442 | spikemesh1.Scale = Vector3.new(6,10,6) | |
443 | end | |
444 | ||
445 | local function CreateRegion3FromLocAndSize(Position, Size) | |
446 | local SizeOffset = Size/2 | |
447 | local Point1 = Position - SizeOffset | |
448 | local Point2 = Position + SizeOffset | |
449 | return Region3.new(Point1, Point2) | |
450 | end | |
451 | ||
452 | function dealDamage(targetHumanoid, damage) | |
453 | if targetHumanoid.Health > 100 then | |
454 | targetHumanoid.MaxHealth = 100 | |
455 | targetHumanoid.Health = 100 | |
456 | end | |
457 | targetHumanoid.Health = targetHumanoid.Health - damage | |
458 | end | |
459 | ||
460 | function makeParticles() | |
461 | local p = Instance.new("Part", char) | |
462 | p.CanCollide = false | |
463 | p.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)]) | |
464 | p.Material = "Neon" | |
465 | p.Name = "Particle" | |
466 | p.Size = Vector3.new(0,0,0) | |
467 | p.CFrame = wmt.CFrame*CFrame.new(math.random(-1,1), math.random(-1,1), math.random(-1,1))*CFrame.Angles(math.rad(math.random(0,360)), math.rad(math.random(0,360)), math.rad(math.random(0,360))) | |
468 | game:GetService("Debris"):AddItem(p,3) | |
469 | table.insert(currentTable, p) | |
470 | local bbp = Instance.new("BodyPosition", p) | |
471 | bbp.Name = "forceinward" | |
472 | bbp.MaxForce = Vector3.new(math.random(1000, 2000), math.random(1000, 2000), math.random(1000, 2000)) | |
473 | bbp.P = math.random(3000, 5000) | |
474 | if isCharging then | |
475 | bbp.Position = wmt.Position | |
476 | bbp.D = 1000 | |
477 | else | |
478 | bbp.Position = p.Position + Vector3.new(math.random(-1,1), 1, math.random(-1,1)) | |
479 | bbp.D = 2000 | |
480 | end | |
481 | table.insert(allbps, bbp) | |
482 | end | |
483 | ||
484 | function OriginalProjectile(loc) | |
485 | local proj = Instance.new("Part", model) | |
486 | proj.CanCollide = false | |
487 | proj.Name = "projectile" | |
488 | proj.CFrame = wmt.CFrame | |
489 | proj.Anchored = true | |
490 | proj.Material = "Neon" | |
491 | proj.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) | |
492 | proj.CFrame = CFrame.new(proj.Position, loc) | |
493 | proj.Size = Vector3.new(0.3, 0.3, 2) | |
494 | local s = Instance.new("Sound", wmt) | |
495 | s.SoundId = fireworkSounds[math.random(1,#fireworkSounds)] | |
496 | s.EmitterSize = 10 | |
497 | s.Volume = math.random(80,100)/10 | |
498 | s:Play() | |
499 | game:GetService("Debris"):AddItem(s,5) | |
500 | local s = Instance.new("Sound", proj) | |
501 | s.SoundId = "rbxassetid://84903136" | |
502 | s.EmitterSize = 10 | |
503 | s.Volume = math.random(80,100)/10 | |
504 | s:Play() | |
505 | game:GetService("Debris"):AddItem(s, 5) | |
506 | table.insert(projectiles, proj) | |
507 | end | |
508 | ||
509 | function createHole(location, height) | |
510 | if (torso.Position - location).magnitude < 2000 then | |
511 | local hole = Instance.new("Part", model) | |
512 | hole.BrickColor = BrickColor.new("Really black") | |
513 | hole.Size = Vector3.new(0,0,0) | |
514 | hole.Anchored = true | |
515 | hole.CFrame = CFrame.new(location.X,location.Y,location.Z)*CFrame.new(0,height,0) | |
516 | hole.Material = "SmoothPlastic" | |
517 | local cm = Instance.new("CylinderMesh",hole) | |
518 | cm.Name = "HoleMesh" | |
519 | cm.Scale = Vector3.new(0,0,0) | |
520 | table.insert(holeTable, hole) | |
521 | local s = Instance.new("Sound", hole) --whole opening | |
522 | s.SoundId = magicSounds[math.random(1,#magicSounds)] | |
523 | s.EmitterSize = 50 | |
524 | s.Volume = 100 | |
525 | s:Play() | |
526 | game:GetService("Debris"):AddItem(s,5) | |
527 | end | |
528 | end | |
529 | ||
530 | function castingStart(length) | |
531 | local s = Instance.new("Sound", wmt) --wavy noise | |
532 | s.SoundId = "rbxassetid://262327541" | |
533 | s.EmitterSize = 10 | |
534 | s.Volume = 100 | |
535 | s:Play() | |
536 | game:GetService("Debris"):AddItem(s,5) | |
537 | castRing = Instance.new("Part", model) | |
538 | castRing.Size = Vector3.new(0,0,0) | |
539 | castRing.Name = "CastingRing" | |
540 | castRing.Material = "Neon" | |
541 | castRing.BrickColor = BrickColor.new("Really black") | |
542 | castRing.Anchored = true | |
543 | castRing.Transparency = 0.5 | |
544 | castRing.CanCollide = false | |
545 | castRing.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
546 | local ringmesh = Instance.new("SpecialMesh", castRing) | |
547 | ringmesh.Name = "RingMesh" | |
548 | ringmesh.Scale = Vector3.new(2,2,2) | |
549 | - | castRing.BrickColor = BrickColor.new("Industrial white") |
549 | + | |
550 | game:GetService("Debris"):AddItem(castRing, length) --casting time | |
551 | castCircle = Instance.new("Part", model) | |
552 | castCircle.Size = Vector3.new(0,0,0) | |
553 | castCircle.Name = "CastingCircle" | |
554 | castCircle.Material = "Neon" | |
555 | castCircle.Shape = "Cylinder" | |
556 | castCircle.BrickColor = BrickColor.new("Really black") | |
557 | castCircle.Anchored = true | |
558 | castCircle.Transparency = 0.2 | |
559 | castCircle.CanCollide = false | |
560 | castCircle.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) | |
561 | local ringmesh = Instance.new("CylinderMesh", castCircle) | |
562 | ringmesh.Name = "RingMesh" | |
563 | ringmesh.Scale = Vector3.new(4,0.2,4) | |
564 | - | castCircle.BrickColor = BrickColor.new("Industrial white") |
564 | + | |
565 | game:GetService("Debris"):AddItem(s, length) --casting time | |
566 | end | |
567 | ||
568 | -- | |
569 | ||
570 | rainbowNumber = 1 | |
571 | statRegenNumber = 0 | |
572 | holdingw = false | |
573 | Mana = 100 | |
574 | currentTable = {} | |
575 | walkingAnimationSpeed = 3.5 | |
576 | allbps = {} | |
577 | projectiles = {} | |
578 | holeTable = {} | |
579 | rainbowMode = false | |
580 | int = 0 | |
581 | bodyparts = {} | |
582 | holdingMouse1 = false | |
583 | local currentAnim = "walk" | |
584 | local actionWalking = true | |
585 | local isCharging = false | |
586 | local slowingDown = 1 | |
587 | local Smooth = 1 | |
588 | local t = tick() | |
589 | game:GetService("RunService").Stepped:connect(function() | |
590 | t = t+0.5*Smooth | |
591 | statRegenNumber = statRegenNumber + 1 | |
592 | if statRegenNumber >= 10 then | |
593 | if currentAnim == "Dashing" then | |
594 | if Mana > 0 then | |
595 | Mana = Mana - 1 | |
596 | else | |
597 | holdingw = false | |
598 | end | |
599 | else | |
600 | if Mana < MaxMana then | |
601 | Mana = Mana + 1 | |
602 | end | |
603 | end | |
604 | if char.Humanoid.Health < char.Humanoid.MaxHealth then | |
605 | char.Humanoid.Health = char.Humanoid.Health + 1 | |
606 | end | |
607 | statRegenNumber = 0 | |
608 | end | |
609 | HealthText.Text = math.ceil(char.Humanoid.Health) | |
610 | if char.Humanoid.Health <= 100 then | |
611 | HealthBar.Size = UDim2.new(0, math.ceil(char.Humanoid.Health)*2, 0, 20) | |
612 | end | |
613 | ManaText.Text = Mana | |
614 | if Mana <= 100 then | |
615 | ManaBar.Size = UDim2.new(0, Mana*2, 0, 20) | |
616 | end | |
617 | if not inAction then | |
618 | weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0,0.05) | |
619 | if rootpart.Velocity.y > 1 and Humanoid:GetState() == Enum.HumanoidStateType.Freefall then | |
620 | currentAnim = "jump" | |
621 | elseif rootpart.Velocity.y < -1 then | |
622 | currentAnim = "freefall" | |
623 | elseif (math.abs(rootpart.Velocity.x) > 2 or math.abs(rootpart.Velocity.z) > 2) and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then | |
624 | currentAnim = "walk" | |
625 | elseif Vector3.new(rootpart.Velocity.x,0,rootpart.Velocity.y).magnitude < 1 and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then | |
626 | currentAnim = "idle" | |
627 | end | |
628 | ||
629 | if currentAnim == "idle" then | |
630 | animationSpeed = 0.1 | |
631 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.Angles(math.rad(-1), math.rad(-1), -(math.sin(t/7)/20)+0.1), animationSpeed) | |
632 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-1), math.rad(0), (math.sin(t/7)/20)-0.1), animationSpeed) | |
633 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/7)/30,0)*CFrame.Angles(math.rad(-2), math.rad(0), math.rad(1)), animationSpeed) | |
634 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/7)/30,0)*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-1), math.rad(0), math.rad(-1)), animationSpeed) | |
635 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
636 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-math.sin(t/7)/30)*CFrame.Angles(math.rad(-1), math.rad(0), math.rad(0)),animationSpeed) | |
637 | elseif currentAnim == "walk" then | |
638 | animationSpeed = 0.05 | |
639 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-30), math.rad(-42), math.rad(17)), animationSpeed) | |
640 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-51), math.rad(42), math.rad(-11)), animationSpeed) | |
641 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((-math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
642 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
643 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
644 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-math.sin(t/5)/25)*CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)),0.4) | |
645 | elseif currentAnim == "jump" then | |
646 | animationSpeed = 0.2 | |
647 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(-2), math.rad(12)), animationSpeed) | |
648 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-8), math.rad(2), math.rad(-17)), animationSpeed) | |
649 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(0), math.rad(4)), animationSpeed) | |
650 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-16), math.rad(1), math.rad(-4)), animationSpeed) | |
651 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(8), math.rad(0), math.rad(0)),animationSpeed) | |
652 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
653 | elseif currentAnim == "freefall" then | |
654 | animationSpeed = 0.15 | |
655 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-15), math.rad(0), -(math.sin(t/5)/10)+math.rad(10)), animationSpeed) | |
656 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-12), math.rad(4), (math.sin(t/5)/10)+math.rad(-10)), animationSpeed) | |
657 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-8), math.rad(0), (math.sin(t/5)/10)+math.rad(6)), animationSpeed) | |
658 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(0), math.rad(1), (math.sin(t/5)/10)+math.rad(-6)), animationSpeed) | |
659 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
660 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
661 | end | |
662 | else --starting abilities | |
663 | if actionWalking then | |
664 | if (math.abs(rootpart.Velocity.x) > 2 or math.abs(rootpart.Velocity.z) > 2) and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then | |
665 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((-math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
666 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
667 | else | |
668 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.05) | |
669 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.05) | |
670 | end | |
671 | end | |
672 | if currentAnim == "ArmUp" then | |
673 | animationSpeed = 0.3 | |
674 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(79), math.rad(-5), math.rad(1)), animationSpeed) | |
675 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(62), math.rad(-3), math.rad(-3)), 0.07) | |
676 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)),0.07) | |
677 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.07) | |
678 | elseif currentAnim == "Slash1" then | |
679 | animationSpeed = 0.15 | |
680 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-150), math.rad(20), math.rad(40)), animationSpeed) | |
681 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(62), math.rad(-3), math.rad(-3)), 0.07) | |
682 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)),0.07) | |
683 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.07) | |
684 | makeParticles() | |
685 | elseif currentAnim == "SlashMini" then | |
686 | animationSpeed = 0.3 | |
687 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(-0.3,0,-1)*CFrame.Angles(math.rad(23), math.rad(-20), math.rad(-62)), animationSpeed) | |
688 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-49), math.rad(7), math.rad(-1)), animationSpeed) | |
689 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
690 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
691 | weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), animationSpeed) | |
692 | makeParticles() | |
693 | elseif currentAnim == "Slash2" then | |
694 | animationSpeed = 0.3 | |
695 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(70), math.rad(3), math.rad(-13)), animationSpeed) | |
696 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-49), math.rad(7), math.rad(-1)), animationSpeed) | |
697 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
698 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
699 | weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), animationSpeed) | |
700 | makeParticles() | |
701 | elseif currentAnim == "DashDown" then | |
702 | animationSpeed = 0.3 | |
703 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-88), math.rad(-47), math.rad(24)), animationSpeed) | |
704 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,-0.5,0)*CFrame.Angles(math.rad(42), math.rad(-5), math.rad(-5)), animationSpeed) | |
705 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,1.5,-0.5)*CFrame.Angles(math.rad(24), math.rad(3), math.rad(1)), animationSpeed) | |
706 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-40), math.rad(1), math.rad(-3)), animationSpeed) | |
707 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(0), math.rad(0)),animationSpeed) | |
708 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-1.3)*CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)),animationSpeed) | |
709 | local spike = Instance.new("Part", model) | |
710 | table.insert(SpinTable, spike) | |
711 | spike.Size = Vector3.new(0,0,0) | |
712 | spike.Name = "spinnything" | |
713 | spike.Material = "Neon" | |
714 | spike.BrickColor = BrickColor.new(MainColor) | |
715 | spike.Anchored = true | |
716 | spike.Transparency = 0.5 | |
717 | spike.CanCollide = false | |
718 | spike.CFrame = CFrame.new(torso.Position.x,(torso.Position.y - 2.5),torso.Position.z)*CFrame.Angles(math.rad(0), math.rad(math.random(0,180)), math.rad(0)) | |
719 | local spikemesh = Instance.new("BlockMesh", spike) | |
720 | spikemesh.Name = "SpikeMesh" | |
721 | spikemesh.Scale = Vector3.new(5,5,5) | |
722 | local ball = Instance.new("Part", model) | |
723 | ball.Size = Vector3.new(0,0,0) | |
724 | ball.Name = "ballthing" | |
725 | ball.Material = "Neon" | |
726 | ball.BrickColor = BrickColor.new(MainColor) | |
727 | ball.Anchored = true | |
728 | ball.Transparency = 0.5 | |
729 | ball.CanCollide = false | |
730 | ball.CFrame = CFrame.new(torso.Position.x,(torso.Position.y - 2.5),torso.Position.z) | |
731 | local spikemesh = Instance.new("SpecialMesh", ball) | |
732 | spikemesh.Name = "SpikeMesh" | |
733 | spikemesh.MeshType = "Sphere" | |
734 | spikemesh.Scale = Vector3.new(5,5,5) | |
735 | table.insert(SpinTable,ball) | |
736 | makeParticles() | |
737 | elseif currentAnim == "Dashing" then | |
738 | animationSpeed = 0.3 | |
739 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-66), math.rad(-24), (math.sin(t/5)/10)+math.rad(25)), animationSpeed) | |
740 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-64), math.rad(31), -(math.sin(t/5)/10)+math.rad(-25)), animationSpeed) | |
741 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-49), math.rad(-19), math.rad(20)), animationSpeed) | |
742 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-49), math.rad(13), math.rad(-12)), animationSpeed) | |
743 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(5), math.rad(0), math.rad(0)),animationSpeed) | |
744 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
745 | rootpart.CFrame = rootpart.CFrame*CFrame.new(0,0,-2) | |
746 | createPath() | |
747 | elseif currentAnim == "DashSlowing" then | |
748 | animationSpeed = 0.2 | |
749 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(12), math.rad(0), math.rad(0)), animationSpeed) | |
750 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(28), math.rad(0), math.rad(0)), animationSpeed) | |
751 | rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(21), math.rad(0), math.rad(3)), animationSpeed) | |
752 | leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(23), math.rad(-1), math.rad(-2)), animationSpeed) | |
753 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)),animationSpeed) | |
754 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
755 | rootpart.CFrame = rootpart.CFrame*CFrame.new(0,0,-slowingDown) | |
756 | slowingDown = slowingDown - 0.05 | |
757 | elseif currentAnim == "Casting" then | |
758 | animationSpeed = 0.3 | |
759 | rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(138), -(math.sin(t/4)/4)+math.rad(0), math.rad(13)), animationSpeed) | |
760 | leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-21), math.rad(10), math.rad(-11)), animationSpeed) | |
761 | neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
762 | rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed) | |
763 | weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), animationSpeed) | |
764 | pcall(function() | |
765 | castRing.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
766 | castRing.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) | |
767 | castCircle.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
768 | end) | |
769 | makeParticles() | |
770 | end | |
771 | end | |
772 | if #TSTable > 0 then | |
773 | for i,v in pairs(TSTable) do | |
774 | if v.Transparency <= 1 then | |
775 | v.Transparency = v.Transparency + 0.02 | |
776 | if v.Name == "Ring" then | |
777 | pcall(function() | |
778 | v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.2,0.2,0) | |
779 | end) | |
780 | elseif v.Name == "SlamRing" then | |
781 | v.Transparency = v.Transparency - 0.01 | |
782 | pcall(function() | |
783 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(3,3,3) | |
784 | end) | |
785 | elseif v.Name == "GRASS" then | |
786 | v.Transparency = v.Transparency - 0.016 | |
787 | if v.Transparency > 0.5 then | |
788 | v.CanCollide = false | |
789 | end | |
790 | elseif v.Name == "firework" then | |
791 | v.Transparency = v.Transparency - 0.01 | |
792 | pcall(function() | |
793 | v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.05,0.05,0.05) | |
794 | end) | |
795 | else | |
796 | pcall(function() | |
797 | v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.2,0,0.2) | |
798 | end) | |
799 | end | |
800 | else | |
801 | table.remove(TSTable, i) | |
802 | v:Remove() | |
803 | end | |
804 | end | |
805 | end | |
806 | if #currentTable > 0 then | |
807 | for i,v in pairs(currentTable) do | |
808 | if isCharging then | |
809 | v.forceinward.Position = wmt.Position | |
810 | end | |
811 | v.Transparency = v.Transparency + 0.05 | |
812 | if v.Transparency >= 1 then | |
813 | table.remove(currentTable, i) | |
814 | table.remove(allbps, i) | |
815 | v:Remove() | |
816 | end | |
817 | end | |
818 | end | |
819 | if #holeTable > 0 then | |
820 | for i,hole in pairs(holeTable) do | |
821 | if hole.HoleMesh.Scale.X < 100 and hole:findFirstChild("BLOCK") == nil then | |
822 | hole.HoleMesh.Scale = hole.HoleMesh.Scale + Vector3.new(10,0,10) | |
823 | else | |
824 | if hole:findFirstChild("BLOCK") == nil then | |
825 | local block = Instance.new("Part", hole) | |
826 | block.Name = "BLOCK" | |
827 | block.Size = Vector3.new(9,0,9) | |
828 | block.Anchored = true | |
829 | block.CFrame = hole.CFrame*CFrame.new(0,-0.25,0) | |
830 | block.Material = "SmoothPlastic" | |
831 | block.Reflectance = 0.5 | |
832 | block.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) | |
833 | local bv = Instance.new("IntValue", block) | |
834 | bv.Name = "goingUp" | |
835 | bv.Value = 0 | |
836 | else | |
837 | hole:findFirstChild("BLOCK").goingUp.Value = hole:findFirstChild("BLOCK").goingUp.Value + 1 | |
838 | if hole:findFirstChild("BLOCK").goingUp.Value <= 6 then | |
839 | local currentC = hole:findFirstChild("BLOCK").CFrame | |
840 | hole:findFirstChild("BLOCK").Size = hole:findFirstChild("BLOCK").Size + Vector3.new(0,5,0) | |
841 | hole:findFirstChild("BLOCK").CFrame = currentC*CFrame.new(0,-2.5,0) | |
842 | elseif hole:findFirstChild("BLOCK").goingUp.Value >= 20 and hole:findFirstChild("BLOCK").Size.Y > 0.3 then | |
843 | local currentC = hole:findFirstChild("BLOCK").CFrame | |
844 | hole:findFirstChild("BLOCK").Size = hole:findFirstChild("BLOCK").Size + Vector3.new(0,-5,0) | |
845 | hole:findFirstChild("BLOCK").CFrame = currentC*CFrame.new(0,2.5,0) | |
846 | elseif hole:findFirstChild("BLOCK").goingUp.Value == 7 then | |
847 | takeDamage((hole.Position - Vector3.new(0,30,0)), 30, 14, false) | |
848 | local e = Instance.new("Explosion", hole) | |
849 | e.Position = (hole.Position - Vector3.new(0,30,0)) | |
850 | e.BlastPressure = 100000 | |
851 | e.BlastRadius = 6 | |
852 | e.ExplosionType = "CratersAndDebris" | |
853 | e.Visible = false | |
854 | local spike = Instance.new("Part", model) | |
855 | table.insert(TSTable, spike) | |
856 | spike.Size = Vector3.new(0,0,0) | |
857 | spike.Name = "SlamRing" | |
858 | spike.Material = "Neon" | |
859 | spike.BrickColor = BrickColor.new("Industrial white") | |
860 | spike.Anchored = true | |
861 | spike.Transparency = 0.3 | |
862 | spike.CanCollide = false | |
863 | spike.CFrame = hole.CFrame*CFrame.new(0,-30,0)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
864 | local spikemesh = Instance.new("SpecialMesh", spike) | |
865 | spikemesh.Name = "SpikeMesh" | |
866 | spikemesh.Scale = Vector3.new(10,10,10) | |
867 | spikemesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
868 | for ind = 1,8 do | |
869 | local pgrass = Instance.new("Part",model) | |
870 | pgrass.CanCollide = true | |
871 | pgrass.Name = "GRASS" | |
872 | pgrass.Anchored = true | |
873 | if workspace:findFirstChild("Base") ~= nil then | |
874 | pgrass.Material = workspace.Base.Material | |
875 | pgrass.BrickColor = workspace.Base.BrickColor | |
876 | else | |
877 | pgrass.Material = "Grass" | |
878 | pgrass.BrickColor = BrickColor.new("Really black") | |
879 | end | |
880 | pgrass.Size = Vector3.new(math.random(8,10),math.random(1,2),math.random(8,10)) | |
881 | pgrass.CFrame = hole.CFrame*CFrame.new(0,-30,0)*CFrame.Angles(math.rad(math.random(-40,40)),0,math.rad(math.random(-40,40))) | |
882 | pgrass.CFrame = CFrame.new(hole.CFrame.X, hole.CFrame.Y-30, hole.CFrame.Z) --Start at the center of the circle | |
883 | * CFrame.Angles(0, math.rad(ind*(360/8)), math.rad(0)) --Rotate the brick | |
884 | * CFrame.new(0, 0, 6) --Move it out by 10 units | |
885 | * CFrame.Angles(math.rad(math.random(-35,25)),math.rad(math.random(-10,10)),math.rad(math.random(-10,10))) | |
886 | - | pgrass.BrickColor = BrickColor.new("Bright green") |
886 | + | |
887 | end | |
888 | local s = Instance.new("Sound", pgrass) | |
889 | s.SoundId = "rbxassetid://301184111" | |
890 | s.EmitterSize = 10 | |
891 | s.Volume = 0.3 | |
892 | s:Play() | |
893 | game:GetService("Debris"):AddItem(s, 5) | |
894 | elseif hole:findFirstChild("BLOCK").goingUp.Value >= 30 then | |
895 | hole:findFirstChild("BLOCK").Transparency = 1 | |
896 | hole.HoleMesh.Scale = hole.HoleMesh.Scale - Vector3.new(10,0,10) | |
897 | if hole.HoleMesh.Scale.X < 0 then | |
898 | table.remove(holeTable, i) | |
899 | hole:Remove() | |
900 | end | |
901 | end | |
902 | end | |
903 | end | |
904 | end | |
905 | end | |
906 | if #SpinTable > 0 then | |
907 | for i,v in pairs(SpinTable) do | |
908 | if v.Transparency <= 1 then | |
909 | if v.Name == "spinnything" then | |
910 | v.Transparency = v.Transparency + 0.005 | |
911 | v.BrickColor = BrickColor.new(Really black) | |
912 | pcall(function() | |
913 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(1,0,1) | |
914 | end) | |
915 | elseif v.Name == "firework" then | |
916 | v.Transparency = v.Transparency + 0.01 | |
917 | v.BrickColor = BrickColor.new(Really black) | |
918 | local sizeup = 3 | |
919 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
919 | + | |
920 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup) | |
921 | end) | |
922 | elseif v.Name == "firework1" then | |
923 | v.Transparency = v.Transparency + math.random(7,10)/1000 | |
924 | v.BrickColor = BrickColor.new(Really black) | |
925 | - | v.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)]) |
925 | + | |
926 | pcall(function() | |
927 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup) | |
928 | end) | |
929 | elseif v.Name == "teleball" then | |
930 | v.Transparency = v.Transparency - 0.1 | |
931 | v.BrickColor = BrickColor.new(Really black) | |
932 | - | v.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)]) |
932 | + | |
933 | pcall(function() | |
934 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup) | |
935 | end) | |
936 | elseif v.Name == "teleballsmall" then | |
937 | v.Transparency = v.Transparency + 0.02 | |
938 | v.BrickColor = BrickColor.new(Really black) | |
939 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
939 | + | |
940 | pcall(function() | |
941 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup) | |
942 | end) | |
943 | elseif v.Name == "transRainbowPart" then | |
944 | v.BrickColor = BrickColor.new(Really black) | |
945 | v.Transparency = v.Transparency + 0.05 | |
946 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
946 | + | |
947 | v.Transparency = v.Transparency + 0.005 | |
948 | v.BrickColor = BrickColor.new(Really black) | |
949 | pcall(function() | |
950 | v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(1,1,1) | |
951 | end) | |
952 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
952 | + | |
953 | else | |
954 | v:Remove() | |
955 | table.remove(SpinTable, i) | |
956 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
956 | + | |
957 | end | |
958 | end | |
959 | if #projectiles > 0 then | |
960 | for i,v in pairs(projectiles) do | |
961 | if (v.Position - rootpart.Position).magnitude > 300 then | |
962 | v:Remove() | |
963 | table.remove(projectiles, i) | |
964 | local ball1 = Instance.new("Part", model) | |
965 | ball1.Size = Vector3.new(0,0,0) | |
966 | ball1.Name = "firework" | |
967 | ball1.Material = "Neon" | |
968 | ball1.BrickColor = BrickColor.new(MainColor) | |
969 | ball1.Anchored = true | |
970 | ball1.Transparency = 0 | |
971 | ball1.CanCollide = false | |
972 | ball1.CFrame = CFrame.new(v.Position.x,v.Position.y,v.Position.z) | |
973 | local spikemesh = Instance.new("SpecialMesh", ball1) | |
974 | spikemesh.Name = "SpikeMesh" | |
975 | spikemesh.MeshType = "Sphere" | |
976 | spikemesh.Scale = Vector3.new(5,5,5) | |
977 | table.insert(SpinTable,ball1) | |
978 | local s = Instance.new("Sound", ball1) --Crackle | |
979 | s.SoundId = "rbxassetid://435195821" | |
980 | s.EmitterSize = 100 | |
981 | s.Volume = 0.6 | |
982 | s:Play() | |
983 | game:GetService("Debris"):AddItem(s, 2) | |
984 | local s = Instance.new("Sound", ball1) --boom | |
985 | s.SoundId = "rbxassetid://514867425" | |
986 | s.EmitterSize = 100 | |
987 | s.Volume = 100 | |
988 | s:Play() | |
989 | game:GetService("Debris"):AddItem(s, 2) | |
990 | game:GetService("RunService").Stepped:wait() | |
991 | for i = 1,12 do --THIS IS A GOOD POINT | |
992 | local p = Instance.new("Part",ball1) | |
993 | p.Name = "firework" | |
994 | p.Size = Vector3.new(0,0,0) | |
995 | p.Transparency = 0 | |
996 | p.CanCollide = true | |
997 | p.CFrame = ball1.CFrame*CFrame.new(math.random(-4,4),i,math.random(-4,4)) | |
998 | p.Material = "Neon" | |
999 | p.BrickColor = BrickColor.new(Really black) | |
1000 | local f = Instance.new("Fire",p) | |
1001 | f.Color = BrickColor.new(Really black).Color | |
1002 | f.SecondaryColor = Color3.new(1,1,1) | |
1003 | local spikemesh = Instance.new("BlockMesh", p) | |
1004 | spikemesh.Name = "SpikeMesh" | |
1005 | spikemesh.Scale = Vector3.new(20,20,20) | |
1006 | table.insert(TSTable, p) | |
1007 | - | p.BrickColor = BrickColor.new(Rainbow[i]) |
1007 | + | |
1008 | wait(0.1) | |
1009 | - | f.Color = BrickColor.new(Rainbow[i]).Color |
1009 | + | |
1010 | e.Position = ball1.Position | |
1011 | e.BlastPressure = 100000 | |
1012 | e.BlastRadius = 20 | |
1013 | e.ExplosionType = "CratersAndDebris" | |
1014 | else | |
1015 | v.BrickColor = BrickColor.new(Really black) | |
1016 | local somethingWasHit = false | |
1017 | local Region = CreateRegion3FromLocAndSize(v.Position, Vector3.new(1,1,1)) | |
1018 | for _,Part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region,{char},math.huge)) do | |
1019 | if not somethingWasHit and Part.Name ~= "firework" and Part.Name ~= "firework1" and Part.Name ~= "projectile" and Part.Name ~= "Particle" then | |
1020 | v:Remove() | |
1021 | table.remove(projectiles, i) | |
1022 | takeDamage(v.Position, math.random(7,15), 13, false) | |
1023 | - | v.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
1023 | + | |
1024 | for i = 1,6 do | |
1025 | local ball = Instance.new("Part", model) | |
1026 | ball.Size = Vector3.new(0,0,0) | |
1027 | ball.Name = "firework1" | |
1028 | ball.Material = "Neon" | |
1029 | ball.BrickColor = BrickColor.new(MainColor) | |
1030 | ball.Anchored = true | |
1031 | ball.Transparency = 0.5 | |
1032 | ball.CanCollide = false | |
1033 | if i == 1 then | |
1034 | ball.CFrame = CFrame.new(v.Position.x,v.Position.y,v.Position.z) | |
1035 | ball.Transparency = 0 | |
1036 | else | |
1037 | ball.CFrame = CFrame.new(v.Position.x+math.random(-3,3),(v.Position.y+math.random(-3,3)),v.Position.z+math.random(-3,3)) | |
1038 | end | |
1039 | local spikemesh = Instance.new("SpecialMesh", ball) | |
1040 | spikemesh.Name = "SpikeMesh" | |
1041 | spikemesh.MeshType = "Sphere" | |
1042 | spikemesh.Scale = Vector3.new(1,1,1) | |
1043 | table.insert(SpinTable,ball) | |
1044 | if i == 1 then | |
1045 | local s = Instance.new("Sound", ball) | |
1046 | s.SoundId = "rbxassetid://435195821" | |
1047 | s.EmitterSize = 20 | |
1048 | s.Volume = 0.5 | |
1049 | s:Play() | |
1050 | game:GetService("Debris"):AddItem(s, 5) | |
1051 | local s = Instance.new("Sound", ball) --boom | |
1052 | s.SoundId = "rbxassetid://540926687" | |
1053 | s.EmitterSize = 50 | |
1054 | s.Volume = 1 | |
1055 | s:Play() | |
1056 | game:GetService("Debris"):AddItem(s, 3) | |
1057 | end | |
1058 | end | |
1059 | end | |
1060 | end | |
1061 | end | |
1062 | pcall(function() | |
1063 | v.CFrame = v.CFrame*CFrame.new(0,0,-3) | |
1064 | end) | |
1065 | end | |
1066 | end | |
1067 | if rainbowMode then | |
1068 | Mana = 100 | |
1069 | ManaBar.BackgroundColor3 = BrickColor.new(Really black).Color | |
1070 | HealthBar.BackgroundColor3 = BrickColor.new(Rainbow[Really black).Color | |
1071 | Info.TextColor = BrickColor.new(Really black) | |
1072 | Q.TextColor = BrickColor.new(Really black) | |
1073 | E.TextColor = BrickColor.new(Really black) | |
1074 | for i,v in pairs(char:GetChildren()) do | |
1075 | if v:isA("Part") then | |
1076 | v.Transparency = 1 | |
1077 | - | ManaBar.BackgroundColor3 = BrickColor.new(Rainbow[rainbowNumber]).Color |
1077 | + | |
1078 | - | HealthBar.BackgroundColor3 = BrickColor.new(Rainbow[rainbowNumber]).Color |
1078 | + | |
1079 | - | Info.TextColor = BrickColor.new(Rainbow[rainbowNumber]) |
1079 | + | |
1080 | - | Q.TextColor = BrickColor.new(Rainbow[rainbowNumber]) |
1080 | + | |
1081 | - | E.TextColor = BrickColor.new(Rainbow[rainbowNumber]) |
1081 | + | |
1082 | cp.BrickColor = BrickColor.new(Really black) | |
1083 | cp.CFrame = v.CFrame --*CFrame.new(0,0,0)*CFrame.Angles(math.rad(math.random(-20,20)),math.rad(math.random(-20,20)),math.rad(math.random(-20,20))) | |
1084 | for _,extra in pairs(cp:GetChildren()) do | |
1085 | if not extra:isA("SpecialMesh") then | |
1086 | extra:Remove() | |
1087 | end | |
1088 | end | |
1089 | if v.Name ~= "Head" then | |
1090 | - | cp.BrickColor = BrickColor.new(Rainbow[rainbowNumber]) |
1090 | + | |
1091 | mesh.Parent = cp | |
1092 | mesh.Scale = Vector3.new(1,1,1) | |
1093 | end | |
1094 | cp.Parent = model | |
1095 | table.insert(bodyparts, cp) | |
1096 | end | |
1097 | end | |
1098 | end | |
1099 | if #bodyparts > 0 then | |
1100 | for i,v in pairs(bodyparts) do | |
1101 | if v.Transparency < 1 then | |
1102 | v.Transparency = v.Transparency + 0.05 | |
1103 | --v.Mesh.Scale = v.Mesh.Scale-Vector3.new(0.05,0.05,0.05) | |
1104 | else | |
1105 | table.remove(bodyparts, i) | |
1106 | v:Remove() | |
1107 | end | |
1108 | end | |
1109 | end | |
1110 | if rainbowNumber >= #Rainbow then | |
1111 | rainbowNumber = 1 | |
1112 | else | |
1113 | rainbowNumber = rainbowNumber + 1 | |
1114 | end | |
1115 | end) | |
1116 | ||
1117 | local wtap = false | |
1118 | Mouse.KeyDown:connect(function(key) | |
1119 | if key:lower() == "q" then | |
1120 | spellMover = spells[#spells] | |
1121 | table.remove(spells, #spells) | |
1122 | table.insert(spells, 1, spellMover) | |
1123 | loadSpellGui() | |
1124 | elseif key:lower() == "e" then | |
1125 | spellMover = spells[1] | |
1126 | table.remove(spells, 1) | |
1127 | table.insert(spells, #spells+1, spellMover) | |
1128 | loadSpellGui() | |
1129 | end | |
1130 | if not inAction then | |
1131 | if key:lower() == "w" then | |
1132 | if wtap then | |
1133 | if Mana > 0 then | |
1134 | holdingw = true | |
1135 | inAction = true | |
1136 | isCharging = true | |
1137 | char.Humanoid.WalkSpeed = 0 | |
1138 | char.Humanoid.JumpPower = 0 | |
1139 | actionWalking = false | |
1140 | currentAnim = "DashDown" | |
1141 | local dashs = Instance.new("Sound", torso) --whole opening | |
1142 | dashs.SoundId = "rbxassetid://551066808" --ADD DASHING SOUND | |
1143 | dashs.EmitterSize = 12 | |
1144 | dashs.Volume = 100 | |
1145 | dashs.Looped = true | |
1146 | dashs:Play() | |
1147 | wait(0.2) | |
1148 | isCharging = false | |
1149 | takeDamage(rootpart.Position, math.random(20,30), 10, false) | |
1150 | char.Humanoid.WalkSpeed = 1 | |
1151 | currentAnim = "Dashing" | |
1152 | if holdingw then | |
1153 | repeat wait() until not holdingw | |
1154 | else | |
1155 | wait(0.3) | |
1156 | end | |
1157 | dashs:Remove() | |
1158 | currentAnim = "DashSlowing" | |
1159 | slowingDown = 1 | |
1160 | wait(0.5) | |
1161 | char.Humanoid.JumpPower = jumpPower | |
1162 | wtap = false | |
1163 | actionWalking = true | |
1164 | inAction = false | |
1165 | char.Humanoid.WalkSpeed = CharacterSpeed | |
1166 | end | |
1167 | else | |
1168 | wtap = true | |
1169 | wait(0.2) | |
1170 | wtap = false | |
1171 | end | |
1172 | end | |
1173 | end | |
1174 | end) | |
1175 | Mouse.KeyUp:connect(function(key) | |
1176 | if key:lower() == "w" then | |
1177 | holdingw = false | |
1178 | end | |
1179 | end) | |
1180 | Mouse.Button1Down:connect(function() | |
1181 | holdingMouse1 = true | |
1182 | if not inAction then | |
1183 | if Mana >= currentSpell.ManaCost then | |
1184 | Mana = Mana - currentSpell.ManaCost | |
1185 | if currentSpell.Name == "Firework" then | |
1186 | inAction = true | |
1187 | currentAnim = "ArmUp" | |
1188 | wait(0.05) | |
1189 | currentAnim = "Slash1" | |
1190 | isCharging = true | |
1191 | wait(0.3) | |
1192 | currentAnim = "SlashMini" | |
1193 | wait(0.1) | |
1194 | currentAnim = "Slash2" | |
1195 | wait(0.08) | |
1196 | if holdingMouse1 then | |
1197 | repeat if Mana >= 10 then Mana = (Mana - 10) else holdingMouse1 = false end OriginalProjectile(Mouse.Hit.p) wait(0.1) currentAnim = "SlashMini" wait(0.2) currentAnim = "Slash2" until not holdingMouse1 | |
1198 | else | |
1199 | OriginalProjectile(Mouse.Hit.p) | |
1200 | end | |
1201 | isCharging = false | |
1202 | inAction = false | |
1203 | elseif currentSpell.Name == "Void Crush" then | |
1204 | inAction = true | |
1205 | currentAnim = "Casting" | |
1206 | char.Humanoid.WalkSpeed = CharacterSpeed/1.5 | |
1207 | walkingAnimationSpeed = walkingAnimationSpeed*1.5 | |
1208 | castingStart(1) | |
1209 | wait(1) | |
1210 | currentAnim = "SlashMini" | |
1211 | wait(0.1) | |
1212 | currentAnim = "Slash2" | |
1213 | wait(0.08) | |
1214 | createHole(Mouse.Hit.p, 30) | |
1215 | char.Humanoid.WalkSpeed = CharacterSpeed | |
1216 | walkingAnimationSpeed = walkingAnimationSpeed/1.5 | |
1217 | isCharging = false | |
1218 | inAction = false | |
1219 | elseif currentSpell.Name == "Teleport" then | |
1220 | inAction = true | |
1221 | currentAnim = "Casting" | |
1222 | char.Humanoid.WalkSpeed = CharacterSpeed/1.5 | |
1223 | walkingAnimationSpeed = walkingAnimationSpeed*1.5 | |
1224 | castingStart(0.7) | |
1225 | wait(0.5) | |
1226 | if (torso.Position - Mouse.Hit.p).magnitude <= 3000 then | |
1227 | local tball1 = Instance.new("Part", model) | |
1228 | tball1.Size = Vector3.new(0,0,0) | |
1229 | tball1.Name = "teleball" | |
1230 | tball1.Material = "Neon" | |
1231 | tball1.BrickColor = BrickColor.new(MainColor) | |
1232 | tball1.Anchored = true | |
1233 | tball1.Transparency = 0.95 | |
1234 | tball1.CanCollide = false | |
1235 | tball1.CFrame = CFrame.new(Mouse.Hit.p.X, Mouse.Hit.p.Y+3, Mouse.Hit.p.Z) | |
1236 | local spikemesh = Instance.new("SpecialMesh", tball1) | |
1237 | spikemesh.Name = "SpikeMesh" | |
1238 | spikemesh.MeshType = "Sphere" | |
1239 | spikemesh.Scale = Vector3.new(1,1,1) | |
1240 | table.insert(SpinTable,tball1) | |
1241 | local tball = Instance.new("Part", model) | |
1242 | tball.Size = Vector3.new(0,0,0) | |
1243 | tball.Name = "teleball" | |
1244 | tball.Material = "Neon" | |
1245 | tball.BrickColor = BrickColor.new(MainColor) | |
1246 | tball.Anchored = false | |
1247 | tball.Transparency = 0.95 | |
1248 | tball.CanCollide = false | |
1249 | tball.CFrame = torso.CFrame | |
1250 | local spikemesh = Instance.new("SpecialMesh", tball) | |
1251 | spikemesh.Name = "SpikeMesh" | |
1252 | spikemesh.MeshType = "Sphere" | |
1253 | spikemesh.Scale = Vector3.new(1,1,1) | |
1254 | table.insert(SpinTable,tball) | |
1255 | local TWeld = Instance.new("Weld",tball) | |
1256 | TWeld.Part0 = tball | |
1257 | TWeld.Part1 = torso | |
1258 | TWeld.C0 = CFrame.new(0,0,0) | |
1259 | wait(0.1) | |
1260 | local s = Instance.new("Sound", torso) | |
1261 | s.SoundId = "rbxassetid://289556450" | |
1262 | s.EmitterSize = 5 | |
1263 | s.Volume = 1 | |
1264 | s:Play() | |
1265 | game:GetService("Debris"):AddItem(s, 3) | |
1266 | local laser2 = Instance.new("Part", model) | |
1267 | laser2.Color = BrickColor.Really black().Color | |
1268 | laser2.Transparency = 0.1 | |
1269 | laser2.Name = "transRainbowPart" | |
1270 | laser2.Material = "Neon" | |
1271 | laser2.Anchored = true | |
1272 | laser2.CanCollide = false | |
1273 | laser2.CFrame = CFrame.new(((tball.Position.X + tball1.Position.X) / 2), ((tball.Position.Y + tball1.Position.Y) / 2), ((tball.Position.Z + tball1.Position.Z) / 2)) | |
1274 | laser2.CFrame = CFrame.new(laser2.Position, tball1.Position) | |
1275 | - | laser2.Color = BrickColor.White().Color |
1275 | + | |
1276 | local bm = Instance.new("BlockMesh", laser2) | |
1277 | bm.Scale = Vector3.new(2, 2, 1) | |
1278 | table.insert(SpinTable,laser2) | |
1279 | wait(0.1) | |
1280 | TWeld:Remove() | |
1281 | tball.CFrame = torso.CFrame | |
1282 | tball.Anchored = true | |
1283 | tball.Name = "teleballsmall" | |
1284 | rootpart.CFrame = tball1.CFrame | |
1285 | tball1.Name = "teleballsmall" | |
1286 | end | |
1287 | char.Humanoid.WalkSpeed = CharacterSpeed | |
1288 | walkingAnimationSpeed = walkingAnimationSpeed/1.5 | |
1289 | isCharging = false | |
1290 | inAction = false | |
1291 | elseif currentSpell.Name == "True Form" then | |
1292 | inAction = true | |
1293 | currentAnim = "Casting" | |
1294 | char.Humanoid.WalkSpeed = CharacterSpeed/1.5 | |
1295 | walkingAnimationSpeed = walkingAnimationSpeed*1.5 | |
1296 | wait(3) | |
1297 | if rainbowMode then | |
1298 | rainbowMode = false | |
1299 | pcall(function() | |
1300 | rainbows:Remove() | |
1301 | end) | |
1302 | for i,v in pairs(char:GetChildren()) do | |
1303 | if v:isA("Part") then | |
1304 | if v.Name ~= "HumanoidRootPart" then | |
1305 | v.Transparency = 0 | |
1306 | end | |
1307 | elseif v:isA("Accessory") then | |
1308 | v.Handle.Transparency = 0 | |
1309 | end | |
1310 | end | |
1311 | CharacterSpeed = CharacterSpeed/2 | |
1312 | walkingAnimationSpeed = 3.5*1.5 | |
1313 | model.face.Parent = char.Head | |
1314 | ManaBar.BackgroundColor3 = Color3.new(0, 0.317647, 1) | |
1315 | HealthBar.BackgroundColor3 = Color3.new(0, 0.8, 0.02) | |
1316 | Info.TextColor = BrickColor.new(MainColor) | |
1317 | Q.TextColor = BrickColor.new(MainColor) | |
1318 | E.TextColor = BrickColor.new(MainColor) | |
1319 | else | |
1320 | for i,v in pairs(char:GetChildren()) do | |
1321 | if v:isA("Part") then | |
1322 | if v.Name ~= "HumanoidRootPart" then | |
1323 | v.Transparency = 1 | |
1324 | end | |
1325 | elseif v:isA("Accessory") then | |
1326 | v.Handle.Transparency = 1 | |
1327 | end | |
1328 | end | |
1329 | CharacterSpeed = CharacterSpeed*2 | |
1330 | walkingAnimationSpeed = 6*1.5 | |
1331 | char.Humanoid.WalkSpeed = CharacterSpeed | |
1332 | char.Head.face.Parent = model | |
1333 | rainbowMode = true | |
1334 | rainbows = Instance.new("Sound", torso) --whole opening | |
1335 | rainbows.SoundId = "rbxassetid://679359907" | |
1336 | rainbows.EmitterSize = 6 | |
1337 | rainbows.Volume = 100 | |
1338 | rainbows:Play() | |
1339 | rainbows.Looped = true | |
1340 | end | |
1341 | char.Humanoid.WalkSpeed = CharacterSpeed | |
1342 | walkingAnimationSpeed = walkingAnimationSpeed/1.5 | |
1343 | - | rainbows.SoundId = "rbxassetid://179794977" |
1343 | + | |
1344 | inAction = false | |
1345 | end | |
1346 | else | |
1347 | print("Not enough mana") | |
1348 | end | |
1349 | end | |
1350 | end) | |
1351 | Mouse.Button1Up:connect(function() | |
1352 | holdingMouse1 = false | |
1353 | end) |