Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game.Players.LocalPlayer
- local plr = game.Players.LocalPlayer
- local chr = plr.Character
- local maus = plr:GetMouse()
- local PGui=plr.PlayerGui
- local lleg = chr["Left Leg"]
- local rleg = chr["Right Leg"]
- local larm = chr["Left Arm"]
- local rarm = chr["Right Arm"]
- local hed = chr.Head
- local rutprt = chr.HumanoidRootPart
- local torso = chr.Torso
- local otheranims=false
- local swimming=false
- local attacking = false
- local modeColor = "White"
- local IT = Instance.new
- local VT = Vector3.new
- local aura_music = Instance.new("Sound",chr.Head)
- aura_music.Volume = 7
- aura_music.Looped = true
- aura_music.SoundId='rbxassetid://869918352'
- aura_music.Name = "Ok"
- aura_music:Play()
- spawn(function()
- while wait() do
- if chr.Head:FindFirstChild("Ok") then return
- else
- local aura_music = Instance.new("Sound",chr.Head)
- aura_music.Volume = 7
- aura_music.Looped = true
- aura_music.SoundId='rbxassetid://869918352'
- aura_music.Name = "Ok"
- aura_music:Play()
- end
- end
- end)
- ---//*DEBOUNCES
- canChangeFromC = true
- canChangeFromA = true
- canChangeFromCF = true
- canChangeFromSF = true
- canChangeFromPT = true
- canChangeFromGT = true
- canChangeFromUT = true
- ----
- canChangeFromMT = true
- ----*\\
- --//*Instances
- ---*\\
- -----*\\
- 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 rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- canChangeFromC = true
- canChangeFromA = true
- canChangeFromCF = true
- canChangeFromSF = true
- canChangeFromPT = true
- canChangeFromGT = true
- canChangeFromUT = true
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- chr.Animate.Disabled=true
- local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
- local RunSpeed=30
- local WlkSpeed=16
- local SwimSpeed=14
- local SwimDashSpeed=28
- local anim = "Idling"
- local lastanim = "Idling"
- local val = 0
- local syne = 0
- local num = 0
- local runtime = 0
- coroutine.wrap(function()
- for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
- function Lerp(a, b, i)
- local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
- local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
- local calx = com1[1] + (com2[1] - com1[1]) * i
- local caly = com1[2] + (com2[2] - com1[2]) * i
- local calz = com1[3] + (com2[3] - com1[3]) * i
- local cala = com1[4] + (com2[4] - com1[4]) * i
- local calb = com1[5] + (com2[5] - com1[5]) * i
- local calc = com1[6] + (com2[6] - com1[6]) * i
- return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
- end
- function TwnSingleNumber(s,f,m)
- local wot=s+(f-s)*m
- return wot
- end
- function TwnVector3(q,w,e)
- local begin={q.x,q.y,q.z}
- local ending={w.x,w.y,w.z}
- local bgx=begin[1]+(ending[1]-begin[1])*e
- local bgy=begin[2]+(ending[2]-begin[2])*e
- local bgz=begin[3]+(ending[3]-begin[3])*e
- return Vector3.new(bgx,bgy,bgz)
- end
- newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
- wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- end
- local angles = CFrame.Angles
- function clerp(a, b, t)
- return a:lerp(b, t)
- end
- newWeld(law, torso, larm, -1.5, 0.5, 0)
- newWeld(raw, torso, rarm, 1.5, 0.5, 0)
- newWeld(llw, torso, lleg, -.5, -2, 0)
- newWeld(rlw, torso, rleg, .5, -2, 0)
- newWeld(hw, torso, hed, 0, 1.5, 0)
- local rutwald=Instance.new('Weld',rutprt)
- rutwald.Part0=rutprt
- rutwald.Part1=torso
- rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
- larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
- rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
- rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
- lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
- ---//*MOVES
- --*\\
- maus.KeyDown:connect(function(kei)
- if string.byte(kei)==48 and not otheranims then
- runnin=true
- end
- if kei=='w' then fldb.w=true end
- if kei=='a' then fldb.a=true end
- if kei=='s' then fldb.s=true end
- if kei=='d' then fldb.d=true end
- end)
- maus.KeyUp:connect(function(kei)
- if string.byte(kei)==48 and not otheranims then
- runnin=false
- end
- if kei=='w' then fldb.w=false end
- if kei=='a' then fldb.a=false end
- if kei=='s' then fldb.s=false end
- if kei=='d' then fldb.d=false end
- end)
- CFuncs = {
- Part = {
- Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
- local Part = Create("Part")({
- 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
- },
- Mesh = {
- Create = function(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
- },
- Mesh = {
- Create = function(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
- },
- Weld = {
- Create = function(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld")({
- Parent = Parent,
- Part0 = Part0,
- Part1 = Part1,
- C0 = C0,
- C1 = C1
- })
- return Weld
- end
- },
- Sound = {
- Create = function(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local S = Create("Sound")({
- Volume = vol,
- Pitch = pit or 1,
- SoundId = id,
- Parent = par or workspace
- })
- wait()
- S:play()
- game:GetService("Debris"):AddItem(S, 6)
- end))
- end
- },
- ParticleEmitter = {
- Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
- local fp = Create("ParticleEmitter")({
- Parent = Parent,
- Color = ColorSequence.new(Color1, Color2),
- LightEmission = LightEmission,
- Size = Size,
- Texture = Texture,
- Transparency = Transparency,
- ZOffset = ZOffset,
- Acceleration = Accel,
- Drag = Drag,
- LockedToPart = LockedToPart,
- VelocityInheritance = VelocityInheritance,
- EmissionDirection = EmissionDirection,
- Enabled = Enabled,
- Lifetime = LifeTime,
- Rate = Rate,
- Rotation = Rotation,
- RotSpeed = RotSpeed,
- Speed = Speed,
- VelocitySpread = VelocitySpread
- })
- return fp
- end
- }
- }
- 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
- EffectModel = Instance.new("Model", char)
- Effects = {
- Block = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
- local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- if Type == 1 or Type == nil then
- table.insert(Effects, {
- prt,
- "Block1",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- elseif Type == 2 then
- table.insert(Effects, {
- prt,
- "Block2",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- else
- table.insert(Effects, {
- prt,
- "Block3",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- end
- },
- Sphere = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- },
- Cylinder = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- },
- Wave = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3 / 60,
- y3 / 60,
- z3 / 60,
- msh
- })
- end
- },
- Ring = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- },
- Break = {
- Create = function(brickcolor, cframe, x1, y1, z1)
- local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- local num = math.random(10, 50) / 1000
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Shatter",
- num,
- prt.CFrame,
- math.random() - math.random(),
- 0,
- math.random(50, 100) / 100
- })
- end
- },
- Spiral = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- },
- Push = {
- Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- }
- }
- local Torso = chr.Torso
- function CreateSound(ID, PARENT, VOLUME, PITCH)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = Instance.new("Sound", PARENT)
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- swait()
- NEWSOUND:play()
- game:GetService("Debris"):AddItem(NEWSOUND, 10)
- end))
- return NEWSOUND
- end
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Anchored = true
- NEWPART.Locked = true
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- ----
- canChangeFromMT = true
- ----*\\
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- ---//*Character
- chr.Head.face:Destroy()
- function debounce(func)
- local isRunning = false -- Create a local debounce variable
- return function(...) -- Return a new function
- if not isRunning then
- isRunning = true
- func(...) -- Call it with the original arguments
- isRunning = false
- end
- end
- end
- function CreateSound(ID, PARENT, VOLUME, PITCH)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = Instance.new("Sound", PARENT)
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- swait()
- NEWSOUND:play()
- game:GetService("Debris"):AddItem(NEWSOUND, 10)
- end))
- return NEWSOUND
- 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 Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
- if hit.Parent == nil then
- return
- end
- local h = hit.Parent:FindFirstChildOfClass("Humanoid")
- for _, v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h = v
- end
- end
- if h ~= nil and hit.Parent.Name ~= chr.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
- warn'No R15 allowed'
- hit.Parent:FindFirstChild("Head"):BreakJoints()
- end
- if h ~= nil and hit.Parent.Name ~= chr.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
- if hit.Parent:findFirstChild("DebounceHit") ~= nil then
- if hit.Parent.DebounceHit.Value == true then
- return
- end
- end
- if insta == true then
- hit.Parent:FindFirstChild("Head"):BreakJoints()
- end
- local c = Create("ObjectValue"){
- Name = "creator",
- Value = game:service("Players").LocalPlayer,
- Parent = h,
- }
- game:GetService("Debris"):AddItem(c, .5)
- if HitSound ~= nil and HitPitch ~= nil then
- CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
- end
- local Damage = math.random(minim, maxim)
- local blocked = false
- local block = hit.Parent:findFirstChild("Block")
- if block ~= nil then
- if block.className == "IntValue" then
- if block.Value > 0 then
- blocked = true
- block.Value = block.Value - 1
- print(block.Value)
- end
- end
- end
- if blocked == false then
- h.Health = h.Health - Damage
- ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
- else
- h.Health = h.Health - (Damage / 2)
- ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
- end
- if Type == "Knockdown" then
- local hum = hit.Parent.Humanoid
- hum.PlatformStand = true
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(1)
- HHumanoid.PlatformStand = false
- end), hum)
- local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
- local bodvol = Create("BodyVelocity"){
- velocity = angle * knockback,
- P = 5000,
- maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
- Parent = hit,
- }
- local rl = Create("BodyAngularVelocity"){
- P = 3000,
- maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
- angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
- Parent = hit,
- }
- game:GetService("Debris"):AddItem(bodvol, .5)
- game:GetService("Debris"):AddItem(rl, .5)
- elseif Type == "Normal" then
- local vp = Create("BodyVelocity"){
- P = 500,
- maxForce = Vector3.new(math.huge, 0, math.huge),
- velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
- }
- if knockback > 0 then
- vp.Parent = hit.Parent.Torso
- end
- game:GetService("Debris"):AddItem(vp, .5)
- elseif Type == "Up" then
- local bodyVelocity = Create("BodyVelocity"){
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
- Parent = hit,
- }
- game:GetService("Debris"):AddItem(bodyVelocity, .5)
- elseif Type == "DarkUp" then
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, 0.1 do
- swait()
- Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
- end
- end))
- local bodyVelocity = Create("BodyVelocity"){
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
- Parent = hit,
- }
- game:GetService("Debris"):AddItem(bodyVelocity, 1)
- elseif Type == "Snare" then
- local bp = Create("BodyPosition"){
- P = 2000,
- D = 100,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso,
- }
- game:GetService("Debris"):AddItem(bp, 1)
- elseif Type == "Freeze" then
- local BodPos = Create("BodyPosition"){
- P = 50000,
- D = 1000,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso,
- }
- local BodGy = Create("BodyGyro") {
- maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
- P = 20e+003,
- Parent = hit.Parent.Torso,
- cframe = hit.Parent.Torso.CFrame,
- }
- hit.Parent.Torso.Anchored = true
- coroutine.resume(coroutine.create(function(Part)
- swait(1.5)
- Part.Anchored = false
- end), hit.Parent.Torso)
- game:GetService("Debris"):AddItem(BodPos, 3)
- game:GetService("Debris"):AddItem(BodGy, 3)
- end
- local debounce = Create("BoolValue"){
- Name = "DebounceHit",
- Parent = hit.Parent,
- Value = true,
- }
- game:GetService("Debris"):AddItem(debounce, Delay)
- c = Create("ObjectValue"){
- Name = "creator",
- Value = Player,
- Parent = h,
- }
- game:GetService("Debris"):AddItem(c, .5)
- end
- end
- function ShowDamage(Pos, Text, Time, Color)
- local Rate = (1 / 30)
- local Pos = (Pos or Vector3.new(0, 0, 0))
- local Text = (Text or "")
- local Time = (Time or 2)
- local Color = (Color or Color3.new(1, 0, 1))
- local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
- EffectPart.Anchored = true
- local BillboardGui = Create("BillboardGui"){
- Size = UDim2.new(3, 0, 3, 0),
- Adornee = EffectPart,
- Parent = EffectPart,
- }
- local TextLabel = Create("TextLabel"){
- BackgroundTransparency = 1,
- Size = UDim2.new(1, 0, 1, 0),
- Text = Text,
- Font = "Highway",
- TextColor3 = Color,
- TextScaled = true,
- Parent = BillboardGui,
- }
- game.Debris:AddItem(EffectPart, (Time))
- EffectPart.Parent = game:GetService("Workspace")
- delay(0, function()
- local Frames = (Time / Rate)
- for Frame = 1, Frames do
- wait(Rate)
- local Percent = (Frame / Frames)
- EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
- TextLabel.TextTransparency = Percent
- end
- if EffectPart and EffectPart.Parent then
- EffectPart:Destroy()
- end
- end)
- end
- function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
- for _, c in pairs(workspace:children()) do
- local hum = c:findFirstChild("Humanoid")
- if hum ~= nil then
- local head = c:findFirstChild("Head")
- if head ~= nil then
- local targ = head.Position - Part.Position
- local mag = targ.magnitude
- if magni >= mag and c.Name ~= plr.Name then
- Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=231917784", 1.2)
- end
- end
- end
- end
- end
- function HitboxFunction(Pose, lifetime, siz1, siz2, siz3, Radie, Min, Max, kb, atype)
- Hitboxpart = Instance.new("Part", EffectModel)
- Hitboxpart.Size = Vector3.new(siz1, siz2, siz3)
- Hitboxpart.CanCollide = false
- Hitboxpart.Transparency = 1
- Hitboxpart.Anchored = true
- Hitboxpart.CFrame = Pose
- game:GetService("Debris"):AddItem(Hitboxpart, lifetime)
- MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype)
- end
- ---*\\
- local hum = chr.Humanoid
- function CreateWave(inair,size,doesrotate,rotatedirection,waitt,part,offset,BrickColor)
- spawn(function()
- local wave = CreatePart(3, workspace, "Neon", 0, 0.5, BrickColor, "Effect", VT(0,0,0))
- local mesh = Instance.new("SpecialMesh",wave)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- mesh.Scale = Vector3.new(size,size,size)
- mesh.Offset = Vector3.new(0,0,-size/8)
- wave.CFrame = CFrame.new(part.Position) * CFrame.new(0,offset,0) * CFrame.Angles(RAD(inair),RAD(0),RAD(0))
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
- mesh.Offset = Vector3.new(0,0,-(mesh.Scale.X/8))
- if doesrotate == true then
- wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
- end
- wave.Transparency = wave.Transparency + (0.5/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end)
- end
- attack = false
- function PT(Part,Time)
- --aaa
- end
- --[[
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local torso = char.Torso
- local head = char.Head
- local att = 1
- local pewcom = 1
- maus.KeyDown:connect(function(kei)
- if kei == "r" then
- if attack == false then
- attack = true
- if pewcom == 1 then
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(90)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),.7)
- end
- pew(rarm)
- pewcom = 2
- elseif pewcom == 2 then
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(-90)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),.7)
- end
- pew(larm)
- pewcom = 1
- end
- end
- attack = false
- end
- end)
- maus.KeyDown:connect(function(kei)
- if kei == "q" then
- if attack == false then
- attack = true
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
- end
- wait(.4)
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(150)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
- end
- function sphere()
- AExplodeP = Instance.new("Part",workspace)
- AExplodeP.Anchored = true
- AExplodeP.TopSurface = 0
- AExplodeP.Material = "Neon"
- AExplodeP.BottomSurface = 0
- AExplodeP.CanCollide = false
- AExplodeP.CFrame = chr["Right Arm"].CFrame*CFrame.new(0,-3,0)
- AExplodeP.BrickColor = BrickColor.new(modeColor)
- AExplodeP.Size = Vector3.new(1,1,1)
- AExplodeM = Instance.new("SpecialMesh",AExplodeP)
- AExplodeM.MeshType = "Sphere"
- for i = 1,10,2 do wait()
- AExplodeM.Scale = Vector3.new(i,i,i)
- AExplodeP.Transparency = i/50
- end
- AExplodeP:Remove()
- end
- for i = 1,10 do
- sphere()
- end
- spawn(function()
- lasering = true
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
- end
- wait(5)
- lasering = false
- attack = false
- end)
- end
- end
- end)
- maus.Button1Down:connect(function(key)
- if attack == false then
- attack = true
- if att == 1 then
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(120),math.rad(90)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(0)),.7)
- end
- wait(.1)
- HitboxFunction(rarm.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
- if shad == true then
- CreateWave(0,3.5,true,0.2,25,rarm,-1,BrickColor.new("Really black"))
- CreateWave(0,3,true,-0.2,25,rarm,-1,BrickColor.new("Really black"))
- CreateWave(0,2.5,true,0.2,25,rarm,-1,BrickColor.new("Really black"))
- CreateWave(0,2,true,-0.2,25,rarm,-1,BrickColor.new("Really black"))
- else
- CreateWave(0,3.5,true,0.2,25,rarm,-1,BrickColor.new("White"))
- CreateWave(0,3,true,-0.2,25,rarm,-1,BrickColor.new("White"))
- CreateWave(0,2.5,true,0.2,25,rarm,-1,BrickColor.new("White"))
- CreateWave(0,2,true,-0.2,25,rarm,-1,BrickColor.new("White"))
- end
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
- end
- att = 2
- attack = false
- elseif att == 2 then
- attack = true
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(-120),math.rad(-90)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
- end
- wait(.1)
- HitboxFunction(larm.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
- if shad == true then
- CreateWave(0,3.5,true,0.2,25,larm,-1,BrickColor.new("Really black"))
- CreateWave(0,3,true,-0.2,25,larm,-1,BrickColor.new("Really black"))
- CreateWave(0,2.5,true,0.2,25,larm,-1,BrickColor.new("Really black"))
- CreateWave(0,2,true,-0.2,25,larm,-1,BrickColor.new("Really black"))
- else
- CreateWave(0,3.5,true,0.2,25,larm,-1,BrickColor.new("White"))
- CreateWave(0,3,true,-0.2,25,larm,-1,BrickColor.new("White"))
- CreateWave(0,2.5,true,0.2,25,larm,-1,BrickColor.new("White"))
- CreateWave(0,2,true,-0.2,25,larm,-1,BrickColor.new("White"))
- end
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(-40),math.rad(-90)),.7)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(0)),.7)
- end
- att = 3
- attack = false
- elseif att == 3 then
- attack = true
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(3)),.5)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.5)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.5)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1,-1)*CFrame.Angles(math.rad(-20),0,math.rad(2.5)),.5)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),.5)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(30),math.rad(0),math.rad(0)),.5)
- end
- wait(.1)
- HitboxFunction(rleg.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
- if shad == true then
- CreateWave(0,3.5,true,0.2,25,rleg,-1,BrickColor.new("Really black"))
- CreateWave(0,3,true,-0.2,25,rleg,-1,BrickColor.new("Really black"))
- CreateWave(0,2.5,true,0.2,25,rleg,-1,BrickColor.new("Really black"))
- CreateWave(0,2,true,-0.2,25,rleg,-1,BrickColor.new("Really black"))
- else
- CreateWave(0,3.5,true,0.2,25,rleg,-1,BrickColor.new("White"))
- CreateWave(0,3,true,-0.2,25,rleg,-1,BrickColor.new("White"))
- CreateWave(0,2.5,true,0.2,25,rleg,-1,BrickColor.new("White"))
- CreateWave(0,2,true,-0.2,25,rleg,-1,BrickColor.new("White"))
- end
- for i = 0, 1, 0.1 do
- wait()
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-30),0,math.rad(3)),.5)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-30),0,math.rad(-3)),.5)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.5)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,-1)*CFrame.Angles(0,0,math.rad(2.5)),.5)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),.5)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(-30),math.rad(0),math.rad(0)),.5)
- end
- wait(.3)
- att = 1
- attack = false
- end
- end
- end)--]]
- game:service'RunService'.RenderStepped:connect(function()
- if anim~=lastanim then
- runtime=0
- end
- lastanim=anim
- chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
- syne=syne+.95
- if not otheranims and not swimming then
- if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
- anim="Idling"
- elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
- anim="Walking"
- elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
- anim="Sprinting"
- elseif chr.Humanoid.Jump then
- anim='Jumping'
- elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
- anim='Falling'
- end
- end
- if anim=="Idling" and attack == false then
- idlesineinc=35
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.1,.35+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(-40)),.1)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.35+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(30)),.1)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,math.rad(-60),0),.1)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(60),math.rad(0)),.1)
- end
- if anim=="Walking" and attack == false then
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(.9,0.15+math.cos(syne/idlesineinc)/25,-.5)*CFrame.Angles(math.rad(40),0,math.rad(-60)),.1)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.5+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(10)),.1)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-3.5),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
- end
- if anim=="Sprinting" and attack == false then
- RunSpeed = 50
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(.9,0.15+math.cos(syne/idlesineinc)/25,-.5)*CFrame.Angles(math.rad(170),0,math.rad(-60)),.1)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.1+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(170),0,math.rad(10)),.1)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.2)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.2)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-10),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
- end
- if anim=="Jumping" and attack == false then
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-2.3,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-2,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
- end
- if anim=="Falling" and attack == false then
- rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035)
- larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035)
- lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035)
- rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035)
- hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035)
- rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035)
- end
- if runnin and not otheranims and not swimming then
- chr.Humanoid.WalkSpeed=RunSpeed
- elseif not runnin and not otheranims and not swimming then
- chr.Humanoid.WalkSpeed=WlkSpeed
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement