SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code V2 by Mokiros")
| |
| 7 | local RealPlayer = RealPlayer | |
| 8 | script.Parent = RealPlayer.Character | |
| 9 | ||
| 10 | --Fake event to make stuff like Mouse.KeyDown work | |
| 11 | local Disconnect_Function = function(this) | |
| 12 | this[1].Functions[this[2]] = nil | |
| 13 | end | |
| 14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 15 | local FakeEvent_Metatable = {__index={
| |
| 16 | Connect = function(this,f) | |
| 17 | local i = tostring(math.random(0,10000)) | |
| 18 | while this.Functions[i] do | |
| 19 | i = tostring(math.random(0,10000)) | |
| 20 | end | |
| 21 | this.Functions[i] = f | |
| 22 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 23 | end | |
| 24 | }} | |
| 25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 26 | local function fakeEvent() | |
| 27 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 28 | end | |
| 29 | ||
| 30 | --Creating fake input objects with fake variables | |
| 31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 37 | end} | |
| 38 | --Merged 2 functions into one by checking amount of arguments | |
| 39 | CAS.UnbindAction = CAS.BindAction | |
| 40 | ||
| 41 | --This function will trigger the events that have been :Connect()'ed | |
| 42 | local function TriggerEvent(self,ev,...) | |
| 43 | for _,f in pairs(self[ev].Functions) do | |
| 44 | f(...) | |
| 45 | end | |
| 46 | end | |
| 47 | FakeMouse.TriggerEvent = TriggerEvent | |
| 48 | UIS.TriggerEvent = TriggerEvent | |
| 49 | ||
| 50 | --Client communication | |
| 51 | local Event = Instance.new("RemoteEvent")
| |
| 52 | Event.Name = "UserInput_Event" | |
| 53 | Event.OnServerEvent:Connect(function(plr,io) | |
| 54 | if plr~=RealPlayer then return end | |
| 55 | FakeMouse.Target = io.Target | |
| 56 | FakeMouse.Hit = io.Hit | |
| 57 | if not io.isMouse then | |
| 58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 61 | end | |
| 62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 64 | end | |
| 65 | for _,t in pairs(CAS.Actions) do | |
| 66 | for _,k in pairs(t.Keys) do | |
| 67 | if k==io.KeyCode then | |
| 68 | t.Function(t.Name,io.UserInputState,io) | |
| 69 | end | |
| 70 | end | |
| 71 | end | |
| 72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 74 | end | |
| 75 | end) | |
| 76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 77 | local Mouse = owner:GetMouse() | |
| 78 | local UIS = game:GetService("UserInputService")
| |
| 79 | local input = function(io,RobloxHandled) | |
| 80 | if RobloxHandled then return end | |
| 81 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 83 | end | |
| 84 | UIS.InputBegan:Connect(input) | |
| 85 | UIS.InputEnded:Connect(input) | |
| 86 | local h,t | |
| 87 | --Give the server mouse data every second frame, but only if the values changed | |
| 88 | --If player is not moving their mouse, client won't fire events | |
| 89 | local HB = game:GetService("RunService").Heartbeat
| |
| 90 | while true do | |
| 91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 92 | h,t=Mouse.Hit,Mouse.Target | |
| 93 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 94 | end | |
| 95 | --Wait 2 frames | |
| 96 | for i=1,2 do | |
| 97 | HB:Wait() | |
| 98 | end | |
| 99 | end]==],script) | |
| 100 | ||
| 101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 102 | --Real game object | |
| 103 | local RealGame = game | |
| 104 | ||
| 105 | --Metatable for fake service | |
| 106 | local FakeService_Metatable = {
| |
| 107 | __index = function(self,k) | |
| 108 | local s = rawget(self,"_RealService") | |
| 109 | if s then | |
| 110 | return typeof(s[k])=="function" | |
| 111 | and function(_,...)return s[k](s,...)end or s[k] | |
| 112 | end | |
| 113 | end, | |
| 114 | __newindex = function(self,k,v) | |
| 115 | local s = rawget(self,"_RealService") | |
| 116 | if s then s[k]=v end | |
| 117 | end | |
| 118 | } | |
| 119 | local function FakeService(t,RealService) | |
| 120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 121 | return setmetatable(t,FakeService_Metatable) | |
| 122 | end | |
| 123 | ||
| 124 | --Fake game object | |
| 125 | local FakeGame = {
| |
| 126 | GetService = function(self,s) | |
| 127 | return rawget(self,s) or RealGame:GetService(s) | |
| 128 | end, | |
| 129 | Players = FakeService({
| |
| 130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 131 | },"Players"), | |
| 132 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 134 | RunService = FakeService({
| |
| 135 | _btrs = {},
| |
| 136 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 137 | BindToRenderStep = function(self,name,_,fun) | |
| 138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 139 | end, | |
| 140 | UnbindFromRenderStep = function(self,name) | |
| 141 | self._btrs[name]:Disconnect() | |
| 142 | end, | |
| 143 | },"RunService") | |
| 144 | } | |
| 145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 146 | FakeGame.service = FakeGame.GetService | |
| 147 | FakeService(FakeGame,game) | |
| 148 | --Changing owner to fake player object to support owner:GetMouse() | |
| 149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 150 | end | |
| 151 | ||
| 152 | --[ Fixed by all_suck ]-- | |
| 153 | taunting = false | |
| 154 | math.randomseed(tick()) | |
| 155 | local plr = game.Players.LocalPlayer | |
| 156 | local uis = game:GetService("UserInputService")
| |
| 157 | repeat | |
| 158 | wait() | |
| 159 | until plr.Character and plr.Character:WaitForChild("Torso") and plr.Character:WaitForChild("Humanoid")
| |
| 160 | local char = plr.Character | |
| 161 | local torso = char.Torso | |
| 162 | local humanoid = char.Humanoid | |
| 163 | local canTaunt = false | |
| 164 | local charStats = Instance.new("Folder", char)
| |
| 165 | charStats.Name = "CharStats" | |
| 166 | speed = Instance.new("NumberValue", charStats)
| |
| 167 | speed.Name = "Speed" | |
| 168 | speed.Value = 10 | |
| 169 | local Anim | |
| 170 | LS = torso["Left Shoulder"] | |
| 171 | LH = torso["Left Hip"] | |
| 172 | RS = torso["Right Shoulder"] | |
| 173 | RH = torso["Right Hip"] | |
| 174 | Neck = torso.Neck | |
| 175 | it = Instance.new | |
| 176 | vt = Vector3.new | |
| 177 | cf = CFrame.new | |
| 178 | euler = CFrame.fromEulerAnglesXYZ | |
| 179 | angles = CFrame.Angles | |
| 180 | necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
| 181 | necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
| 182 | LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 183 | LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 184 | RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 185 | RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 186 | RootPart = char.HumanoidRootPart | |
| 187 | RootJoint = RootPart.RootJoint | |
| 188 | RootCF = euler(-1.57, 0, 3.14) | |
| 189 | player = nil | |
| 190 | RSH, LSH = nil, nil | |
| 191 | RW, LW = Instance.new("Weld"), Instance.new("Weld")
| |
| 192 | RW.Name = "Right Shoulder" | |
| 193 | LW.Name = "Left Shoulder" | |
| 194 | Sheathed = true | |
| 195 | SwordStance = false | |
| 196 | Charge = 0 | |
| 197 | RSH = char.Torso["Right Shoulder"] | |
| 198 | LSH = char.Torso["Left Shoulder"] | |
| 199 | RSH.Parent = nil | |
| 200 | LSH.Parent = nil | |
| 201 | RW.Name = "Right Shoulder" | |
| 202 | RW.Part0 = char.Torso | |
| 203 | RW.C0 = cf(1.5, 0.5, 0) | |
| 204 | RW.C1 = cf(0, 0.5, 0) | |
| 205 | RW.Part1 = char["Right Arm"] | |
| 206 | RW.Parent = char.Torso | |
| 207 | LW.Name = "Left Shoulder" | |
| 208 | LW.Part0 = char.Torso | |
| 209 | LW.C0 = cf(-1.5, 0.5, 0) | |
| 210 | LW.C1 = cf(0, 0.5, 0) | |
| 211 | LW.Part1 = char["Left Arm"] | |
| 212 | LW.Parent = char.Torso | |
| 213 | local cam = workspace.CurrentCamera | |
| 214 | local Effects = Instance.new("Model", char)
| |
| 215 | Effects.Name = "Effects" | |
| 216 | local currentattack, basicattacking | |
| 217 | local walkspeed = 14 | |
| 218 | humanoid.WalkSpeed = walkspeed | |
| 219 | mouse = plr:GetMouse() | |
| 220 | sinecount, normcount, tweentick, tweenrot, tweenrotm = 0, 0, 0, 0, 0 | |
| 221 | Mode = "Positive" | |
| 222 | local Key1 = Enum.KeyCode.Q | |
| 223 | local Key2 = Enum.KeyCode.E | |
| 224 | local Key3 = Enum.KeyCode.R | |
| 225 | local Key4 = Enum.KeyCode.F | |
| 226 | local key1re = 5 | |
| 227 | local key2re = 6 | |
| 228 | local key3re = 10 | |
| 229 | local key4re = 1 | |
| 230 | local atk1d = 3.2 | |
| 231 | local atk2d = 1.8 | |
| 232 | local atk3d = 3 | |
| 233 | local atk4d = 0 | |
| 234 | local key1db = false | |
| 235 | local key2db = false | |
| 236 | local key3db = false | |
| 237 | local key4db = false | |
| 238 | local attacking = Instance.new("BoolValue", charStats)
| |
| 239 | attacking.Value = false | |
| 240 | attacking.Name = "Attacking" | |
| 241 | local PosAtk1 = "Up" | |
| 242 | local PosAtk2 = "Force Push" | |
| 243 | local PosAtk3 = "Gravity Field" | |
| 244 | local PosAtk4 = "Inverse Polarity" | |
| 245 | local NegAtk1 = "Down" | |
| 246 | local NegAtk2 = "Fissure" | |
| 247 | local NegAtk3 = "Black Hole" | |
| 248 | local NegAtk4 = "Inverse Polarity" | |
| 249 | local Click1 = Enum.UserInputType.MouseButton1 | |
| 250 | local ComboAttacks = {
| |
| 251 | "Combo1", | |
| 252 | "Combo2", | |
| 253 | "Combo3" | |
| 254 | } | |
| 255 | local counter = 1 | |
| 256 | local countermax = #ComboAttacks | |
| 257 | local combo1duration = 0.8 | |
| 258 | local combo2duration = 1 | |
| 259 | local combo3duration = 1.2 | |
| 260 | click1db = false | |
| 261 | local Stab1Dam = 10 | |
| 262 | local Stab2Dam = 10 | |
| 263 | local Stab3Dam = 1 | |
| 264 | local Attack1Damage = 2.5 | |
| 265 | local Attack2Damage = 15 | |
| 266 | local Attack3Damage = 13 | |
| 267 | local Attack4Damage | |
| 268 | local Energy = Instance.new("NumberValue", charStats)
| |
| 269 | Energy.Name = "EnergyAmount" | |
| 270 | Energy.Value = math.huge | |
| 271 | local Attack1Energy = 0 | |
| 272 | local Attack2Energy = 0 | |
| 273 | local Attack3Energy = 0 | |
| 274 | local Attack4Energy = 0 | |
| 275 | function rayCast(Pos, Dir, Max, Ignore) | |
| 276 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 277 | end | |
| 278 | function thread(f) | |
| 279 | coroutine.resume(coroutine.create(f)) | |
| 280 | end | |
| 281 | function swait(num) | |
| 282 | if num == 0 or num == nil then | |
| 283 | game:service("RunService").Stepped:wait(0)
| |
| 284 | else | |
| 285 | for i = 0, num do | |
| 286 | game:service("RunService").Stepped:wait(0)
| |
| 287 | end | |
| 288 | end | |
| 289 | end | |
| 290 | function clerp(a, b, t) | |
| 291 | local qa = {
| |
| 292 | QuaternionFromCFrame(a) | |
| 293 | } | |
| 294 | local qb = {
| |
| 295 | QuaternionFromCFrame(b) | |
| 296 | } | |
| 297 | local ax, ay, az = a.x, a.y, a.z | |
| 298 | local bx, by, bz = b.x, b.y, b.z | |
| 299 | local _t = 1 - t | |
| 300 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 301 | end | |
| 302 | function QuaternionFromCFrame(cf) | |
| 303 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 304 | local trace = m00 + m11 + m22 | |
| 305 | if trace > 0 then | |
| 306 | local s = math.sqrt(1 + trace) | |
| 307 | local recip = 0.5 / s | |
| 308 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 309 | else | |
| 310 | local i = 0 | |
| 311 | if m00 < m11 then | |
| 312 | i = 1 | |
| 313 | end | |
| 314 | if m22 > (i == 0 and m00 or m11) then | |
| 315 | i = 2 | |
| 316 | end | |
| 317 | if i == 0 then | |
| 318 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 319 | local recip = 0.5 / s | |
| 320 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 321 | elseif i == 1 then | |
| 322 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 323 | local recip = 0.5 / s | |
| 324 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 325 | elseif i == 2 then | |
| 326 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 327 | local recip = 0.5 / s | |
| 328 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 329 | end | |
| 330 | end | |
| 331 | end | |
| 332 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 333 | local xs, ys, zs = x + x, y + y, z + z | |
| 334 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 335 | local xx = x * xs | |
| 336 | local xy = x * ys | |
| 337 | local xz = x * zs | |
| 338 | local yy = y * ys | |
| 339 | local yz = y * zs | |
| 340 | local zz = z * zs | |
| 341 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
| 342 | end | |
| 343 | function QuaternionSlerp(a, b, t) | |
| 344 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 345 | local startInterp, finishInterp | |
| 346 | if cosTheta >= 1.0E-4 then | |
| 347 | if 1 - cosTheta > 1.0E-4 then | |
| 348 | local theta = math.acos(cosTheta) | |
| 349 | local invSinTheta = 1 / math.sin(theta) | |
| 350 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
| 351 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 352 | else | |
| 353 | startInterp = 1 - t | |
| 354 | finishInterp = t | |
| 355 | end | |
| 356 | elseif 1 + cosTheta > 1.0E-4 then | |
| 357 | local theta = math.acos(-cosTheta) | |
| 358 | local invSinTheta = 1 / math.sin(theta) | |
| 359 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
| 360 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 361 | else | |
| 362 | startInterp = t - 1 | |
| 363 | finishInterp = t | |
| 364 | end | |
| 365 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
| 366 | end | |
| 367 | function round(num) | |
| 368 | local a, b = math.modf(num) | |
| 369 | if num % 1 ~= 0 then | |
| 370 | return math.floor(num) + math.floor(b * 10 + 0.5) / 10 | |
| 371 | else | |
| 372 | return math.floor(num) | |
| 373 | end | |
| 374 | end | |
| 375 | function NoOutline(Part) | |
| 376 | Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 377 | end | |
| 378 | function newPart(parent, brickcolor, transparency, anchored, cancollide, size, name) | |
| 379 | local fp = Instance.new("Part")
| |
| 380 | fp.Parent = parent | |
| 381 | fp.Transparency = transparency | |
| 382 | fp.Anchored = anchored | |
| 383 | fp.CanCollide = cancollide | |
| 384 | fp.Locked = true | |
| 385 | fp.BrickColor = BrickColor.new(brickcolor) | |
| 386 | fp.Name = name | |
| 387 | fp.Size = size | |
| 388 | fp.Position = torso.Position | |
| 389 | NoOutline(fp) | |
| 390 | fp.Material = "SmoothPlastic" | |
| 391 | fp:BreakJoints() | |
| 392 | fp.CFrame = RootPart.CFrame | |
| 393 | return fp | |
| 394 | end | |
| 395 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
| 396 | local mesh = Instance.new(Mesh) | |
| 397 | mesh.Parent = part | |
| 398 | if Mesh == "SpecialMesh" then | |
| 399 | mesh.MeshType = meshtype | |
| 400 | if meshid then | |
| 401 | mesh.MeshId = meshid | |
| 402 | end | |
| 403 | end | |
| 404 | if offset then | |
| 405 | mesh.Offset = offset | |
| 406 | end | |
| 407 | mesh.Scale = scale | |
| 408 | return mesh | |
| 409 | end | |
| 410 | function weld(parent, part0, part1, c0) | |
| 411 | local weld = Instance.new("Weld")
| |
| 412 | weld.Parent = parent | |
| 413 | weld.Part0 = part0 | |
| 414 | weld.Part1 = part1 | |
| 415 | weld.C0 = c0 | |
| 416 | return weld | |
| 417 | end | |
| 418 | function createBlockPart() | |
| 419 | local part = Instance.new("Part", Effects)
| |
| 420 | part.Anchored = true | |
| 421 | part.CanCollide = false | |
| 422 | part.Size = Vector3.new(1, 1, 1) | |
| 423 | part.BrickColor = BrickColor.new(Mode == "Negative" and "Really black" or "Lily white") | |
| 424 | part.Transparency = 0.4 | |
| 425 | part.Material = Mode == "Negative" and "Granite" or "Neon" | |
| 426 | part.CFrame = RootPart.CFrame | |
| 427 | coroutine.resume(coroutine.create(function() | |
| 428 | if humanoid.Health <= 0 then | |
| 429 | part:Destroy() | |
| 430 | end | |
| 431 | end), part) | |
| 432 | return part | |
| 433 | end | |
| 434 | function createSpherePart() | |
| 435 | local part = Instance.new("Part", Effects)
| |
| 436 | part.Anchored = true | |
| 437 | part.CanCollide = false | |
| 438 | part.Size = Vector3.new(1, 1, 1) | |
| 439 | part.BrickColor = BrickColor.new(Mode == "Negative" and "Really black" or "Lily white") | |
| 440 | part.Transparency = 0.4 | |
| 441 | part.Material = "Neon" | |
| 442 | part.Material = Mode == "Negative" and "Granite" or "Neon" | |
| 443 | local pmesh = Instance.new("SpecialMesh", part)
| |
| 444 | pmesh.MeshType = "Sphere" | |
| 445 | part.CFrame = RootPart.CFrame | |
| 446 | return part, pmesh | |
| 447 | end | |
| 448 | function createPulsePart() | |
| 449 | local pulse = Instance.new("Part", Effects)
| |
| 450 | pulse.BrickColor = BrickColor.new("Lily white")
| |
| 451 | pulse.Material = "Neon" | |
| 452 | pulse.Transparency = 0.2 | |
| 453 | pulse.Anchored = true | |
| 454 | pulse.CanCollide = false | |
| 455 | pulse.Size = Vector3.new(5, 5, 0.2) | |
| 456 | local pulsem = Instance.new("SpecialMesh", pulse)
| |
| 457 | pulsem.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 458 | pulsem.Scale = Vector3.new(10, 10, 0.2) | |
| 459 | pulse.CFrame = RootPart.CFrame | |
| 460 | return pulse, pulsem | |
| 461 | end | |
| 462 | function createBodyVelocity(vtors) | |
| 463 | local bv = Instance.new("BodyVelocity", vtors)
| |
| 464 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
| 465 | bv.P = 1250 | |
| 466 | return bv | |
| 467 | end | |
| 468 | function randomangles() | |
| 469 | local random = math.rad((math.random() - 0.5) * 180) | |
| 470 | local randomangles = CFrame.Angles(random, random, random) | |
| 471 | return randomangles | |
| 472 | end | |
| 473 | function findCloseHumanoid(centre, distance) | |
| 474 | local tab = {}
| |
| 475 | for _, child in pairs(game.Workspace:GetChildren()) do | |
| 476 | if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= humanoid and child:findFirstChild("Torso") then
| |
| 477 | local vtors = child.Torso | |
| 478 | local mag = math.abs((vtors.Position - centre).magnitude) | |
| 479 | if distance >= mag then | |
| 480 | table.insert(tab, child.Humanoid) | |
| 481 | end | |
| 482 | end | |
| 483 | end | |
| 484 | return tab | |
| 485 | end | |
| 486 | function sound(id, par, vol, dur, pit) | |
| 487 | coroutine.resume(coroutine.create(function() | |
| 488 | local sou = Instance.new("Sound", par or workspace)
| |
| 489 | sou.Volume = vol | |
| 490 | sou.Pitch = pit or 1 | |
| 491 | sou.SoundId = "http://www.roblox.com/asset/?id=" .. id | |
| 492 | swait() | |
| 493 | sou:play() | |
| 494 | thread(function() | |
| 495 | wait(dur) | |
| 496 | sou:Destroy() | |
| 497 | end) | |
| 498 | return sou | |
| 499 | end)) | |
| 500 | end | |
| 501 | --loldamage | |
| 502 | function basicDamage(vhum, damage, colour) | |
| 503 | if not vhum or not vhum.Parent:findFirstChild("Humanoid") then
| |
| 504 | return | |
| 505 | end | |
| 506 | vhum.Parent.Humanoid:TakeDamage(damage) | |
| 507 | local damagepart = Instance.new("Part", Effects)
| |
| 508 | damagepart.Transparency = 1 | |
| 509 | damagepart.Anchored = true | |
| 510 | damagepart.CanCollide = false | |
| 511 | damagepart.Size = Vector3.new(1, 1, 1) | |
| 512 | damagepart.Name = "DamagePart" | |
| 513 | damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0) | |
| 514 | local g = Instance.new("BillboardGui", damagepart)
| |
| 515 | g.Enabled = true | |
| 516 | g.Adornee = damagepart | |
| 517 | g.Size = UDim2.new(5, 0, 5, 0) | |
| 518 | g.ExtentsOffset = Vector3.new(0, 0, 0) | |
| 519 | g.StudsOffset = Vector3.new(0, 0, 0) | |
| 520 | local t = Instance.new("TextLabel", g)
| |
| 521 | t.BackgroundTransparency = 1 | |
| 522 | t.Font = "ArialBold" | |
| 523 | t.TextSize = 24 | |
| 524 | t.Text = "-" .. round(damage) | |
| 525 | if round(damage) % 1 == 0 then | |
| 526 | t.Text = "-" .. round(damage) .. ".0" | |
| 527 | end | |
| 528 | t.Size = UDim2.new(1, 0, 1, 0) | |
| 529 | t.TextStrokeTransparency = 0 | |
| 530 | t.TextTransparency = 0 | |
| 531 | t.TextScaled = true | |
| 532 | t.TextWrapped = true | |
| 533 | t.TextXAlignment = "Center" | |
| 534 | t.TextYAlignment = "Center" | |
| 535 | t.TextColor3 = colour | |
| 536 | coroutine.resume(coroutine.create(function() | |
| 537 | for i = 1, 50 do | |
| 538 | game:GetService("RunService").Heartbeat:wait()
| |
| 539 | local sinewave = math.sin(i / 500) * 4 | |
| 540 | damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0)) | |
| 541 | t.TextTransparency = t.TextTransparency + 0.02 | |
| 542 | t.TextStrokeTransparency = t.TextTransparency + 0.02 | |
| 543 | end | |
| 544 | damagepart:Destroy() | |
| 545 | end), t) | |
| 546 | end | |
| 547 | --xdddddddddddd | |
| 548 | function keyDown(key, clientinput) | |
| 549 | if clientinput then | |
| 550 | return | |
| 551 | end | |
| 552 | if not humanoid or not torso or humanoid.Health <= 0 then | |
| 553 | return | |
| 554 | end | |
| 555 | if attacking.Value == true then | |
| 556 | return | |
| 557 | end | |
| 558 | if key.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 559 | if click1db then | |
| 560 | return | |
| 561 | end | |
| 562 | local attack = ComboAttacks[counter] | |
| 563 | currentattack = attack | |
| 564 | if attack == "Combo1" then | |
| 565 | attacking.Value = true | |
| 566 | do | |
| 567 | local p = createBlockPart() | |
| 568 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 569 | p.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 570 | p.Transparency = 0.4 | |
| 571 | p.Parent = Effects | |
| 572 | local p2 = createBlockPart() | |
| 573 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 574 | p2.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 575 | p2.Transparency = 0.6 | |
| 576 | p2.Parent = Effects | |
| 577 | for i = 0, 1.1, 0.05 do | |
| 578 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(5), 0, math.rad(90)), 0.14) | |
| 579 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-90)), 0.14) | |
| 580 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(0)), 0.14) | |
| 581 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-60), 0, 0), 0.14) | |
| 582 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, -math.rad(45)), 0.14) | |
| 583 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 584 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 585 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 586 | swait() | |
| 587 | end | |
| 588 | for i = 0, 0.8, 0.05 do | |
| 589 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.16) | |
| 590 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(80)), 0.16) | |
| 591 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(0)), 0.16) | |
| 592 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, math.rad(35)), 0.16) | |
| 593 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(60)), 0.16) | |
| 594 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.16) | |
| 595 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 596 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 597 | if i > 0 and i < 0.1 then | |
| 598 | thread(function() | |
| 599 | sound(300915947, char.Head, 0.5, 4, 1) | |
| 600 | for i = 1, 2 do | |
| 601 | do | |
| 602 | local s, smesh = createSpherePart() | |
| 603 | s.Transparency = 0.2 | |
| 604 | thread(function() | |
| 605 | for i = 1, 18 do | |
| 606 | wait() | |
| 607 | local sinewave = 100 * math.asin(i / 100) | |
| 608 | smesh.Scale = smesh.Scale + Vector3.new(sinewave * 0.05, sinewave * 0.05, sinewave * 0.05) | |
| 609 | s.CFrame = p.CFrame | |
| 610 | s.Transparency = s.Transparency + 0.044444444444444446 | |
| 611 | end | |
| 612 | s:Destroy() | |
| 613 | end) | |
| 614 | wait(0.05) | |
| 615 | end | |
| 616 | end | |
| 617 | end) | |
| 618 | thread(function() | |
| 619 | wait(0.1) | |
| 620 | local closeHumanoids = findCloseHumanoid(p.Position, 7) | |
| 621 | for _, vhum in pairs(closeHumanoids) do | |
| 622 | if Mode ~= "Positive" or not Color3.fromRGB(255, 255, 255) then | |
| 623 | end | |
| 624 | basicDamage(vhum, Stab1Dam, (Color3.fromRGB(0, 0, 0))) | |
| 625 | if vhum.Parent:findFirstChild("Torso") then
| |
| 626 | do | |
| 627 | local vtors = vhum.Parent.Torso | |
| 628 | local bv = createBodyVelocity(vtors) | |
| 629 | bv.Velocity = (vtors.Position - torso.Position).unit * (Mode == "Negative" and -4 or 10) + Vector3.new(0, 2, 0) | |
| 630 | delay(0.5, function() | |
| 631 | bv:Destroy() | |
| 632 | end) | |
| 633 | end | |
| 634 | end | |
| 635 | end | |
| 636 | end) | |
| 637 | end | |
| 638 | swait() | |
| 639 | end | |
| 640 | thread(function() | |
| 641 | for i = 1, 10 do | |
| 642 | wait() | |
| 643 | p.Transparency = p.Transparency + 0.06 | |
| 644 | p2.Transparency = p.Transparency + 0.04 | |
| 645 | end | |
| 646 | p:Destroy() | |
| 647 | p2:Destroy() | |
| 648 | end) | |
| 649 | wait(0.1) | |
| 650 | attacking.Value = false | |
| 651 | end | |
| 652 | end | |
| 653 | if attack == "Combo2" then | |
| 654 | attacking.Value = true | |
| 655 | do | |
| 656 | local p = createBlockPart() | |
| 657 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 658 | p.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 659 | p.Transparency = 0.4 | |
| 660 | p.Parent = Effects | |
| 661 | local p2 = createBlockPart() | |
| 662 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 663 | p2.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 664 | p2.Transparency = 0.6 | |
| 665 | p2.Parent = Effects | |
| 666 | for i = 0, 1.1, 0.05 do | |
| 667 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(5), 0, math.rad(-90)), 0.14) | |
| 668 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(90)), 0.14) | |
| 669 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(45)), 0.14) | |
| 670 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 671 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(60), 0, 0), 0.14) | |
| 672 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 673 | p.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 674 | p2.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 675 | swait() | |
| 676 | end | |
| 677 | for i = 0, 0.8, 0.05 do | |
| 678 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(5), 0, math.rad(80)), 0.16) | |
| 679 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-80)), 0.16) | |
| 680 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-60)), 0.16) | |
| 681 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.16) | |
| 682 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0), 0.16) | |
| 683 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, math.rad(-35)), 0.16) | |
| 684 | p.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 685 | p2.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 686 | if i > 0 and i < 0.1 then | |
| 687 | thread(function() | |
| 688 | sound(300915983, char.Head, 0.5, 4, 1) | |
| 689 | for i = 1, 2 do | |
| 690 | do | |
| 691 | local s, smesh = createSpherePart() | |
| 692 | s.Transparency = 0.2 | |
| 693 | thread(function() | |
| 694 | for i = 1, 18 do | |
| 695 | wait() | |
| 696 | local sinewave = 100 * math.asin(i / 100) | |
| 697 | smesh.Scale = smesh.Scale + Vector3.new(sinewave * 0.05, sinewave * 0.05, sinewave * 0.05) | |
| 698 | s.CFrame = p.CFrame | |
| 699 | s.Transparency = s.Transparency + 0.044444444444444446 | |
| 700 | end | |
| 701 | s:Destroy() | |
| 702 | end) | |
| 703 | wait(0.05) | |
| 704 | end | |
| 705 | end | |
| 706 | end) | |
| 707 | thread(function() | |
| 708 | wait(0.1) | |
| 709 | local closeHumanoids = findCloseHumanoid(p.Position, 7) | |
| 710 | for _, vhum in pairs(closeHumanoids) do | |
| 711 | if Mode ~= "Positive" or not Color3.fromRGB(255, 255, 255) then | |
| 712 | end | |
| 713 | basicDamage(vhum, Stab1Dam, (Color3.fromRGB(0, 0, 0))) | |
| 714 | if vhum.Parent:findFirstChild("Torso") then
| |
| 715 | do | |
| 716 | local vtors = vhum.Parent.Torso | |
| 717 | local bv = createBodyVelocity(vtors) | |
| 718 | bv.Velocity = (vtors.Position - torso.Position).unit * (Mode == "Negative" and -4 or 10) + Vector3.new(0, 2, 0) | |
| 719 | delay(0.5, function() | |
| 720 | bv:Destroy() | |
| 721 | end) | |
| 722 | end | |
| 723 | end | |
| 724 | end | |
| 725 | end) | |
| 726 | end | |
| 727 | swait() | |
| 728 | end | |
| 729 | thread(function() | |
| 730 | for i = 1, 10 do | |
| 731 | wait() | |
| 732 | p.Transparency = p.Transparency + 0.06 | |
| 733 | p2.Transparency = p.Transparency + 0.04 | |
| 734 | end | |
| 735 | p:Destroy() | |
| 736 | p2:Destroy() | |
| 737 | end) | |
| 738 | wait(0.1) | |
| 739 | attacking.Value = false | |
| 740 | end | |
| 741 | end | |
| 742 | if attack == "Combo3" then | |
| 743 | attacking.Value = true | |
| 744 | do | |
| 745 | local p = createBlockPart() | |
| 746 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 747 | p.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 748 | p.Transparency = 0.4 | |
| 749 | p.Parent = Effects | |
| 750 | local p2 = createBlockPart() | |
| 751 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 752 | p2.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 753 | p2.Transparency = 0.6 | |
| 754 | p2.Parent = Effects | |
| 755 | local p3 = createBlockPart() | |
| 756 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 757 | p3.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 758 | p3.Transparency = 0.4 | |
| 759 | p3.Parent = Effects | |
| 760 | local p4 = createBlockPart() | |
| 761 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 762 | p4.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 763 | p4.Transparency = 0.6 | |
| 764 | p4.Parent = Effects | |
| 765 | for i = 0, 1.1, 0.05 do | |
| 766 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.14) | |
| 767 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.05, 0, math.rad(0)), 0.14) | |
| 768 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(50)), 0.14) | |
| 769 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 770 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 771 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 772 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 773 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 774 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 775 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 776 | swait() | |
| 777 | end | |
| 778 | thread(function() | |
| 779 | sound(300916014, char.Head, 0.5, 4, 2) | |
| 780 | local s, smesh = createSpherePart() | |
| 781 | s.Transparency = 0.2 | |
| 782 | smesh.Scale = Vector3.new(2, 2, 2) | |
| 783 | thread(function() | |
| 784 | for i = 1, 25 do | |
| 785 | wait() | |
| 786 | local sinewave = 100 * math.asin(i / 100) | |
| 787 | smesh.Scale = smesh.Scale + Vector3.new(2 - sinewave * 0.08, 2 - sinewave * 0.08, 2 - sinewave * 0.08) | |
| 788 | s.CFrame = char.HumanoidRootPart.CFrame | |
| 789 | s.Transparency = s.Transparency + 0.032 | |
| 790 | end | |
| 791 | s:Destroy() | |
| 792 | end) | |
| 793 | wait(0.1) | |
| 794 | local closeHumanoids = findCloseHumanoid(p.Position, 12) | |
| 795 | for _, vhum in pairs(closeHumanoids) do | |
| 796 | if Mode ~= "Positive" or not Color3.fromRGB(255, 255, 255) then | |
| 797 | end | |
| 798 | basicDamage(vhum, Stab3Dam, (Color3.fromRGB(0, 0, 0))) | |
| 799 | if vhum.Parent:findFirstChild("Torso") then
| |
| 800 | do | |
| 801 | local vtors = vhum.Parent.Torso | |
| 802 | local bv = createBodyVelocity(vtors) | |
| 803 | bv.Velocity = (vtors.Position - torso.Position).unit * (Mode == "Negative" and -10 or 20) + Vector3.new(0, 4, 0) | |
| 804 | delay(0.5, function() | |
| 805 | bv:Destroy() | |
| 806 | end) | |
| 807 | end | |
| 808 | end | |
| 809 | end | |
| 810 | end) | |
| 811 | for i = 0, 1.1, 0.05 do | |
| 812 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(-5), 0, math.rad(0)), 0.14) | |
| 813 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(-0.05, 0, math.rad(0)), 0.14) | |
| 814 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.25) * CFrame.Angles(math.rad(90), 0, math.rad(-80)), 0.14) | |
| 815 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 816 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.25) * CFrame.Angles(math.rad(90), 0, math.rad(80)), 0.14) | |
| 817 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 818 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 819 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 820 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 821 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 822 | swait() | |
| 823 | end | |
| 824 | thread(function() | |
| 825 | for i = 1, 10 do | |
| 826 | wait() | |
| 827 | p.Transparency = p.Transparency + 0.06 | |
| 828 | p2.Transparency = p.Transparency + 0.04 | |
| 829 | p3.Transparency = p.Transparency + 0.06 | |
| 830 | p4.Transparency = p.Transparency + 0.04 | |
| 831 | end | |
| 832 | p:Destroy() | |
| 833 | p2:Destroy() | |
| 834 | p3:Destroy() | |
| 835 | p4:Destroy() | |
| 836 | end) | |
| 837 | wait(0.1) | |
| 838 | attacking.Value = false | |
| 839 | end | |
| 840 | end | |
| 841 | if counter <= countermax then | |
| 842 | counter = counter + 1 | |
| 843 | end | |
| 844 | if counter > countermax then | |
| 845 | counter = 1 | |
| 846 | end | |
| 847 | end | |
| 848 | if key.KeyCode == Enum.KeyCode.T then | |
| 849 | if canTaunt == false then | |
| 850 | return | |
| 851 | end | |
| 852 | if Anim ~= "Idle" then | |
| 853 | return | |
| 854 | end | |
| 855 | do | |
| 856 | local function part(formfactor, parent, reflectance, transparency, brickcolor, name, size) | |
| 857 | local fp = Instance.new("Part")
| |
| 858 | fp.formFactor = formfactor | |
| 859 | fp.Parent = parent | |
| 860 | fp.Reflectance = reflectance | |
| 861 | fp.Transparency = transparency | |
| 862 | fp.CanCollide = false | |
| 863 | fp.Locked = true | |
| 864 | fp.BrickColor = brickcolor | |
| 865 | fp.Name = name | |
| 866 | fp.Size = size | |
| 867 | fp.Position = torso.Position | |
| 868 | NoOutline(fp) | |
| 869 | fp.Material = "SmoothPlastic" | |
| 870 | fp:BreakJoints() | |
| 871 | return fp | |
| 872 | end | |
| 873 | local mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
| 874 | local mesh = Instance.new(Mesh) | |
| 875 | mesh.Parent = part | |
| 876 | if Mesh == "SpecialMesh" then | |
| 877 | mesh.MeshType = meshtype | |
| 878 | if meshid then | |
| 879 | mesh.MeshId = meshid | |
| 880 | end | |
| 881 | end | |
| 882 | if offset then | |
| 883 | mesh.Offset = offset | |
| 884 | end | |
| 885 | mesh.Scale = scale | |
| 886 | return mesh | |
| 887 | end | |
| 888 | local function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent) | |
| 889 | local prt = part(3, Effects, 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 890 | prt.Anchored = true | |
| 891 | prt.CFrame = cframe | |
| 892 | local msh = mesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 893 | return prt, msh | |
| 894 | end | |
| 895 | if taunting == true then | |
| 896 | return | |
| 897 | end | |
| 898 | if 0 >= charStats.Speed.Value then | |
| 899 | return | |
| 900 | end | |
| 901 | taunting = true | |
| 902 | attacking.Value = true | |
| 903 | charStats.Speed.Value = charStats.Speed.Value - 10 | |
| 904 | for i = 0, 1.1, 0.05 do | |
| 905 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.14) | |
| 906 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.05, 0, math.rad(0)), 0.14) | |
| 907 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(50)), 0.14) | |
| 908 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 909 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 910 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 911 | swait() | |
| 912 | end | |
| 913 | local ts = sound(300916082, char.Head, 1, 4, 0.5) | |
| 914 | local ncount = 0 | |
| 915 | for i = 0, 5, 0.05 do | |
| 916 | ts = char.Head:findFirstChild("Sound")
| |
| 917 | if not ts then | |
| 918 | return | |
| 919 | end | |
| 920 | ncount = ncount + 1 | |
| 921 | if ncount % 1 == 0 then | |
| 922 | do | |
| 923 | local mb = MagicBlock(BrickColor.new("Really black"), RootPart.CFrame * CFrame.new(math.random(-7, 7), math.random(-5, 5), math.random(-7, 7)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 2, 2, 2, 2, 2, 2, 0.05, 2, Part)
| |
| 924 | local mb2 = MagicBlock(BrickColor.new("Lily white"), RootPart.CFrame * CFrame.new(math.random(-7, 7), math.random(-5, 5), math.random(-7, 7)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 2, 2, 2, 2, 2, 2, 0.05, 2, Part)
| |
| 925 | mb.Transparency = 0.2 | |
| 926 | mb2.Transparency = 0.2 | |
| 927 | mb.Material = "Granite" | |
| 928 | mb2.Material = "Neon" | |
| 929 | thread(function() | |
| 930 | local now = mb.CFrame | |
| 931 | for i = 1, 20 do | |
| 932 | swait() | |
| 933 | mb.CFrame = clerp(mb.CFrame, char["Right Arm"].CFrame * CFrame.new(0, -0.9, 0), 0.05) | |
| 934 | mb2.CFrame = clerp(mb2.CFrame, char["Left Arm"].CFrame * CFrame.new(0, -0.9, 0), 0.05) | |
| 935 | mb.Transparency = mb.Transparency + 0.04 | |
| 936 | mb2.Transparency = mb2.Transparency + 0.04 | |
| 937 | end | |
| 938 | mb:Destroy() | |
| 939 | mb2:Destroy() | |
| 940 | end) | |
| 941 | end | |
| 942 | end | |
| 943 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(10), 0, math.rad(0)), 0.14) | |
| 944 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(-0.05, 0, math.rad(0)), 0.14) | |
| 945 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.15) * CFrame.Angles(math.rad(90), 0, math.rad(-80)), 0.14) | |
| 946 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 947 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.15) * CFrame.Angles(math.rad(90), 0, math.rad(80)), 0.14) | |
| 948 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 949 | RH.C0 = clerp(RH.C0, CFrame.new(1, -0.98, -0.2) * CFrame.Angles(-0.2, math.rad(90), 0), 0.14) | |
| 950 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.14) | |
| 951 | swait() | |
| 952 | end | |
| 953 | for i = 0, 1.1, 0.05 do | |
| 954 | ts = char.Head.Sound | |
| 955 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.14) | |
| 956 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.05, 0, math.rad(0)), 0.14) | |
| 957 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(50)), 0.14) | |
| 958 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 959 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 960 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 961 | swait() | |
| 962 | end | |
| 963 | taunting = false | |
| 964 | attacking.Value = false | |
| 965 | charStats.Speed.Value = charStats.Speed.Value + 10 | |
| 966 | end | |
| 967 | end | |
| 968 | if key.KeyCode == Key1 then | |
| 969 | if key1db then | |
| 970 | return | |
| 971 | end | |
| 972 | if Energy.Value < Attack1Energy then | |
| 973 | return | |
| 974 | end | |
| 975 | key1db = true | |
| 976 | delay(key1re + atk1d, function() | |
| 977 | key1db = false | |
| 978 | end) | |
| 979 | coroutine.resume(coroutine.create(function() | |
| 980 | local rewinddelay = atk1d | |
| 981 | local reloaddelay = key1re | |
| 982 | Re1:TweenSize(UDim2.new(0, 0, 1, 0), "InOut", "Linear", rewinddelay) | |
| 983 | wait(rewinddelay) | |
| 984 | Re1:TweenSize(UDim2.new(1, 0, 1, 0), "InOut", "Linear", reloaddelay) | |
| 985 | end)) | |
| 986 | Energy.Value = Energy.Value - Attack1Energy | |
| 987 | attacking.Value = true | |
| 988 | if Mode == "Positive" then | |
| 989 | attacking.Value = true | |
| 990 | for i = 0, 2, 0.05 do | |
| 991 | swait() | |
| 992 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(-0.15, 0, math.rad(-20)), 0.2) | |
| 993 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(15)), 0.2) | |
| 994 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-15)), 0.2) | |
| 995 | if i < 0.2 then | |
| 996 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * CFrame.Angles(math.rad(90), 0, math.rad(15)), 0.1) | |
| 997 | else | |
| 998 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * CFrame.Angles(math.rad(175), 0, math.rad(15)), 0.1) | |
| 999 | end | |
| 1000 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
| 1001 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1002 | end | |
| 1003 | do | |
| 1004 | local bvtable = {}
| |
| 1005 | thread(function() | |
| 1006 | for i = 1, 4 do | |
| 1007 | sound(301033949, char.Head, 0.5, 4, 1) | |
| 1008 | for _, vhum in pairs(findCloseHumanoid(torso.Position, 18)) do | |
| 1009 | basicDamage(vhum, 4, Color3.fromRGB(255, 255, 255)) | |
| 1010 | end | |
| 1011 | do | |
| 1012 | local s, smesh = createSpherePart() | |
| 1013 | s.Transparency = 0.2 | |
| 1014 | thread(function() | |
| 1015 | for i = 1, 25 do | |
| 1016 | wait() | |
| 1017 | local sinewave = 100 * math.asin(i / 100) | |
| 1018 | smesh.Scale = smesh.Scale + Vector3.new(2 - sinewave * 0.1, 2 - sinewave * 0.1, 2 - sinewave * 0.1) | |
| 1019 | s.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1020 | s.Transparency = s.Transparency + 0.0404 | |
| 1021 | end | |
| 1022 | s:Destroy() | |
| 1023 | end) | |
| 1024 | wait(0.25) | |
| 1025 | end | |
| 1026 | end | |
| 1027 | end) | |
| 1028 | for i = 1, 13 do | |
| 1029 | wait(0.1) | |
| 1030 | for _, vhum in pairs(findCloseHumanoid(torso.Position, 16)) do | |
| 1031 | thread(function() | |
| 1032 | if not vhum.Parent.Torso:findFirstChild("UpVelocity" .. char.Name) then
| |
| 1033 | local vtors = vhum.Parent.Torso | |
| 1034 | local bv = createBodyVelocity(vtors) | |
| 1035 | bv.Name = "UpVelocity" .. char.Name | |
| 1036 | bv.Velocity = Vector3.new(0, 4, 0) | |
| 1037 | table.insert(bvtable, bv) | |
| 1038 | end | |
| 1039 | end) | |
| 1040 | end | |
| 1041 | end | |
| 1042 | for _, v in pairs(bvtable) do | |
| 1043 | v:Destroy() | |
| 1044 | end | |
| 1045 | for i = 0, 1, 0.05 do | |
| 1046 | swait() | |
| 1047 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0, 0, math.rad(0)), 0.2) | |
| 1048 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(0)), 0.2) | |
| 1049 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2) | |
| 1050 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.1) | |
| 1051 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
| 1052 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1053 | end | |
| 1054 | attacking.Value = false | |
| 1055 | end | |
| 1056 | elseif Mode == "Negative" then | |
| 1057 | attacking.Value = true | |
| 1058 | for i = 0, 1.5, 0.05 do | |
| 1059 | swait() | |
| 1060 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0.2, 0, math.rad(0)), 0.2) | |
| 1061 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(0)), 0.2) | |
| 1062 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-20)), 0.2) | |
| 1063 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(20)), 0.2) | |
| 1064 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
| 1065 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1066 | end | |
| 1067 | do | |
| 1068 | local bvtable = {}
| |
| 1069 | thread(function() | |
| 1070 | for i = 1, 4 do | |
| 1071 | sound(301033949, char.Head, 0.5, 4, 1) | |
| 1072 | for _, vhum in pairs(findCloseHumanoid(torso.Position, 18)) do | |
| 1073 | basicDamage(vhum, 4, Color3.fromRGB(0, 0, 0)) | |
| 1074 | end | |
| 1075 | do | |
| 1076 | local s, smesh = createSpherePart() | |
| 1077 | s.Transparency = 0.2 | |
| 1078 | s.BrickColor = BrickColor.new() | |
| 1079 | thread(function() | |
| 1080 | for i = 1, 25 do | |
| 1081 | wait() | |
| 1082 | local sinewave = 100 * math.asin(i / 100) | |
| 1083 | smesh.Scale = smesh.Scale + Vector3.new(2 - sinewave * 0.1, 2 - sinewave * 0.1, 2 - sinewave * 0.1) | |
| 1084 | s.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.3, 0) | |
| 1085 | s.Transparency = s.Transparency + 0.0404 | |
| 1086 | end | |
| 1087 | s:Destroy() | |
| 1088 | end) | |
| 1089 | wait(0.25) | |
| 1090 | end | |
| 1091 | end | |
| 1092 | end) | |
| 1093 | for i = 1, 13 do | |
| 1094 | wait(0.1) | |
| 1095 | for _, vhum in pairs(findCloseHumanoid(torso.Position, 16)) do | |
| 1096 | thread(function() | |
| 1097 | if not vhum.Parent.Torso:findFirstChild("DownVelocity" .. char.Name) then
| |
| 1098 | local vtors = vhum.Parent.Torso | |
| 1099 | local bv = createBodyVelocity(vtors) | |
| 1100 | bv.Name = "DownVelocity" .. char.Name | |
| 1101 | bv.Velocity = Vector3.new(0, -2, 0) | |
| 1102 | table.insert(bvtable, bv) | |
| 1103 | end | |
| 1104 | end) | |
| 1105 | end | |
| 1106 | end | |
| 1107 | for i, v in pairs(bvtable) do | |
| 1108 | v:Destroy() | |
| 1109 | end | |
| 1110 | attacking.Value = false | |
| 1111 | end | |
| 1112 | end | |
| 1113 | end | |
| 1114 | if key.KeyCode == Key2 then | |
| 1115 | if key2db then | |
| 1116 | return | |
| 1117 | end | |
| 1118 | if Energy.Value < Attack2Energy then | |
| 1119 | return | |
| 1120 | end | |
| 1121 | key2db = true | |
| 1122 | delay(key2re + atk2d, function() | |
| 1123 | key2db = false | |
| 1124 | end) | |
| 1125 | coroutine.resume(coroutine.create(function() | |
| 1126 | local rewinddelay = atk2d | |
| 1127 | local reloaddelay = key2re | |
| 1128 | Re2:TweenSize(UDim2.new(0, 0, 1, 0), "InOut", "Linear", rewinddelay) | |
| 1129 | wait(rewinddelay) | |
| 1130 | Re2:TweenSize(UDim2.new(1, 0, 1, 0), "InOut", "Linear", reloaddelay) | |
| 1131 | end)) | |
| 1132 | Energy.Value = Energy.Value - Attack2Energy | |
| 1133 | if Mode == "Positive" then | |
| 1134 | attacking.Value = true | |
| 1135 | for i = 0, 1.5, 0.05 do | |
| 1136 | swait() | |
| 1137 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0, 0, math.rad(80)), 0.12) | |
| 1138 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-80)), 0.12) | |
| 1139 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.4) * CFrame.Angles(math.rad(90), 0, math.rad(45)), 0.14) | |
| 1140 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1141 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.25) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 1142 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1143 | end | |
| 1144 | do | |
| 1145 | local bvtable = {}
| |
| 1146 | sound(301031757, char.Head, 0.5, 8, 1) | |
| 1147 | local pushpart = createBlockPart() | |
| 1148 | pushpart.Anchored = false | |
| 1149 | pushpart.Size = Vector3.new(30, 0.65, 30) | |
| 1150 | pushpart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) * CFrame.Angles(math.rad(90), 0, 0) | |
| 1151 | local pushmesh = Instance.new("CylinderMesh", pushpart)
| |
| 1152 | local pushbv = createBodyVelocity(pushpart) | |
| 1153 | local prevvector = char.HumanoidRootPart.CFrame.lookVector | |
| 1154 | thread(function() | |
| 1155 | for i = 1, 30 do | |
| 1156 | wait() | |
| 1157 | local sinewave = math.sin(i / 45) * 60 | |
| 1158 | pushbv.Velocity = prevvector * (40 - sinewave) | |
| 1159 | end | |
| 1160 | end) | |
| 1161 | thread(function() | |
| 1162 | wait(0.2) | |
| 1163 | for i = 1, 30 do | |
| 1164 | wait() | |
| 1165 | pushpart.Transparency = pushpart.Transparency + 0.030000000000000002 | |
| 1166 | end | |
| 1167 | pushpart:Destroy() | |
| 1168 | for _, v in pairs(bvtable) do | |
| 1169 | v:Destroy() | |
| 1170 | end | |
| 1171 | end) | |
| 1172 | pushpart.Touched:connect(function(hit) | |
| 1173 | if hit.Parent == char then | |
| 1174 | return | |
| 1175 | end | |
| 1176 | if hit.Parent:findFirstChild("Humanoid") and hit.Parent:findFirstChild("Torso") then
| |
| 1177 | if hit.Parent.Torso:findFirstChild("PushVelocity" .. char.Name) then
| |
| 1178 | return | |
| 1179 | end | |
| 1180 | local vhum = hit.Parent.Humanoid | |
| 1181 | local vtors = hit.Parent.Torso | |
| 1182 | basicDamage(vhum, Attack2Damage, Color3.new(255, 255, 255)) | |
| 1183 | local bv = createBodyVelocity(vtors) | |
| 1184 | bv.Name = "PushVelocity" .. char.Name | |
| 1185 | bv.Velocity = pushpart.BodyVelocity.Velocity | |
| 1186 | game.Debris:AddItem(bv, 2.5) | |
| 1187 | table.insert(bvtable, bv) | |
| 1188 | end | |
| 1189 | end) | |
| 1190 | for i = 0, 1.5, 0.05 do | |
| 1191 | swait() | |
| 1192 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0, 0, math.rad(-80)), 0.14) | |
| 1193 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(80)), 0.14) | |
| 1194 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.25) * CFrame.Angles(math.rad(90), 0, math.rad(-80)), 0.14) | |
| 1195 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1196 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.25) * CFrame.Angles(math.rad(90), 0, math.rad(80)), 0.14) | |
| 1197 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1198 | end | |
| 1199 | attacking.Value = false | |
| 1200 | end | |
| 1201 | elseif Mode == "Negative" then | |
| 1202 | attacking.Value = true | |
| 1203 | local hyperdrive = false | |
| 1204 | charStats.Speed.Value = charStats.Speed.Value - 1 | |
| 1205 | for i = 0, 1.3, 0.05 + (hyperdrive == true and 0.05 or 0) do | |
| 1206 | swait() | |
| 1207 | Neck.C0 = clerp(Neck.C0, necko * euler(math.rad(23), 0, 0), 0.13 + (true == true and 0.1 or 0)) | |
| 1208 | Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1209 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2 + (hyperdrive == true and 0.1 or 0)) | |
| 1210 | RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-math.rad(17), 0, math.rad(12)), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1211 | RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1212 | LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-math.rad(17), 0, -math.rad(12)), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1213 | LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1214 | RH.C0 = clerp(RH.C0, cf(1, -1, -0.5) * euler(0, math.rad(90), math.rad(-25)) * cf(0, 0.7, 0), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1215 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-math.rad(0), -math.rad(90), 0), 0.2 + (hyperdrive == true and 0.1 or 0)) | |
| 1216 | end | |
| 1217 | for i = 0, 1, 0.05 + (hyperdrive == true and 0.05 or 0) do | |
| 1218 | swait() | |
| 1219 | Neck.C0 = clerp(Neck.C0, necko * euler(math.rad(23), 0, 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1220 | Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.13 + (hyperdrive == true and 0.1 or 0)) | |
| 1221 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0.2, 0, 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1222 | RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-math.rad(17), 0, math.rad(12)), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1223 | RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1224 | LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-math.rad(17), 0, -math.rad(12)), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1225 | LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1226 | RH.C0 = clerp(RH.C0, cf(1, -1, -0.5) * euler(0, math.rad(90), math.rad(15)) * cf(0, -0.1, 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1227 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-math.rad(0), -math.rad(90), 0), 0.15 + (hyperdrive == true and 0.1 or 0)) | |
| 1228 | end | |
| 1229 | for i = 1, 3 do | |
| 1230 | sound(300916105, char.Head, 0.5, 12, 1) | |
| 1231 | do | |
| 1232 | local sphere, spherem = createSpherePart() | |
| 1233 | sphere.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, -18 * i) | |
| 1234 | sphere.Transparency = 0.1 | |
| 1235 | spherem.Scale = Vector3.new(3, 8, 3) | |
| 1236 | local cnow = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, -18 * i) | |
| 1237 | for _, vhum in pairs(findCloseHumanoid(sphere.Position, 18)) do | |
| 1238 | basicDamage(vhum, 12, Color3.fromRGB(0, 0, 0)) | |
| 1239 | do | |
| 1240 | local vtors = vhum.Parent.Torso | |
| 1241 | local bv = createBodyVelocity(vtors) | |
| 1242 | bv.Name = "UpVelocity" .. char.Name | |
| 1243 | bv.Velocity = (vtors.Position - sphere.Position).unit * -5 + Vector3.new(0, 5, 0) | |
| 1244 | thread(function() | |
| 1245 | wait(0.5) | |
| 1246 | bv:Destroy() | |
| 1247 | end) | |
| 1248 | end | |
| 1249 | end | |
| 1250 | thread(function() | |
| 1251 | for i = 1, 15 do | |
| 1252 | wait() | |
| 1253 | local sinewave = 3 - math.sin(i / 45) * 5 | |
| 1254 | spherem.Scale = spherem.Scale + Vector3.new(0, sinewave, 0) | |
| 1255 | sphere.CFrame = cnow | |
| 1256 | end | |
| 1257 | for i = 1, 15 do | |
| 1258 | wait() | |
| 1259 | sphere.Transparency = sphere.Transparency + 0.060000000000000005 | |
| 1260 | end | |
| 1261 | end) | |
| 1262 | local pulse, pulsem = createPulsePart() | |
| 1263 | pulse.CFrame = sphere.CFrame * CFrame.Angles(math.rad(90), 0, 0) | |
| 1264 | pulse.BrickColor = BrickColor.new("Really black")
| |
| 1265 | local cnow = sphere.CFrame * CFrame.Angles(math.rad(90), 0, 0) | |
| 1266 | thread(function() | |
| 1267 | for i = 1, 30 do | |
| 1268 | wait() | |
| 1269 | local sinewave = 2.5 - math.sin(i / 45) * 4 | |
| 1270 | pulsem.Scale = pulsem.Scale + Vector3.new(sinewave, sinewave, 0) | |
| 1271 | pulse.Transparency = pulse.Transparency + 0.030000000000000002 | |
| 1272 | pulse.CFrame = cnow | |
| 1273 | end | |
| 1274 | pulse:Destroy() | |
| 1275 | end) | |
| 1276 | wait(0.2) | |
| 1277 | end | |
| 1278 | end | |
| 1279 | charStats.Speed.Value = charStats.Speed.Value + 1 | |
| 1280 | attacking.Value = false | |
| 1281 | end | |
| 1282 | end | |
| 1283 | if key.KeyCode == Key3 then | |
| 1284 | if key3db then | |
| 1285 | return | |
| 1286 | end | |
| 1287 | if Energy.Value < Attack3Energy then | |
| 1288 | return | |
| 1289 | end | |
| 1290 | key3db = true | |
| 1291 | delay(key3re + atk3d, function() | |
| 1292 | key3db = false | |
| 1293 | end) | |
| 1294 | coroutine.resume(coroutine.create(function() | |
| 1295 | local rewinddelay = atk3d | |
| 1296 | local reloaddelay = key3re | |
| 1297 | Re3:TweenSize(UDim2.new(0, 0, 1, 0), "InOut", "Linear", rewinddelay) | |
| 1298 | wait(rewinddelay) | |
| 1299 | Re3:TweenSize(UDim2.new(1, 0, 1, 0), "InOut", "Linear", reloaddelay) | |
| 1300 | end)) | |
| 1301 | Energy.Value = Energy.Value - Attack3Energy | |
| 1302 | if Mode == "Positive" then | |
| 1303 | attacking.Value = true | |
| 1304 | do | |
| 1305 | local p = createBlockPart() | |
| 1306 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1307 | p.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 1308 | p.Transparency = 0.4 | |
| 1309 | p.Parent = Effects | |
| 1310 | local p2 = createBlockPart() | |
| 1311 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1312 | p2.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 1313 | p2.Transparency = 0.6 | |
| 1314 | p2.Parent = Effects | |
| 1315 | local p3 = createBlockPart() | |
| 1316 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1317 | p3.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 1318 | p3.Transparency = 0.4 | |
| 1319 | p3.Parent = Effects | |
| 1320 | local p4 = createBlockPart() | |
| 1321 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1322 | p4.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 1323 | p4.Transparency = 0.6 | |
| 1324 | p4.Parent = Effects | |
| 1325 | for i = 0, 1.1, 0.05 do | |
| 1326 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.14) | |
| 1327 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.05, 0, math.rad(0)), 0.14) | |
| 1328 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(50)), 0.14) | |
| 1329 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1330 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 1331 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1332 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1333 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1334 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1335 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1336 | swait() | |
| 1337 | end | |
| 1338 | local pulses = -1 | |
| 1339 | for i = 1, 3 do | |
| 1340 | sound(301033949, char.Head, 0.5, 4, 1) | |
| 1341 | pulses = pulses + 1 | |
| 1342 | do | |
| 1343 | local pulse, pulsem = createPulsePart() | |
| 1344 | pulse.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0) | |
| 1345 | thread(function() | |
| 1346 | for i = 1, 30 do | |
| 1347 | wait() | |
| 1348 | local sinewave = 2 - math.sin(i / 45) * 3 | |
| 1349 | pulse.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0) | |
| 1350 | pulsem.Scale = pulsem.Scale + Vector3.new(sinewave, sinewave, 0) | |
| 1351 | pulse.Transparency = pulse.Transparency + 0.030000000000000002 | |
| 1352 | end | |
| 1353 | pulse:Destroy() | |
| 1354 | end) | |
| 1355 | local s, smesh = createSpherePart() | |
| 1356 | s.Transparency = 0.2 | |
| 1357 | thread(function() | |
| 1358 | for i = 1, 25 do | |
| 1359 | wait() | |
| 1360 | local sinewave = 8 - 100 * math.asin(i / 100) * 0.8 | |
| 1361 | if pulses == 3 then | |
| 1362 | sinewave = 10 - 100 * math.asin(i / 100) * 0.8 | |
| 1363 | end | |
| 1364 | smesh.Scale = smesh.Scale + Vector3.new(sinewave, sinewave, sinewave) | |
| 1365 | s.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) | |
| 1366 | s.Transparency = s.Transparency + 0.04 | |
| 1367 | end | |
| 1368 | s:Destroy() | |
| 1369 | end) | |
| 1370 | local closeHumanoids = findCloseHumanoid(pulse.Position, pulses == 3 and 40 or 25) | |
| 1371 | for _, vhum in pairs(closeHumanoids) do | |
| 1372 | basicDamage(vhum, pulses == 3 and 12 or 8, Color3.fromRGB(255, 255, 255)) | |
| 1373 | if vhum.Parent:findFirstChild("Torso") then
| |
| 1374 | do | |
| 1375 | local vtors = vhum.Parent.Torso | |
| 1376 | local bv = createBodyVelocity(vtors) | |
| 1377 | bv.Velocity = (vtors.Position - torso.Position).unit * ((pulses == 3 and 35 or 30) - (vtors.Position - torso.Position).magnitude) + Vector3.new(0, 7, 0) | |
| 1378 | delay(0.5, function() | |
| 1379 | bv:Destroy() | |
| 1380 | end) | |
| 1381 | end | |
| 1382 | end | |
| 1383 | end | |
| 1384 | for i = 0, 2.1, 0.05 do | |
| 1385 | swait() | |
| 1386 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0.1, 0, math.rad(0)), 0.14) | |
| 1387 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(0)), 0.14) | |
| 1388 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-95)), 0.08) | |
| 1389 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1390 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(95)), 0.08) | |
| 1391 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1392 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1393 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1394 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1395 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1396 | end | |
| 1397 | end | |
| 1398 | end | |
| 1399 | thread(function() | |
| 1400 | for i = 1, 10 do | |
| 1401 | wait() | |
| 1402 | p.Transparency = p.Transparency + 0.06 | |
| 1403 | p2.Transparency = p.Transparency + 0.04 | |
| 1404 | p3.Transparency = p.Transparency + 0.06 | |
| 1405 | p4.Transparency = p.Transparency + 0.04 | |
| 1406 | end | |
| 1407 | p:Destroy() | |
| 1408 | p2:Destroy() | |
| 1409 | p3:Destroy() | |
| 1410 | p4:Destroy() | |
| 1411 | end) | |
| 1412 | end | |
| 1413 | elseif Mode == "Negative" then | |
| 1414 | attacking.Value = true | |
| 1415 | do | |
| 1416 | local p = createBlockPart() | |
| 1417 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1418 | p.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 1419 | p.Transparency = 0.4 | |
| 1420 | p.Parent = Effects | |
| 1421 | local p2 = createBlockPart() | |
| 1422 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1423 | p2.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 1424 | p2.Transparency = 0.6 | |
| 1425 | p2.Parent = Effects | |
| 1426 | local p3 = createBlockPart() | |
| 1427 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1428 | p3.Size = Vector3.new(1.25, 1.25, 1.25) | |
| 1429 | p3.Transparency = 0.4 | |
| 1430 | p3.Parent = Effects | |
| 1431 | local p4 = createBlockPart() | |
| 1432 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) | |
| 1433 | p4.Size = Vector3.new(1.75, 1.75, 1.75) | |
| 1434 | p4.Transparency = 0.6 | |
| 1435 | p4.Parent = Effects | |
| 1436 | p.BrickColor = BrickColor.new("Really black")
| |
| 1437 | p2.BrickColor = BrickColor.new("Really black")
| |
| 1438 | p3.BrickColor = BrickColor.new("Really black")
| |
| 1439 | p4.BrickColor = BrickColor.new("Really black")
| |
| 1440 | for i = 0, 1.1, 0.05 do | |
| 1441 | swait() | |
| 1442 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(0.1, 0, math.rad(0)), 0.14) | |
| 1443 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(0)), 0.14) | |
| 1444 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-95)), 0.14) | |
| 1445 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1446 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(95)), 0.14) | |
| 1447 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1448 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1449 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1450 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1451 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1452 | end | |
| 1453 | local pulses = -1 | |
| 1454 | for i = 1, 3 do | |
| 1455 | sound(301033949, char.Head, 0.5, 4, 1) | |
| 1456 | pulses = pulses + 1 | |
| 1457 | do | |
| 1458 | local pulse, pulsem = createPulsePart() | |
| 1459 | pulse.BrickColor = BrickColor.new("Really black")
| |
| 1460 | pulse.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0) | |
| 1461 | thread(function() | |
| 1462 | for i = 1, 30 do | |
| 1463 | wait() | |
| 1464 | local sinewave = 2 - math.sin(i / 45) * 3 | |
| 1465 | pulse.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0) | |
| 1466 | pulsem.Scale = pulsem.Scale + Vector3.new(sinewave, sinewave, 0) | |
| 1467 | pulse.Transparency = pulse.Transparency + 0.030000000000000002 | |
| 1468 | end | |
| 1469 | pulse:Destroy() | |
| 1470 | end) | |
| 1471 | local s, smesh = createSpherePart() | |
| 1472 | s.Transparency = 0.2 | |
| 1473 | thread(function() | |
| 1474 | for i = 1, 25 do | |
| 1475 | wait() | |
| 1476 | local sinewave = 8 - 100 * math.asin(i / 100) * 0.8 | |
| 1477 | if pulses == 3 then | |
| 1478 | sinewave = 10 - 100 * math.asin(i / 100) * 0.8 | |
| 1479 | end | |
| 1480 | smesh.Scale = smesh.Scale + Vector3.new(sinewave, sinewave, sinewave) | |
| 1481 | s.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, 0) | |
| 1482 | s.Transparency = s.Transparency + 0.04 | |
| 1483 | end | |
| 1484 | s:Destroy() | |
| 1485 | end) | |
| 1486 | local closeHumanoids = findCloseHumanoid(pulse.Position, pulses == 3 and 40 or 25) | |
| 1487 | for _, vhum in pairs(closeHumanoids) do | |
| 1488 | basicDamage(vhum, pulses == 3 and 12 or 8, Color3.fromRGB(0, 0, 0)) | |
| 1489 | if vhum.Parent:findFirstChild("Torso") then
| |
| 1490 | do | |
| 1491 | local vtors = vhum.Parent.Torso | |
| 1492 | local bv = createBodyVelocity(vtors) | |
| 1493 | bv.Velocity = -(vtors.Position - torso.Position).unit * ((pulses == 3 and 35 or 30) - (vtors.Position - torso.Position).magnitude) + Vector3.new(0, 0, 0) | |
| 1494 | delay(0.5, function() | |
| 1495 | bv:Destroy() | |
| 1496 | end) | |
| 1497 | end | |
| 1498 | end | |
| 1499 | end | |
| 1500 | for i = 0, 2.1, 0.05 do | |
| 1501 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.14) | |
| 1502 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.05, 0, math.rad(0)), 0.14) | |
| 1503 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(50)), 0.14) | |
| 1504 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0), 0.14) | |
| 1505 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.5) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.14) | |
| 1506 | RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.14) | |
| 1507 | p.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1508 | p2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1509 | p3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1510 | p4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, -1.3, 0) * randomangles() | |
| 1511 | swait() | |
| 1512 | end | |
| 1513 | end | |
| 1514 | end | |
| 1515 | thread(function() | |
| 1516 | for i = 1, 10 do | |
| 1517 | wait() | |
| 1518 | p.Transparency = p.Transparency + 0.06 | |
| 1519 | p2.Transparency = p.Transparency + 0.04 | |
| 1520 | p3.Transparency = p.Transparency + 0.06 | |
| 1521 | p4.Transparency = p.Transparency + 0.04 | |
| 1522 | end | |
| 1523 | p:Destroy() | |
| 1524 | p2:Destroy() | |
| 1525 | p3:Destroy() | |
| 1526 | p4:Destroy() | |
| 1527 | end) | |
| 1528 | end | |
| 1529 | end | |
| 1530 | attacking.Value = false | |
| 1531 | end | |
| 1532 | if key.KeyCode == Key4 then | |
| 1533 | if key4db then | |
| 1534 | return | |
| 1535 | end | |
| 1536 | if Energy.Value < Attack4Energy then | |
| 1537 | return | |
| 1538 | end | |
| 1539 | Energy.Value = Energy.Value - Attack4Energy | |
| 1540 | key4db = true | |
| 1541 | delay(key4re, function() | |
| 1542 | key4db = false | |
| 1543 | end) | |
| 1544 | coroutine.resume(coroutine.create(function() | |
| 1545 | local rewinddelay = 0.5 | |
| 1546 | local reloaddelay = key4re | |
| 1547 | Re4:TweenSize(UDim2.new(0, 0, 1, 0), "InOut", "Linear", rewinddelay) | |
| 1548 | wait(rewinddelay) | |
| 1549 | Re4:TweenSize(UDim2.new(1, 0, 1, 0), "InOut", "Linear", reloaddelay) | |
| 1550 | end)) | |
| 1551 | attacking.Value = true | |
| 1552 | delay(0.5, function() | |
| 1553 | attacking.Value = false | |
| 1554 | end) | |
| 1555 | do | |
| 1556 | local boom = Instance.new("Part", Effects)
| |
| 1557 | boom.BrickColor = BrickColor.new(Mode == "Positive" and "Really black" or "Lily white") | |
| 1558 | boom.Material = Mode == "Positive" and "Granite" or "Neon" | |
| 1559 | boom.Transparency = 0.2 | |
| 1560 | boom.Anchored = true | |
| 1561 | boom.CanCollide = false | |
| 1562 | boom.Shape = "Ball" | |
| 1563 | boom.Size = Vector3.new(8, 8, 8) | |
| 1564 | boom.CFrame = char.HumanoidRootPart.CFrame | |
| 1565 | thread(function() | |
| 1566 | for i = 1, 30 do | |
| 1567 | wait() | |
| 1568 | boom.Size = boom.Size + Vector3.new(0.2, 0.2, 0.2) | |
| 1569 | boom.CFrame = char.HumanoidRootPart.CFrame | |
| 1570 | boom.Transparency = boom.Transparency + 0.02666666666666667 | |
| 1571 | end | |
| 1572 | boom:Destroy() | |
| 1573 | end) | |
| 1574 | local pulse = Instance.new("Part", Effects)
| |
| 1575 | pulse.BrickColor = BrickColor.new(Mode == "Positive" and "Really black" or "Lily white") | |
| 1576 | pulse.Material = Mode == "Positive" and "Granite" or "Neon" | |
| 1577 | pulse.Transparency = 0.1 | |
| 1578 | pulse.Anchored = true | |
| 1579 | pulse.CanCollide = false | |
| 1580 | pulse.Size = Vector3.new(5, 5, 0.2) | |
| 1581 | pulse.CFrame = boom.CFrame * CFrame.Angles(math.rad(90), 0, 0) | |
| 1582 | local now = pulse.CFrame | |
| 1583 | local pulsem = Instance.new("SpecialMesh", pulse)
| |
| 1584 | pulsem.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1585 | pulsem.Scale = Vector3.new(10, 10, 0.2) | |
| 1586 | thread(function() | |
| 1587 | for i = 1, 30 do | |
| 1588 | wait() | |
| 1589 | pulsem.Scale = pulsem.Scale + Vector3.new(0.3, 0.3, 0) | |
| 1590 | pulse.CFrame = boom.CFrame * CFrame.Angles(math.rad(90), 0, 0) | |
| 1591 | pulse.Transparency = pulse.Transparency + 0.030000000000000002 | |
| 1592 | end | |
| 1593 | pulse:Destroy() | |
| 1594 | end) | |
| 1595 | sound(300916105, char.Head, 0.5, 12, 1) | |
| 1596 | if Mode == "Positive" then | |
| 1597 | Mode = "Negative" | |
| 1598 | Atk1.AttackLabel.Text = NegAtk1 | |
| 1599 | Atk2.AttackLabel.Text = NegAtk2 | |
| 1600 | Atk3.AttackLabel.Text = NegAtk3 | |
| 1601 | Atk4.AttackLabel.Text = NegAtk4 | |
| 1602 | Atk1.AttackLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1603 | Atk1.EnergyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1604 | Atk1.KeyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1605 | Atk1.Reload.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1606 | Atk1.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1607 | Atk2.AttackLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1608 | Atk2.EnergyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1609 | Atk2.KeyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1610 | Atk2.Reload.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1611 | Atk2.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1612 | Atk3.AttackLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1613 | Atk3.EnergyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1614 | Atk3.KeyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1615 | Atk3.Reload.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1616 | Atk3.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1617 | Atk4.AttackLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1618 | Atk4.EnergyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1619 | Atk4.KeyLabel.TextColor3 = Color3.new(255, 255, 255) | |
| 1620 | Atk4.Reload.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1621 | Atk4.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1622 | elseif Mode == "Negative" then | |
| 1623 | Mode = "Positive" | |
| 1624 | Atk1.AttackLabel.Text = PosAtk1 | |
| 1625 | Atk2.AttackLabel.Text = PosAtk2 | |
| 1626 | Atk3.AttackLabel.Text = PosAtk3 | |
| 1627 | Atk4.AttackLabel.Text = PosAtk4 | |
| 1628 | Atk1.AttackLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1629 | Atk1.EnergyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1630 | Atk1.KeyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1631 | Atk1.Reload.BackgroundColor3 = Color3.new(255, 255, 255) | |
| 1632 | Atk1.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1633 | Atk2.AttackLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1634 | Atk2.EnergyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1635 | Atk2.KeyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1636 | Atk2.Reload.BackgroundColor3 = Color3.new(255, 255, 255) | |
| 1637 | Atk2.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1638 | Atk3.AttackLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1639 | Atk3.EnergyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1640 | Atk3.KeyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1641 | Atk3.Reload.BackgroundColor3 = Color3.new(255, 255, 255) | |
| 1642 | Atk3.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1643 | Atk4.AttackLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1644 | Atk4.EnergyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1645 | Atk4.KeyLabel.TextColor3 = Color3.new(0, 0, 0) | |
| 1646 | Atk4.Reload.BackgroundColor3 = Color3.new(255, 255, 255) | |
| 1647 | Atk4.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 1648 | end | |
| 1649 | end | |
| 1650 | end | |
| 1651 | end | |
| 1652 | uis.InputBegan:connect(keyDown) | |
| 1653 | thread(function() | |
| 1654 | tweentick = 45 | |
| 1655 | tweenrot = 0.9 | |
| 1656 | tweenrotm = 0.15 | |
| 1657 | while true do | |
| 1658 | swait() | |
| 1659 | humanoid.WalkSpeed = ((speed.Value / 10) * 16) | |
| 1660 | sinecount = sinecount + 1 | |
| 1661 | normcount = normcount + 1 | |
| 1662 | local sinewave = math.sin(sinecount * 3 / 75) * 0.2 | |
| 1663 | local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 1664 | local hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, char) | |
| 1665 | if attacking.Value == false and taunting == false then | |
| 1666 | if 1 < RootPart.Velocity.y and hitfloor == nil then | |
| 1667 | Anim = "Jump" | |
| 1668 | canTaunt = false | |
| 1669 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1) | |
| 1670 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
| 1671 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1672 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
| 1673 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1674 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
| 1675 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2) | |
| 1676 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2) | |
| 1677 | elseif RootPart.Velocity.y < -1 and hitfloor == nil then | |
| 1678 | Anim = "Fall" | |
| 1679 | canTaunt = false | |
| 1680 | Neck.C0 = clerp(Neck.C0, necko * CFrame.Angles(math.rad(23), 0, 0), 0.2) | |
| 1681 | Neck.C1 = clerp(Neck.C1, necko2 * CFrame.Angles(0, 0, 0), 0.2) | |
| 1682 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
| 1683 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
| 1684 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1685 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
| 1686 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
| 1687 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2) | |
| 1688 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2) | |
| 1689 | elseif torvel < 1 and hitfloor ~= nil then | |
| 1690 | Anim = "Idle" | |
| 1691 | canTaunt = true | |
| 1692 | Neck.C0 = clerp(Neck.C0, necko, 0.1) | |
| 1693 | RootJoint.C0 = clerp(RootJoint.C0, RootCF, 0.1) | |
| 1694 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.new(-0.35, 0, 0.3) * CFrame.Angles(math.rad(-35), 0, math.rad(-35)), 0.2) | |
| 1695 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1696 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.new(0.35, 0, 0.3) * CFrame.Angles(math.rad(-35), 0, math.rad(35)), 0.2) | |
| 1697 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1698 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.2) | |
| 1699 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.2) | |
| 1700 | elseif torvel > 1 and hitfloor ~= nil then | |
| 1701 | sinewave = sinewave / 10 | |
| 1702 | Anim = "Walk" | |
| 1703 | canTaunt = false | |
| 1704 | Neck.C0 = clerp(Neck.C0, necko, 0.1) | |
| 1705 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.1, 0, 0), 0.1) | |
| 1706 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.new(-0.35, 0, 0.3) * CFrame.Angles(math.rad(-35), 0, math.rad(-35)), 0.2) | |
| 1707 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1708 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.new(0.35, 0, 0.3) * CFrame.Angles(math.rad(-35), 0, math.rad(35)), 0.2) | |
| 1709 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
| 1710 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.2) | |
| 1711 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.2) | |
| 1712 | end | |
| 1713 | RootJoint.C0 = clerp(RootJoint.C0, RootJoint.C0 * CFrame.new(0, 0, sinewave / 3), 0.1) | |
| 1714 | RW.C0 = clerp(RW.C0, RW.C0 * CFrame.new(0, sinewave / 3, 0), 0.2) | |
| 1715 | LW.C0 = clerp(LW.C0, LW.C0 * CFrame.new(0, sinewave / 3, 0), 0.2) | |
| 1716 | RH.C0 = clerp(RH.C0, RH.C0 * CFrame.new(0, -sinewave / 3, 0), 0.2) | |
| 1717 | LH.C0 = clerp(LH.C0, LH.C0 * CFrame.new(0, -sinewave / 3, 0), 0.2) | |
| 1718 | end | |
| 1719 | end | |
| 1720 | end) |