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