Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --scenius
- --i will squish ur skrubs irl
- wait(0.016666666666667)
- local plr = game.Players.LocalPlayer
- local basic = {}
- function round(num)
- local a, b = math.modf(num)
- if num % 1 ~= 0 then
- return math.floor(num) + math.floor(b * 10) / 10
- else
- return math.floor(num)
- end
- end
- function guieffect(parent, vhum, damage, colour)
- local damagepart = Instance.new("Part", parent)
- damagepart.Transparency = 1
- damagepart.Anchored = true
- damagepart.CanCollide = false
- damagepart.Size = Vector3.new(1, 1, 1)
- damagepart.Name = "DamagePart"
- damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0)
- local g = Instance.new("BillboardGui", damagepart)
- g.Enabled = true
- g.Adornee = damagepart
- g.Size = UDim2.new(5, 0, 5, 0)
- g.ExtentsOffset = Vector3.new(0, 0, 0)
- g.StudsOffset = Vector3.new(0, 0, 0)
- local t = Instance.new("TextLabel", g)
- t.BackgroundTransparency = 1
- t.Font = "SourceSans"
- t.FontSize = "Size32"
- t.Text = "" .. round(damage)
- if round(damage) % 1 == 0 then
- t.Text = "" .. round(damage) .. ""
- end
- t.Size = UDim2.new(1, 0, 1, 0)
- t.TextStrokeTransparency = 1
- t.TextTransparency = 0
- t.TextScaled = true
- t.TextWrapped = true
- t.TextXAlignment = "Center"
- t.TextYAlignment = "Center"
- t.TextColor3 = colour
- coroutine.resume(coroutine.create(function()
- for i = 1, 50 do
- game:GetService("RunService").Heartbeat:wait()
- local sinewave = math.sin(i / 500) * 4
- damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0))
- t.TextTransparency = t.TextTransparency + 0.02
- end
- damagepart:Destroy()
- end), t)
- end
- function check(vhum, plrchar, dmg)
- if vhum.Parent.Head:FindFirstChild(plrchar.Name) then
- local value = vhum.Parent.Head:findFirstChild(plrchar.Name)
- value.Value = value.Value + math.ceil(dmg - 0.5)
- else
- local new = Instance.new("IntValue")
- new.Name = plrchar.Name
- new.Parent = vhum.Parent.Head
- new.Value = dmg
- end
- end
- function Knockback(vtors, plrchar, velocity, duration, name)
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vtors.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- local bv = Instance.new("BodyVelocity")
- bv.P = 1250
- bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.Velocity = velocity
- if name then
- bv.Name = name
- for i, v in pairs(vtors:GetChildren()) do
- if v.Name == name then
- return
- end
- end
- end
- spawn(function()
- wait(duration)
- bv:Destroy()
- end)
- end
- function basic.Burn(parent, vhum, damage, colour, loops)
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- do
- local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
- local firedamage = localdamage / (vhum.Parent.CharStats.BurnResist.Value / 100 + 1)
- local totalloops = loops / (vhum.Parent.CharStats.BurnTime.Value / 100 + 1)
- local burnn = function(b)
- coroutine.resume(coroutine.create(b))
- end
- burnn(function()
- for i = 1, totalloops do
- if vhum.Health > 0 then
- if plrchar:findFirstChild("CharStats") then
- vhum.Health = vhum.Health - round(firedamage)
- guieffect(parent, vhum, firedamage, colour)
- check(vhum, plrchar, round(firedamage))
- wait(1)
- else
- vhum.Health = vhum.Health - round(firedamage)
- guieffect(parent, vhum, firedamage, colour)
- check(vhum, plrchar, round(firedamage))
- wait(1)
- end
- end
- end
- end)
- end
- else
- vhum.Health = vhum.Health - damage
- check(vhum, plrchar, damage)
- guieffect(parent, vhum, damage, colour)
- end
- end
- function basic.Venom(parent, vhum, damage, colour, loops)
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- do
- local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
- local venomdamage = localdamage / (plrchar.CharStats.VenomResist.Value / 100 + 1)
- local totalloops = loops / (plrchar.CharStats.VenomTime.Value / 100 + 1)
- local venomm = function(v)
- coroutine.resume(coroutine.create(v))
- end
- venomm(function()
- for i = 1, totalloops do
- if vhum.Health > 0 then
- if plrchar:findFirstChild("CharStats") then
- vhum.Health = vhum.Health - round(venomdamage)
- guieffect(parent, vhum, venomdamage, colour)
- check(vhum, plrchar, round(venomdamage))
- wait(1)
- else
- vhum.Health = vhum.Health - round(venomdamage)
- guieffect(parent, vhum, venomdamage, colour)
- check(vhum, plrchar, round(venomdamage))
- wait(1)
- end
- end
- end
- end)
- end
- else
- vhum.Health = vhum.Health - damage
- check(vhum, plrchar, damage)
- guieffect(parent, vhum, damage, colour)
- end
- end
- function basic.Ice(parent, vhum, damage, colour, duration, speed)
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- do
- local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
- local icedamage = localdamage / (plrchar.CharStats.IceResist.Value / 100 + 1)
- local iceduration = duration / (plrchar.CharStats.IceTime.Value / 100 + 1)
- if plrchar:findFirstChild("CharStats") then
- local icee = function(i)
- coroutine.resume(coroutine.create(i))
- end
- icee(function()
- vhum.Health = vhum.Health - round(icedamage)
- local speedvalue = plrchar:FindFirstChild("CharStats"):FindFirstChild("Speed")
- check(vhum, plrchar, round(icedamage))
- guieffect(parent, vhum, icedamage, colour)
- if speedvalue and speedvalue.Value > speed then
- speedvalue.Value = speedvalue.Value - speed
- wait(iceduration)
- speedvalue.Value = speedvalue.Value + speed
- end
- end)
- end
- end
- else
- vhum.Health = vhum.Health - damage
- check(vhum, plrchar, damage)
- guieffect(parent, vhum, damage, colour)
- end
- end
- function basic.Stun(parent, vhum, damage, colour, duration)
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- do
- local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
- local stundamage = localdamage / (plrchar.CharStats.StunResist.Value / 100 + 1)
- local stunduration = duration / (plrchar.CharStats.StunTime.Value / 100 + 1)
- if plrchar:findFirstChild("CharStats") then
- local stunn = function(s)
- coroutine.resume(coroutine.create(s))
- end
- stunn(function()
- local prevspeed = vhum.Parent.CharStats.Speed.Value
- vhum.Parent.CharStats.Speed.Value = -100
- vhum.Parent.CharStats.Attacking.Value = true
- vhum.Health = vhum.Health - round(stundamage)
- check(vhum, plrchar, round(stundamage))
- guieffect(parent, vhum, stundamage, colour)
- wait(stunduration)
- vhum.Parent.CharStats.Attacking.Value = false
- vhum.Parent.CharStats.Speed.Value = prevspeed
- end)
- end
- end
- else
- vhum.Health = vhum.Health - damage
- check(vhum, plrchar, damage)
- guieffect(parent, vhum, damage, colour)
- end
- end
- function basic.Damage(parent, vhum, damage, colour)
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- local localdamage = damage * (plrchar.CharStats.Attack.Value / 1) / vhum.Parent.CharStats.Defense.Value
- if plrchar:findFirstChild("CharStats") then
- vhum.Health = vhum.Health - localdamage
- check(vhum, plrchar, localdamage)
- guieffect(parent, vhum, localdamage, colour)
- end
- else
- vhum.Health = vhum.Health - damage
- check(vhum, plrchar, damage)
- guieffect(parent, vhum, damage, colour)
- end
- end
- function basic.Debuff(parent, vhum, colour, type, amount, last)
- local stat, statstr
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- if type == "Attack" or type == "A" then
- stat = vhum.Parent.CharStats.Attack
- statstr = "Attack"
- elseif type == "Defense" or type == "D" or type == nil then
- stat = vhum.Parent.CharStats.Defense
- statstr = "Defense"
- elseif type == "Speed" or type == "S" then
- stat = vhum.Parent.CharStats.Speed
- statstr = "Speed"
- end
- spawn(function()
- stat.Value = stat.Value - amount
- wait(last)
- stat.Value = stat.Value + amount
- end)
- if plrchar:findFirstChild("CharStats") then
- guieffect(parent, vhum, 0, colour, "-" .. statstr, true)
- end
- end
- end
- function basic.Buff(parent, vhum, colour, type, amount, last)
- local stat, statstr
- if not vhum or not vhum.Parent:FindFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- local plrchar = parent.Parent
- local plrhead = plrchar.Head
- local enemply = game.Players:GetPlayerFromCharacter(vhum.Parent)
- local baseply = game.Players:GetPlayerFromCharacter(plrchar)
- if enemply and enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- return
- end
- if vhum.Parent:FindFirstChild("CharStats") then
- if type == "Attack" or type == "A" then
- stat = vhum.Parent.CharStats.Attack
- statstr = "Attack"
- elseif type == "Defense" or type == "D" or type == nil then
- stat = vhum.Parent.CharStats.Defense
- statstr = "Defense"
- elseif type == "Speed" or type == "S" then
- stat = vhum.Parent.CharStats.Speed
- statstr = "Speed"
- end
- spawn(function()
- stat.Value = stat.Value + amount
- wait(last)
- stat.Value = stat.Value - amount
- end)
- if plrchar:findFirstChild("CharStats") then
- guieffect(parent, vhum, 0, colour, "+" .. statstr, true)
- end
- end
- end
- function basic.Heal(parent, vhum, heal, colour)
- if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
- return
- end
- vhum.Health = vhum.Health + heal
- guieffect(parent, vhum, heal, colour)
- return basic
- end
- local uis = game:GetService("UserInputService")
- repeat
- wait()
- until plr.Character and plr.Character:WaitForChild("Torso") and plr.Character:WaitForChild("Humanoid")
- local char = plr.Character
- local charStats = Instance.new("Folder", char)
- charStats.Name = "CharStats"
- speed = Instance.new("NumberValue", charStats)
- speed.Name = "Speed"
- speed.Value = 10
- enr = Instance.new("NumberValue", charStats)
- enr.Name = "HealthRate"
- enr.Value = 5
- def = Instance.new("NumberValue", charStats)
- def.Name = "Defense"
- def.Value = 1
- Anim = nil
- cf = CFrame.new
- function c3(cz, cx, cc)
- return Color3.new(cz / 255, cx / 255, cc / 255)
- end
- angles = CFrame.Angles
- Player = game.Players.LocalPlayer
- Character = Player.Character
- Humanoid = Character.Humanoid
- mouse = Player:GetMouse()
- local LeftArm = Character["Left Arm"]
- RightArm = Character["Right Arm"]
- LeftLeg = Character["Left Leg"]
- RightLeg = Character["Right Leg"]
- Head = Character.Head
- Torso = Character.Torso
- RootPart = Character.HumanoidRootPart
- RootJoint = RootPart.RootJoint
- Humanoid.Animator:Destroy()
- Character.Animate:Destroy()
- NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- RootCF = angles(-1.57, 0, 3.14)
- LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RW = Instance.new("Weld")
- LW = Instance.new("Weld")
- RH = Torso["Right Hip"]
- LH = Torso["Left Hip"]
- Neck = Torso.Neck
- RSH = Torso["Right Shoulder"]
- LSH = Torso["Left Shoulder"]
- RSH.Parent = nil
- LSH.Parent = nil
- RW.Name = "Right Shoulder"
- RW.Part0 = Torso
- RW.C0 = cf(1.5, 0.5, 0)
- RW.C1 = cf(0, 0.5, 0)
- RW.Part1 = RightArm
- RW.Parent = Torso
- LW.Name = "Left Shoulder"
- LW.Part0 = Torso
- LW.C0 = cf(-1.5, 0.5, 0)
- LW.C1 = cf(0, 0.5, 0)
- LW.Part1 = LeftArm
- LW.Parent = Torso
- Effects = Instance.new("Model", Character)
- Effects.Name = "Effects"
- local attacking = Instance.new("BoolValue", charStats)
- attacking.Name = "Attacking"
- attacking.Value = false
- sine = 0
- attackcounter = 1
- torvel = nil
- hitfloor, posfloor = nil, nil
- partEffects = {}
- cc = ""
- comboiing = false
- ccval = Instance.new("StringValue", charStats)
- ccval.Name = "KeySequence"
- cooldown = 0
- cooldown_duration = 0.2
- attack1s = "wadq"
- attack1n = "Cold Divinity"
- attack1e = 50
- attack2s = "sadq"
- attack2n = "Hailstorm"
- attack2e = 50
- attack3s = "asdq"
- attack3n = "Minus K"
- attack3e = 50
- attack4s = "dsadq"
- attack4n = "Frost King"
- attack4e = 75
- attack5s = "wwq"
- attack5n = "Frost Breeze"
- attack5e = 25
- attack6s = "ssq"
- attack6n = "Reside"
- attack6e = 25
- function rayCast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- function thread(f)
- coroutine.resume(coroutine.create(f))
- end
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 0.025
- tf = 0
- allowframeloss = true
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function sound(id, par, vol, dur, pit)
- coroutine.resume(coroutine.create(function()
- local sou = Instance.new("Sound", par or workspace)
- sou.Volume = vol
- sou.Pitch = pit or 1
- sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
- swait()
- sou:play()
- wait(dur)
- sou:Destroy()
- end))
- end
- local function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent)
- local part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size)
- local fp = Instance.new("Part")
- fp.formFactor = formfactor
- fp.Parent = Effects
- fp.Reflectance = reflectance
- fp.Transparency = transparency
- fp.CanCollide = false
- fp.Locked = true
- fp.BrickColor = brickcolor
- fp.Name = name
- fp.Size = size
- fp.Position = Torso.Position
- NoOutline(fp)
- fp.Material = "SmoothPlastic"
- fp:BreakJoints()
- return fp
- end
- local prt = part(3, char, 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = mesh("BlockMesh", prt, "", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- return prt, msh
- end
- function clerp(a, b, t)
- local qa = {
- QuaternionFromCFrame(a)
- }
- local qb = {
- QuaternionFromCFrame(b)
- }
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m00 < m11 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s
- return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- 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))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp
- if cosTheta >= 1.0E-4 then
- if 1 - cosTheta > 1.0E-4 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((1 - t) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- elseif 1 + cosTheta > 1.0E-4 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((t - 1) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- 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
- end
- function round(num)
- local a, b = math.modf(num)
- if num % 1 ~= 0 then
- return math.floor(num) + math.floor(b * 10 + 0.5) / 10
- else
- return math.floor(num)
- end
- end
- function NoOutline(Part)
- Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function newPart(parent, brickcolor, transparency, anchored, cancollide, size, name)
- local fp = Instance.new("Part")
- fp.Parent = parent
- fp.Transparency = transparency
- fp.Anchored = anchored
- fp.CanCollide = cancollide
- fp.Locked = true
- fp.BrickColor = brickcolor
- fp.Name = name
- fp.Size = size
- fp.Position = Torso.Position
- NoOutline(fp)
- fp.Material = "SmoothPlastic"
- fp:BreakJoints()
- return fp
- end
- function randomangles()
- local random = math.rad((math.random() - 0.5) * 180)
- local randomangles = CFrame.Angles(random, random, random)
- return randomangles
- end
- function mesh(Mesh, part, meshtype, meshid, offset, scale)
- local mesh = Instance.new(Mesh)
- mesh.Parent = part
- if Mesh == "SpecialMesh" then
- mesh.MeshType = meshtype
- if meshid then
- mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
- end
- end
- if offset then
- mesh.Offset = offset
- end
- mesh.Scale = scale
- return mesh
- end
- function weld(parent, part0, part1, c0)
- local weld = Instance.new("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = c0
- return weld
- end
- function findCloseHumanoid(centre, distance)
- local tab = {}
- for _, child in pairs(game.Workspace:GetChildren()) do
- if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
- local vtors = child.Torso
- local mag = math.abs((vtors.Position - centre).magnitude)
- if distance >= mag then
- table.insert(tab, child.Humanoid)
- end
- end
- end
- return tab
- end
- function attackone()
- attacking.Value = true
- for i = 0, 1, 0.05 do
- swait()
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-80)), 0.15)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(80)), 0.15)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(10)), 0.15)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.15)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
- end
- attacking.Value = false
- end
- function attacktwo()
- attacking.Value = true
- for i = 0, 1, 0.1 do
- swait()
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-45)), 0.15)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(-0.1, 0, math.rad(45)), 0.15)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(1.57, 0, 0), 0.15)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, -1.57), 0.15)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
- end
- local cylinder = newPart(Effects, BrickColor.new("White"), 0.5, false, false, Vector3.new(), "Part")
- cylinder.Material = "Ice"
- mesh("CylinderMesh", cylinder, nil, nil, Vector3.new(0, -3, 0), Vector3.new(150, 1, 150))
- weld(RootPart, cylinder, RootPart, CFrame.new(0, 0, 0))
- local guipart = newPart(Effects, BrickColor.White(), 1, true, false, Vector3.new(30, 0.2, 30), "Part")
- local csg = Instance.new("SurfaceGui", guipart)
- csg.Face = "Top"
- local imagelabel = Instance.new("ImageLabel", csg)
- imagelabel.ImageColor3 = Color3.new(1, 1, 1)
- imagelabel.BackgroundTransparency = 1
- imagelabel.Image = "http://www.roblox.com/asset/?id=563690229"
- imagelabel.Size = UDim2.new(1, 0, 1, 0)
- local p0 = newPart(Effects, BrickColor.new("Institutional white"), 0.1, false, false, Vector3.new(), "Part")
- p0.CFrame = RootPart.CFrame * CFrame.new(0, 0, -5)
- p0.Material = "Neon"
- local m0 = mesh("SpecialMesh", p0, "FileMesh", "1051557", Vector3.new(0, 6, 0), Vector3.new(30, 30, 30))
- local w0 = weld(RootPart, p0, RootPart, CFrame.new(0, 0, 0))
- local normcount = 0
- for i = 0, 3, 0.05 do
- swait()
- local hums = findCloseHumanoid(RootPart.Position, 30)
- if normcount % 10 == 0 then
- for i, v in pairs(hums) do
- basic.Damage(Effects, v, math.random(2, 3), c3(243, 242, 242))
- end
- end
- for i, v in pairs(hums) do
- v.Parent.Torso.Velocity = RootPart.Velocity / 1.5 + Vector3.new(math.random(-10, 10), 0, math.random(-10, 10))
- end
- w0.C0 = w0.C0 * CFrame.Angles(0, math.rad(i * 6), 0)
- local mb = MagicBlock(BrickColor.new("Institutional white"), RootPart.CFrame * CFrame.new(math.random(-25, 25), math.random(-3, -3), math.random(-25, 25)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 4, 4, 4, 4, 4, 4, 0.05, 2, Part)
- mb.Material = "Neon"
- mb.Size = Vector3.new(5, 5, 5)
- local m = mesh("BlockMesh", mb, nil, nil, Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
- table.insert(partEffects, {
- mb,
- "MoveDisappear",
- 0.05,
- 0,
- 0.1,
- 0
- })
- guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
- RootPart.Velocity = RootPart.CFrame.lookVector * 45
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(0.1, 0, math.rad(-45)), 0.15)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0.1, 0, math.rad(45) + 0.1 * -i * 67), 0.15)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(1.57, 0, 0.785), 0.15)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-0.785, 0, -1.57), 0.15)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(0, math.rad(90), 0), 0.15)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.rad(90), 0), 0.15)
- normcount = normcount + 1
- end
- table.insert(partEffects, {
- cylinder,
- "Disappear",
- 0.05,
- 0,
- 0,
- 0
- })
- table.insert(partEffects, {
- p0,
- "Disappear",
- 0.05,
- 0,
- 0,
- 0
- })
- table.insert(partEffects, {
- guipart,
- "Disappear",
- 0.05,
- 0,
- 0,
- 0
- })
- attacking.Value = false
- end
- function attackthree()
- attacking.Value = true
- local guipart = newPart(Effects, BrickColor.White(), 1, true, false, Vector3.new(40, 0.2, 40), "Part")
- local csg = Instance.new("SurfaceGui", guipart)
- csg.Face = "Top"
- local imagelabel = Instance.new("ImageLabel", csg)
- imagelabel.ImageColor3 = Color3.new(1, 1, 1)
- imagelabel.BackgroundTransparency = 1
- imagelabel.Image = "http://www.roblox.com/asset/?id=563690229"
- imagelabel.Size = UDim2.new(1, 0, 1, 0)
- for i = 0, 1, 0.05 do
- swait()
- guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(5), 0, math.rad(0)), 0.15)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(0)), 0.15)
- RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.2) * CFrame.Angles(math.rad(90), 0, -math.rad(45)), 0.15)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(45)), 0.15)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(15), math.rad(80), 0), 0.15)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0.2) * CFrame.Angles(math.rad(15), -math.rad(80), 0), 0.15)
- end
- local p1 = newPart(Effects, BrickColor.new("White"), 0, true, false, Vector3.new(0.2, 0.2, 0.2), "Part")
- p1.CFrame = RootPart.CFrame * CFrame.new(0, 0, 0)
- p1.Material = "Neon"
- local m1 = mesh("SpecialMesh", p1, "Sphere", nil, nil, Vector3.new(100, 100, 100))
- local p2 = newPart(Effects, BrickColor.new("Lily white"), 0.1, true, false, Vector3.new(0.2, 0.2, 0.2), "Part")
- p2.CFrame = RootPart.CFrame * CFrame.new(0, 0, 0)
- p2.Material = "SmoothPlastic"
- local m2 = mesh("SpecialMesh", p2, "Sphere", nil, nil, Vector3.new(120, 120, 120))
- weld(p1, p2, p1, CFrame.new(0, 0, 0))
- local now = RootPart.CFrame * CFrame.new(0, 0, 0)
- thread(function()
- for i = 1, 40 do
- swait()
- m1.Scale = m1.Scale + Vector3.new(5, 5, 5)
- p1.Transparency = p1.Transparency + 0.025
- p1.CFrame = now
- m2.Scale = m2.Scale + Vector3.new(1, 1, 1)
- p2.Transparency = p2.Transparency + 0.025
- p2.CFrame = now
- end
- p1:Destroy()
- p2:Destroy()
- end)
- for i, v in pairs(findCloseHumanoid(RootPart.Position, 40)) do
- do
- local enemply = game.Players:GetPlayerFromCharacter(v.Parent)
- local baseply = Player
- if enemply then
- if enemply.TeamColor == baseply.TeamColor and enemply.Neutral == false and baseply.Neutral == false then
- basic.Buff(Effects, v, Color3.new(0, 0, 0), "Defense", 0.2, 5)
- else
- basic.Debuff(Effects, v, Color3.new(0, 0, 0), "Defense", 0.2, 5)
- spawn(function()
- for i = 1, math.random(2, 3) do
- basic.Damage(Effects, v, math.random(5, 8), BrickColor.new("White").Color)
- wait(1)
- end
- end)
- end
- elseif not enemply then
- spawn(function()
- for i = 1, math.random(2, 3) do
- basic.Damage(Effects, v, math.random(5, 8), BrickColor.new("White").Color)
- wait(1)
- end
- end)
- end
- end
- end
- for i = 0, 1, 0.05 do
- swait()
- for i = 1, 2 do
- local mb = MagicBlock(BrickColor.new("Institutional white"), RootPart.CFrame * CFrame.new(math.random(-15, 15), math.random(-3, 15), math.random(-15, 15)) * CFrame.Angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 4, 4, 4, 4, 4, 4, 0.05, 2, Part)
- mb.Material = "Neon"
- local m = mesh("BlockMesh", mb, nil, nil, Vector3.new(0, 0, 0), Vector3.new(10, 10, 10))
- table.insert(partEffects, {
- mb,
- "MoveDisappear",
- 0.05,
- 0,
- 0.1,
- 0
- })
- end
- guipart.CFrame = RootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, math.rad(i * -40), 0)
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.3)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(100)), 0.3)
- RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, 0, math.rad(-100)), 0.3)
- LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-15), math.rad(80), 0), 0.3)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0.2) * CFrame.Angles(math.rad(-15), -math.rad(80), 0), 0.3)
- end
- table.insert(partEffects, {
- guipart,
- "Disappear",
- 0.05,
- 0,
- 0,
- 0
- })
- attacking.Value = false
- end
- function attackfour()
- attacking.Value = true
- wait(2)
- attacking.Value = false
- end
- function noenergy()
- thread(function()
- energylabel.Text = "NO ENERGY!"
- wait(0.3)
- energylabel.Text = ""
- end)
- end
- function updateAttack(name, energy)
- attacklabel.Text = name
- if energy <= 0 or energy == nil then
- energylabel.Text = ""
- return
- end
- charStats.EnergyAmount.Value = charStats.EnergyAmount.Value - energy
- energylabel.Text = "-" .. tostring(energy)
- end
- function performAttack(sequence)
- if attacking.Value == false then
- if sequence == attack1s then
- if charStats.EnergyAmount.Value < attack1e then
- noenergy()
- return
- end
- updateAttack(attack1n, attack1e)
- attackone()
- updateAttack("-", 0)
- end
- if sequence == attack2s then
- if charStats.EnergyAmount.Value < attack2e then
- noenergy()
- return
- end
- updateAttack(attack2n, attack2e)
- attacktwo()
- updateAttack("-", 0)
- end
- if sequence == attack3s then
- if charStats.EnergyAmount.Value < attack3e then
- noenergy()
- return
- end
- updateAttack(attack3n, attack3e)
- attackthree()
- updateAttack("-", 0)
- end
- if sequence == attack4s then
- if charStats.EnergyAmount.Value < attack4e then
- noenergy()
- return
- end
- updateAttack(attack4n, attack4e)
- attackfour()
- updateAttack("-", 0)
- end
- end
- end
- atknum = 0
- PlayerMouse = plr:GetMouse()
- function ComboAttack()
- if attacking.Value == false then
- attacking.Value = true
- if atknum == 0 then
- attacktwo()
- elseif atknum == 1 then
- attackthree()
- end
- if atknum < 1 then
- atknum = atknum + 1
- else
- atknum = 0
- end
- attacking.Value = false
- end
- end
- PlayerMouse.Button1Down:connect(ComboAttack)
- thread(function()
- while true do
- swait()
- sine = sine + 1
- local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
- if 1 < RootPart.Velocity.y and hitfloor == nil then
- if attacking.Value == false then
- Anim = "Jump"
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor == nil then
- if attacking.Value == false then
- Anim = "Fall"
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2)
- end
- elseif torvel < 1 and hitfloor ~= nil then
- if attacking.Value == false then
- Anim = "Idle"
- Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(5), 0, math.rad(25)), 0.1)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-25)) * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)), 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(0.9, 0.4 - 0.1 * math.cos(sine / 15), -0.575) * CFrame.Angles(math.rad(105), 0, math.rad(-95)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(75), 0, math.rad(75)), 0.2)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(5), math.rad(85), 0), 0.2)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0.1) * CFrame.Angles(math.rad(-5), -math.rad(85), 0), 0.2)
- end
- elseif torvel > 2 and hitfloor ~= nil and attacking.Value == false then
- Anim = "Walk"
- Neck.C0 = clerp(Neck.C0, NeckCF, 0.1)
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(math.rad(5), 0, 0), 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * CFrame.Angles(0, 0, math.rad(5)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * CFrame.Angles(0, 0, math.rad(-5)), 0.2)
- RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3)
- LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3)
- end
- if 0 < #partEffects then
- for e = 1, #partEffects do
- if partEffects[e] ~= nil then
- local Thing = partEffects[e]
- if Thing ~= nil then
- local Part = Thing[1]
- local Mode = Thing[2]
- local Delay = Thing[3]
- local IncX = Thing[4]
- local IncY = Thing[5]
- local IncZ = Thing[6]
- if 1 >= Thing[1].Transparency then
- if Thing[2] == "Block1" then
- Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- local Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Block2" then
- Thing[1].CFrame = Thing[1].CFrame
- local Mesh = Thing[7]
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Cylinder" then
- local Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Blood" then
- local Mesh = Thing[7]
- Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Elec" then
- local Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Disappear" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Shatter" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
- Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
- Thing[6] = Thing[6] + Thing[5]
- elseif Thing[2] == "MoveDisappear" then
- Part.Transparency = Part.Transparency + Thing[3]
- Part.CFrame = CFrame.new(Part.CFrame.X + IncX, Part.CFrame.Y + IncY, Part.CFrame.Z + IncZ) * randomangles()
- end
- else
- Part:Destroy()
- table.remove(partEffects, e)
- end
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement