Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --i used stravants Beautifier so it might look a bit wonky
- Meshes = {
- Blast = '20329976',
- Crown = '1323306',
- Ring = '3270017',
- Claw = '10681506',
- Crystal = '9756362',
- Coil = '9753878',
- Cloud = '1095708',
- }
- clangsounds = {
- '199149119',
- '199149109',
- '199149072',
- '199149025',
- '199148971'
- }
- hitsounds = {
- '199149137',
- '199149186',
- '199149221',
- '199149235',
- '199149269',
- '199149297'
- }
- blocksounds = {
- '199148933',
- '199148947'
- }
- armorsounds = {
- '199149321',
- '199149338',
- '199149367',
- '199149409',
- '199149452'
- }
- woosh = {
- Heavy1 = '320557353',
- Heavy2 = '320557382',
- Heavy3 = '320557453',
- Heavy4 = '199144226',
- Heavy5 = '203691447',
- Heavy6 = '203691467',
- Heavy7 = '203691492',
- Light1 = '320557413',
- Light2 = '320557487',
- Light3 = '199145095',
- Light4 = '199145146',
- Light5 = '199145887',
- Light6 = '199145913',
- Light7 = '199145841',
- Medium1 = '320557518',
- Medium2 = '320557537',
- Medium3 = '320557563',
- Medium4 = '199145204'
- }
- music = {--i like music a lot
- Breaking = '179281636',
- FinalReckoning = '357375770',
- NotDeadYet = '346175829',
- Intense = '151514610',
- JumpP1 = '160536628',
- JumpP2 = '60536666',
- SonsOfWar = '158929777',
- WrathOfSea = '165520893',
- ProtecTorsofEarth = '160542922',
- SkyTitans = '179282324',
- ArchAngel = '144043274',
- Anticipation = '168614529',
- TheMartyred = '186849544',
- AwakeP1 = '335631255',
- AwakeP2 = '335631297',
- ReadyAimFireP1 = '342455387',
- ReadyAimFireP2 = '342455399',
- DarkLordP1 = '209567483',
- DarkLordP2 = '209567529',
- BloodDrainP1 = '162914123',
- BloodDrainP2 = '162914203',
- DanceOfSwords = '320473062',
- Opal = '286415112',
- Calamity = '190454307',
- Hypnotica = '155968128',
- Nemisis = '160453802',
- Breathe = '276963903',
- GateToTheRift = '270655227',
- InfernalBeserking = '244143404',
- Trust = '246184492',
- AwakeningTheProject = '245121821',
- BloodPain = '242545577',
- Chaos = '247241693',
- NightmareFictionHighStake = '248062278',
- TheWhiteWeapon = '247236446',
- Gale = '256851659',
- ImperialCode = '256848383',
- Blitzkrieg = '306431437',
- RhapsodyRage = '348690251',
- TheGodFist = '348541501',
- BattleForSoul = '321185592',
- TheDarkColossus = '305976780',
- EmpireOfAngels = '302580452',
- Kronos = '302205297',
- Exorcist = '299796054',
- CrimsonFlames = '297799220',
- UltimatePower = '295753229',
- DrivingInTheDark = '295753229',
- AscendToPower = '293860654',
- GodOfTheSun = '293612495',
- DarkRider = '293861765',
- Vengeance = '293375555',
- SoundOfWar = '293376196',
- HellsCrusaders = '293012202',
- Legend = '293011823',
- RisingSouls = '290524959'
- }
- misc = {
- GroundSlam = '199145477',
- LaserSlash = '199145497',
- RailGunFire = '199145534',
- Charge1 = '199145659',
- Charge2 = '169380469',
- Charge3 = '169380479',
- EmptyGun = '203691822',
- GunShoot = '203691837',
- Stomp1 = '200632875',
- Stomp2 = '200632561',
- TelsaCannonCharge = '169445572',
- TelsaCannonShoot = '169445602',
- AncientHymm = '245313442'
- }
- wait(1 / 60)
- local Player = game.Players.localPlayer
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local mouse = Player:GetMouse()
- local m = Instance.new('Model', Character)
- m.Name = "WeaponModel"
- local LeftArm = Character["Left Arm"]
- local RightArm = Character["Right Arm"]
- local LeftLeg = Character["Left Leg"]
- local RightLeg = Character["Right Leg"]
- local Head = Character.Head
- local Torso = Character.Torso
- local cam = game.Workspace.CurrentCamera
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- --cam.CameraSubject = Head
- local equipped = false
- local attack = false
- local Anim = 'Idle'
- local idle = 0
- local sprint = false
- local battlestance = false
- local attacktype = 1
- local state = 'none'
- local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velocity = RootPart.Velocity.y
- local sine = 0
- local change = 1
- local on = false
- local grabbed = false
- local skill1 = false
- local skill2 = false
- local skill3 = false
- local skill4 = false
- local cooldown1 = 0
- local cooldown2 = 0
- local cooldown3 = 0
- local cooldown4 = 0
- local co1 = 10--how long it will take for skill to cooldown
- local co2 = 15
- local co3 = 15
- local co4 = 25
- local inputserv = game:GetService('UserInputService')
- local typing = false
- local crit = false
- local critchance = 2--critical chance percentage
- local critdamageaddmin = 3--minimum amount of critical damage being added to regular damage
- local critdamageaddmax = 7--maximum amount
- local maxstamina = 100--max amount of stamina
- local stamina = 0--stamina you start out with
- local skill1stam = 10--how much stamina is needed for a skill
- local skill2stam = 10
- local skill3stam = 20
- local skill4stam = 30
- local recovermana = 3--how much mana per second
- local defensevalue = 1--how much defense this character has
- local speedvalue = 1--how much speed this character has
- --speed is 16*speedvalue
- local mindamage = 5--self explanatory
- local maxdamage = 7--self explanatory
- local damagevalue = 1--how much damage this character has
- --damage is math.random(mindamage,maxdamage)*damagevalue
- --damage(hit, mindamage, maxdamage, 1, 1, RootPart)
- --asd
- local cn = CFrame.new-- make things easier :)
- local mr = math.rad
- local angles = CFrame.Angles
- local ud = UDim2.new
- local c3 = Color3.new
- local skillcolorscheme = c3(1, 1, 1)--color scheme for skills lol
- --asd
- local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- ---Humanoid.Animator:Destroy()
- ---Character.Animate:Destroy()
- hip = Instance.new("Motor6D",Character.Torso)
- hip.Name = "Right Hip"
- hip2 = Instance.new("Motor6D",Character.Torso)
- hip2.Name = "Left Hip"
- wait(1)
- --Angles For RootJoint And Hips `~`
- local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- local RHCF = CFrame.fromEulerAnglesXYZ(0,1.6,0)
- local LHCF = CFrame.fromEulerAnglesXYZ(0,-1.6,0)
- --Save Shoulders/Hips
- RSH, LSH = nil, nil
- --Shoulders
- RW = Instance.new("Weld")
- LW = Instance.new("Weld")
- --Hips
- RH = cn.Torso["Right Hip"]
- LH = cn.Torso["Left Hip"]
- --
- Player = Player
- ch = Character
- RSH = cn.Torso["Right Shoulder"]
- LSH = cn.Torso["Left Shoulder"]
- --
- RSH.Parent = nil
- LSH.Parent = nil
- --
- RW.Name = "RW"
- RW.Part0 = ch.Torso
- RW.C0 = cn(1.5, 0.5, 0)
- RW.C1 = cn(0, 0.5, 0)
- RW.Part1 = ch["Right Arm"]
- RW.Parent = ch.Torso
- --
- LW.Name = "LW"
- LW.Part0 = ch.Torso
- LW.C0 = cn(-1.5, 0.5, 0)
- LW.C1 = cn(0, 0.5, 0)
- LW.Part1 = ch["Left Arm"]
- LW.Parent = ch.Torso
- local scrn = Instance.new('ScreenGui', Player.PlayerGui)
- function makeframe(par, trans, pos, size, color)
- local frame = Instance.new('Frame', par)
- frame.BackgroundTransparency = trans
- frame.BorderSizePixel = 0
- frame.Position = pos
- frame.Size = size
- frame.BackgroundColor3 = color
- return frame
- end
- function makelabel(par, text)
- local label = Instance.new('TextLabel', par)
- label.BackgroundTransparency = 1
- label.Size = ud(1, 0, 1, 0)
- label.Position = ud(0, 0, 0, 0)
- label.TextColor3 = c3(255, 255, 255)
- label.TextStrokeTransparency = 0
- label.FontSize = Enum.FontSize.Size32
- label.Font = Enum.Font.SourceSansBold
- label.BorderSizePixel = 0
- label.TextScaled = true
- label.Text = text
- end
- framesk1 = makeframe(scrn, .5, ud(.23, 0, .93, 0), ud(.26, 0, .06, 0), skillcolorscheme)
- framesk2 = makeframe(scrn, .5, ud(.5, 0, .93, 0), ud(.26, 0, .06, 0), skillcolorscheme)
- framesk3 = makeframe(scrn, .5, ud(.5, 0, .86, 0), ud(.26, 0, .06, 0), skillcolorscheme)
- framesk4 = makeframe(scrn, .5, ud(.23, 0, .86, 0), ud(.26, 0, .06, 0), skillcolorscheme)
- bar1 = makeframe(framesk1, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
- bar2 = makeframe(framesk2, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
- bar3 = makeframe(framesk3, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
- bar4 = makeframe(framesk4, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
- text1 = makelabel(framesk1, '[3] Skill3')
- text2 = makelabel(framesk2, '[4] Skill4')
- text3 = makelabel(framesk3, "[2] Skill2")
- text4 = makelabel(framesk4, '[1] Skill1')
- staminabar = makeframe(scrn, .5, ud(.23, 0, .82, 0), ud(.26, 0, .03, 0), c3(61 / 255, 171 / 255, 1))
- staminacover = makeframe(staminabar, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(61 / 255, 171 / 255, 1))
- staminatext = makelabel(staminabar, 'Mana')
- healthbar = makeframe(scrn, .5, ud(.5, 0, .82, 0), ud(.26, 0, .03, 0), c3(1, 1, 0))
- healthcover = makeframe(healthbar, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(1, 46 / 255, 49 / 255))
- healthtext = makelabel(healthbar, 'Health')
- local stats = Instance.new('Folder', Character)
- stats.Name = 'Stats'
- local block = Instance.new('BoolValue', stats)
- block.Name = 'Block'
- block.Value = false
- local stun = Instance.new('BoolValue', stats)
- stun.Name = 'Stun'
- stun.Value = false
- local defense = Instance.new('NumberValue', stats)
- defense.Name = 'Defence'
- defense.Value = defensevalue
- local speed = Instance.new('NumberValue', stats)
- speed.Name = 'Speed'
- speed.Value = speedvalue
- local damagea = Instance.new('NumberValue', stats)
- damagea.Name = 'Damage'
- damagea.Value = damagevalue
- function atktype(s, e)
- coroutine.resume(coroutine.create(function()
- attacktype = e
- wait(1.5)
- attacktype = s
- end))
- end
- function turncrit()
- coroutine.resume(coroutine.create(function()
- print'CRITICAL!'
- crit = true
- wait(.25)
- crit = false
- end))
- end
- function subtractstamina(k)
- if stamina >= k then
- stamina = stamina - k
- end
- end
- function clerp(a, b, t)
- return a:lerp(b, t)
- end
- function randomizer(percent)
- local randomized = math.random(0, 100)
- if randomized <= percent then
- return true
- elseif randomized >= percent then
- return false
- end
- end
- local RbxUtility = LoadLibrary("RbxUtility")
- local Create = RbxUtility.Create
- function RemoveOutlines(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
- local Part = Create("Part"){
- formFactor = FormFactor,
- Parent = Parent,
- Reflectance = Reflectance,
- Transparency = Transparency,
- CanCollide = false,
- Locked = true,
- BrickColor = BrickColor.new(tostring(BColor)),
- Name = Name,
- Size = Size,
- Material = Material,
- }
- RemoveOutlines(Part)
- return Part
- end
- function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
- local Msh = Create(Mesh){
- Parent = Part,
- Offset = OffSet,
- Scale = Scale,
- }
- if Mesh == "SpecialMesh" then
- Msh.MeshType = MeshType
- Msh.MeshId = MeshId
- end
- return Msh
- end
- function CreateWeld(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld"){
- Parent = Parent,
- Part0 = Part0,
- Part1 = Part1,
- C0 = C0,
- C1 = C1,
- }
- return Weld
- end
- function rayCast(pos, dir, maxl, ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(pos, dir.unit * (maxl or 999.999)), ignore)
- end
- --Effects
- function makeeffect(par, size, pos1, trans, trans1, howmuch, delay1, id, type)
- local p = Instance.new('Part', par or workspace)
- p.CFrame = pos1
- p.Anchored = true
- p.Material = 'SmoothPlastic'
- p.CanCollide = false
- p.TopSurface = 0
- p.Size = Vector3.new(1, 1, 1)
- p.BottomSurface = 0
- p.Transparency = trans
- p.FormFactor = 'Custom'
- RemoveOutlines(p)
- local mesh = Instance.new('SpecialMesh', p)
- mesh.Scale = size
- if id ~= nil and type == nil then
- mesh.MeshId = 'rbxassetid://'..id
- elseif id == nil and type ~= nil then
- mesh.MeshType = type
- elseif id == nil and type == nil then
- mesh.MeshType = 'Brick'
- end
- coroutine.wrap(function()
- for i = 0, delay1, .1 do
- wait(1 / 60)
- p.CFrame = p.CFrame
- mesh.Scale = mesh.Scale + howmuch
- p.Transparency = p.Transparency + trans1
- end
- p:Destroy()
- end)()
- return p
- end
- function clangy(cframe)
- wait(1 / 60)
- local clang = {}
- local dis = 0
- local part = Instance.new('Part', nil)
- part.CFrame = cframe
- part.Anchored = true
- part.CanCollide = false
- part.BrickColor = BrickColor.new('New Yeller')
- part.FormFactor = 'Custom'
- part.Name = 'clanger'
- part.Size = Vector3.new(.2, .2, .2)
- part.TopSurface = 10
- part.BottomSurface = 10
- part.RightSurface = 10
- part.LeftSurface = 10
- part.BackSurface = 10
- part.FrontSurface = 10
- --part.Material='Neon'
- part:BreakJoints()
- local mesh = Instance.new('BlockMesh', part)
- coroutine.wrap(function()
- for i = 1, 7 do
- wait(1 / 60)
- dis = dis + .2
- local partc = part:clone()
- partc.Parent = workspace
- partc.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(dis, 0, 0)
- partc.CFrame = partc.CFrame * CFrame.new(0, dis, 0)
- table.insert(clang, partc)
- end
- for i, v in pairs(clang) do
- coroutine.wrap(function()
- for i = 1, 10 do
- wait(.01)
- v.Transparency = v.Transparency + .1
- end
- v:destroy()
- end)()
- end
- end)()
- end
- --damage effects
- function circle(color, pos1)
- local p = Instance.new('Part', m)
- p.BrickColor = BrickColor.new(color)
- p.CFrame = pos1
- p.Anchored = true
- p.Material = 'Plastic'
- p.CanCollide = false
- p.TopSurface = 0
- p.Size = Vector3.new(1, 1, 1)
- p.BottomSurface = 0
- p.Transparency = 0.35
- p.FormFactor = 'Custom'
- local mesh = Instance.new('CylinderMesh', p)
- mesh.Scale = Vector3.new(0, 0, 0)
- coroutine.wrap(function()
- for i = 0, 5, .1 do
- wait(1 / 60)
- p.CFrame = p.CFrame
- mesh.Scale = mesh.Scale + Vector3.new(.5, 0, .5)
- p.Transparency = p.Transparency + .025
- end
- p:Destroy()
- end)()
- end
- function firespaz1(color, pos1)
- local p = Instance.new('Part', m)
- p.BrickColor = BrickColor.new(color)
- p.CFrame = pos1
- p.Anchored = true
- p.Material = 'Plastic'
- p.CanCollide = false
- p.TopSurface = 0
- p.Size = Vector3.new(1, 1, 1)
- p.BottomSurface = 0
- p.Transparency = 0.5
- p.FormFactor = 'Custom'
- local mesh = Instance.new('BlockMesh', p)
- mesh.Scale = Vector3.new(1, 1, 1)
- coroutine.wrap(function()
- for i = 0, 15, .1 do
- wait(1 / 30)
- p.CFrame = p.CFrame * CFrame.new(0, .1, 0)
- mesh.Scale = mesh.Scale - Vector3.new(.1, .1, .1)
- p.Transparency = p.Transparency + .025
- end
- p:Destroy()
- end)()
- end
- function pickrandom(tablesa)
- local randomized = tablesa[math.random(1, #tablesa)]
- return randomized
- end
- function sound(id, pitch, volume, par, last)
- local s = Instance.new('Sound', par or Torso)
- s.SoundId = 'rbxassetid://'..id
- s.Pitch = pitch or 1
- s.Volume = volume or 1
- wait()
- s:play()
- game.Debris:AddItem(s, last or 120)
- end
- function clangy(cframe)
- wait(1 / 60)
- local clang = {}
- local dis = 0
- local part = Instance.new('Part', nil)
- part.CFrame = cframe
- part.Anchored = true
- part.CanCollide = false
- part.BrickColor = BrickColor.new('New Yeller')
- part.FormFactor = 'Custom'
- part.Name = 'clanger'
- part.Size = Vector3.new(.2, .2, .2)
- part.TopSurface = 10
- part.BottomSurface = 10
- part.RightSurface = 10
- part.LeftSurface = 10
- part.BackSurface = 10
- part.FrontSurface = 10
- --part.Material='Neon'
- part:BreakJoints()
- local mesh = Instance.new('BlockMesh', part)
- coroutine.wrap(function()
- for i = 1, 7 do
- wait(1 / 60)
- dis = dis + .2
- local partc = part:clone()
- partc.Parent = workspace
- partc.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(dis, 0, 0)
- partc.CFrame = partc.CFrame * CFrame.new(0, dis, 0)
- table.insert(clang, partc)
- end
- for i, v in pairs(clang) do
- coroutine.wrap(function()
- for i = 1, 10 do
- wait(.01)
- v.Transparency = v.Transparency + .1
- end
- v:destroy()
- end)()
- end
- end)()
- end
- --damage effects
- --Effects
- so = function(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local sou = Instance.new("Sound", par or workspace)
- sou.Volume = vol
- sou.Pitch = pit or 1
- sou.SoundId = id
- wait()
- sou:play()
- game:GetService("Debris"):AddItem(sou, 6)
- end))
- end
- local function getclosest(obj, distance)
- local last, lastx = distance + 1
- for i, v in pairs(workspace:GetChildren()) do
- if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
- local t = v.Torso
- local dist = (t.Position - obj.Position).magnitude
- if dist <= distance then
- if dist < last then
- last = dist
- lastx = v
- end
- end
- end
- end
- return lastx
- end
- function makegui(cframe, text)
- local a = math.random(-10, 10) / 100
- local c = Instance.new("Part")
- c.Transparency = 1
- Instance.new("BodyGyro").Parent = c
- c.Parent = m
- c.CFrame = CFrame.new(cframe.p + Vector3.new(0, 1.5, 0))
- local f = Instance.new("BodyPosition")
- f.P = 2000
- f.D = 100
- f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- f.position = c.Position + Vector3.new(0, 3, 0)
- f.Parent = c
- game:GetService("Debris"):AddItem(c, .5 + 6)
- c.CanCollide = false
- m.Parent = workspace
- c.CanCollide = false
- local bg = Instance.new('BillboardGui', m)
- bg.Adornee = c
- bg.Size = UDim2.new(1, 0, 1, 0)
- bg.StudsOffset = Vector3.new(0, 0, 0)
- bg.AlwaysOnTop = false
- local tl = Instance.new('TextLabel', bg)
- tl.BackgroundTransparency = 1
- tl.Size = UDim2.new(1, 0, 1, 0)
- tl.Text = text
- tl.Font = 'SourceSansBold'
- tl.FontSize = 'Size42'
- if crit == true then
- tl.TextColor3 = Color3.new(180 / 255, 0, 0)
- else
- tl.TextColor3 = Color3.new(255, 180 / 255, 51 / 255)
- end
- tl.TextStrokeTransparency = 0
- tl.TextScaled = true
- tl.TextWrapped = true
- coroutine.wrap(function()
- wait(2)
- for i = 1, 10 do
- wait()
- tl.TextTransparency = tl.TextTransparency + .1
- end
- end)()
- end
- function tag(hum, Player)
- local creator = Instance.new('ObjectValue', hum)
- creator.Value = Player
- creator.Name = 'creator'
- end
- function untag(hum)
- if hum ~= nil then
- local tag = hum:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- function tagPlayer(h)
- coroutine.wrap(function()
- tag(h, Player)
- wait(1)
- untag(h)
- end)()
- end
- function damage(hit, mind, maxd, knock, type, prop)
- --[[
- to apply it to a Player directly, make the first arg go to the Players Torso
- 1 - normal type(damage and knockback)
- 2 - drain type(damage no knockback)
- 3 - lifesteal(absorbs hp) crit does not have an effect on how much life is absorbed
- 4 - heal(heals target)
- 5 - subtracts enemies defense
- 6 - subtracts enemies speed
- 7 -
- ]]
- if hit.Name:lower() == 'Hitbox' then
- local pos = CFrame.new(0, 1, -1)
- sound(pickrandom(clangsounds), math.random(100, 150) / 100, 1, Torso, 6)
- coroutine.wrap(function()
- for i = 1, 4 do
- clangy(Torso.CFrame * pos * CFrame.Angles(0, math.rad(math.random(0, 360)), 0))
- end
- end)()
- end
- if hit.Parent == nil then
- return
- end
- local h = hit.Parent:FindFirstChild("Humanoid")
- for i, v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h = v
- end
- end
- if hit.Parent.Parent:FindFirstChild('Torso') ~= nil then
- h = hit.Parent.Parent:FindFirstChild('Humanoid')
- end
- if hit.Parent:IsA('Hat') then
- hit = hit.Parent.Parent:findFirstChild('Head')
- end
- local D = math.random(mind, maxd) * damagea.Value
- if h.Parent:FindFirstChild('Stats') then
- D = D / h.Parent:FindFirstChild('Stats').Defence.Value
- elseif not h.Parent:FindFirstChild('Stats') then
- D = D
- end
- if h then
- makegui(h.Parent.Head.CFrame, tostring(math.floor(D + .5)))
- end
- if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
- if type == 1 then
- tagPlayer(h)
- local asd = randomizer(critchance)
- if asd == true then
- turncrit()
- end
- if crit == false then
- h.Health = h.Health - D
- else
- h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
- end
- so("http://www.roblox.com/asset/?id=169462037", hit, 1, math.random(150, 200) / 100)
- local vp = Instance.new('BodyVelocity')
- vp.P = 500
- vp.maxForce = Vector3.new(math.huge, 0, math.huge)
- vp.velocity = prop.CFrame.lookVector * knock + prop.Velocity / 1.05
- if knock > 0 then
- vp.Parent = hit.Parent.Torso
- end
- game:GetService("Debris"):AddItem(vp, .5)
- elseif type == 2 then
- so("http://www.roblox.com/asset/?id=169462037", hit, 1, math.random(150, 200) / 100)
- local asd = randomizer(critchance)
- if asd == true then
- turncrit()
- end
- if crit == false then
- h.Health = h.Health - D
- else
- h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
- end
- tagPlayer(h)
- elseif type == 3 then
- tagPlayer(h)
- local asd = randomizer(critchance)
- if asd == true then
- turncrit()
- end
- if crit == false then
- h.Health = h.Health - D
- else
- h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
- end
- Character.Humanoid.Health = Character.Humanoid.Health + D / 2
- so("http://www.roblox.com/asset/?id=206083232", hit, 1, 1.5)
- for i = 1, 10 do
- firespaz1('Bright red', hit.CFrame * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3)))
- end
- elseif type == 4 then
- h.Health = h.Health + D
- so("http://www.roblox.com/asset/?id=186883084", hit, 1, 1)
- circle('Dark green', h.Parent.Torso.CFrame * CFrame.new(0, -2.5, 0))
- end
- end
- end
- function subtrackstamina(k)
- if stamina >= k then
- stamina = stamina - k
- end
- end
- mouse.Button1Down:connect(function()
- end)
- mouse.KeyDown:connect(function(k)
- k = k:lower()
- end)
- inputserv.InputBegan:connect(function(k)
- if k.KeyCode == Enum.KeyCode.One and typing == false and cooldown3 >= co1 and stamina >= skill1stam then
- elseif k.KeyCode == Enum.KeyCode.Two and typing == false and cooldown3 >= co2 and stamina >= skill2stam then
- elseif k.KeyCode == Enum.KeyCode.Three and typing == false and cooldown3 >= co3 and stamina >= skill3stam then
- elseif k.KeyCode == Enum.KeyCode.Four and typing == false and cooldown3 >= co4 and stamina >= skill4stam then
- end
- end)
- inputserv.InputBegan:connect(function(k)
- if k.KeyCode == Enum.KeyCode.Slash then
- local fin = nil
- typing = true
- fin = inputserv.InputBegan:connect(function(k)
- if k.KeyCode == Enum.KeyCode.Return or k.UserInputType == Enum.UserInputType.MouseButton1 then
- typing = false
- fin:disconnect()
- end
- end)
- end
- end)
- function updateskills()
- if cooldown1 <= co1 then
- cooldown1 = cooldown1 + 1 / 30
- end
- if cooldown2 <= co2 then
- cooldown2 = cooldown2 + 1 / 30
- end
- if cooldown3 <= co3 then
- cooldown3 = cooldown3 + 1 / 30
- end
- if cooldown4 <= co4 then
- cooldown4 = cooldown4 + 1 / 30
- end
- if stamina <= maxstamina then
- stamina = stamina + recovermana / 30
- end
- end
- game:GetService'RunService'.Heartbeat:connect(function()
- updateskills()
- healthcover:TweenSize(ud(1 * (Character.Humanoid.Health / Character.Humanoid.MaxHealth), 0, 1, 0), 'Out', 'Quad', .5)
- staminacover:TweenSize(ud(1 * (stamina / maxstamina), 0, 1, 0), 'Out', 'Quad', .5)
- bar4:TweenSize(ud(1 * (cooldown1 / co1), 0, 1, 0), 'Out', 'Quad', .5)
- bar3:TweenSize(ud(1 * (cooldown2 / co2), 0, 1, 0), 'Out', 'Quad', .5)
- bar1:TweenSize(ud(1 * (cooldown3 / co3), 0, 1, 0), 'Out', 'Quad', .5)
- bar2:TweenSize(ud(1 * (cooldown4 / co4), 0, 1, 0), 'Out', 'Quad', .5)
- Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- velocity = RootPart.Velocity.y
- sine = sine + change
- local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
- Character.Humanoid.WalkSpeed = 16 * speed.Value
- if equipped == true or equipped == false then
- if RootPart.Velocity.y > 1 and hit == nil and stun.Value ~= true then
- Anim = "Jump"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- end
- elseif RootPart.Velocity.y < -1 and hit == nil and stun.Value ~= true then
- Anim = "Fall"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- end
- elseif Torsovelocity < 1 and hit ~= nil and stun.Value ~= true then
- Anim = "Idle"
- if attack == false then
- change = 1
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- end
- elseif Torsovelocity > 2 and hit ~= nil and stun.Value ~= true then
- Anim = "Walk"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement