Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game:GetService("Players").ChristainVsRoblocks --<=== Replace With Your Name
- local Mouse,mouse,UserInputService,ContextActionService
- do
- script.Parent = Player.Character
- local CAS = {Actions={}}
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.Parent = Player.Character
- local fakeEvent = function()
- local t = {_fakeEvent=true}
- t.Connect = function(self,f)self.Function=f end
- t.connect = t.Connect
- return t
- end
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- function CAS:BindAction(name,fun,touch,...)
- CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
- end
- function CAS:UnbindAction(name)
- CAS.Actions[name] = nil
- end
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("Button1Down")
- else
- m:TrigEvent("Button1Up")
- end
- else
- for n,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputBegan",io,false)
- else
- m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputEnded",io,false)
- end
- end
- end)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- wait(1)
- local Player, Character = game:service("Players")., game:GetService("Players").ChristainVsRoblocks.Character;
- local Torso = Character:FindFirstChild("Torso")
- local rootPart = Character:FindFirstChild("HumanoidRootPart")
- local Humanoid = Character:FindFirstChild("Humanoid")
- local Head = Character:FindFirstChild("Head")
- local Right_Arm = Character:FindFirstChild("Right Arm")
- local Left_Arm = Character:FindFirstChild("Left Arm")
- local Right_Leg = Character:FindFirstChild("Right Leg")
- local Left_Leg = Character:FindFirstChild("Left Leg")
- local Right_Shoulder = Torso:FindFirstChild("Right Shoulder")
- local Left_Shoulder = Torso:FindFirstChild("Left Shoulder")
- local Right_Hip = Torso:FindFirstChild("Right Hip")
- local Left_Hip = Torso:FindFirstChild("Left Hip")
- local Neck = Torso:FindFirstChild("Neck")
- local rootPart = Character:FindFirstChild("HumanoidRootPart")
- local rootJoint = rootPart:FindFirstChild("RootJoint")
- local CurrentIdle = "Idling1"
- local Degree = 0.0175438596491228
- local canremove = false
- local debounce = false
- local UIService=game:GetService'UserInputService'
- Chase = "rbxassetid://884552387"
- Amb = "rbxassetid://290269649"
- ChasePitch = 1
- AmbPitch = 0.35
- sin = math.sin
- Right_Leg.FormFactor = "Custom";
- Left_Leg.FormFactor = "Custom";
- rootPart.Archivable = true;
- rootJoint.Archivable = true;
- c_new = CFrame.new;
- c_angles = CFrame.Angles;
- i_new = Instance.new
- Humanoid:ClearAllChildren();
- local isAttacking = false
- local isSprinting = false
- local Animations = false
- local Angle = 0
- local Axis = 0
- local angleSpeed = 1
- local axisSpeed = angleSpeed
- local currentAnim
- local levetatingheight = 3
- local WalkType = "Ground"
- Humanoid.DisplayDistanceType = "None"
- Humanoid.WalkSpeed = 5
- Humanoid.MaxHealth = "inf"
- Humanoid.Health = "inf"
- coroutine.wrap(function()
- while true and wait() do
- Humanoid.MaxHealth = "inf"
- Humanoid.Health = "inf"
- end
- end)()
- local Hair = Instance.new("Part",Head)
- Hair.Name = "Hair"
- Hair.Shape = Enum.PartType.Ball
- Hair.CanCollide = false
- Hair.BrickColor = BrickColor.new("Really black")
- Hair.Transparency = 0
- Hair.Material = "Grass"
- Hair.Size = Vector3.new(0.1, 0.1, 0.1)
- Hair.TopSurface = Enum.SurfaceType.Smooth
- Hair.BottomSurface = Enum.SurfaceType.Smooth
- local Weld = Instance.new("Weld", Hair)
- Weld.Part0 = Head
- Weld.Part1 = Hair
- Weld.C1 = CFrame.new(0,0.5,-0.1)
- HairMesh = Instance.new("FileMesh",Hair)
- HairMesh.MeshId = "http://www.roblox.com/asset/?id=243790019"
- HairMesh.TextureId = "http://www.roblox.com/asset/?id=7561048"
- HairMesh.Scale = Vector3.new(1,1,1)
- coroutine.wrap(function()
- while true and wait() do
- Humanoid:SetStateEnabled("Dead",false)
- Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
- Humanoid.DisplayDistanceType = "None"
- end
- end)()
- function Sound(parent,loop,vol,id)
- local s = Instance.new('Sound',parent)
- s.Looped = loop
- s.Volume = vol
- s.MaxDistance=200
- s.EmitterSize=20
- s.SoundId = 'rbxassetid://'..tostring(id)
- s:Play()
- if loop == false then
- wait(s.TimeLength)
- s:Destroy()
- end
- end
- Song = Instance.new("Sound",Character)
- Song.SoundId = Amb
- Song.Looped = true
- Song.Pitch = AmbPitch
- Song.Volume = 2
- Song.Playing = true
- newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
- wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- return wld
- end
- function noOutline(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- local function Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
- local partie = i_new("Part",parent)
- partie.Name=Name
- partie.BrickColor = BrickColor.new(Color)
- partie.Material = Material
- partie.Shape = Shape
- partie.Transparency = Transparency
- partie.Size = Size
- partie.CFrame = CFrame
- partie.CanCollide = CanCollide
- partie.Anchored = Anchored
- return partie
- end
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB: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 mesh(Mesh, part, meshtype, meshid, offset, scale)
- local mesh = i_new(Mesh)
- mesh.Parent = part
- if Mesh == "SpecialMesh" then
- mesh.MeshType = meshtype
- mesh.MeshId = meshid
- end
- mesh.Offset = offset
- mesh.Scale = scale
- return mesh
- end
- --Moves--
- invisible = false
- --Moves--
- 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 onTouch(part)
- local humanoid = part.Parent:findFirstChild("Humanoid")
- local model = part.Parent
- local torso = part.Parent:findFirstChild("Torso")
- local head = part.Parent:findFirstChild("Head")
- local leftleg = part.Parent:findFirstChild("Left Leg")
- local rightleg = part.Parent:findFirstChild("Right Leg")
- local leftarm = part.Parent:findFirstChild("Left Arm")
- local rightarm = part.Parent:findFirstChild("Right Arm")
- if humanoid.Health <= 0 then
- return
- end
- if sprint == false then
- return
- end
- if invisible == true then
- return
- end
- for i, v in pairs(findCloseHumanoid(Torso.Position, 10)) do
- humanoid.Health = 0
- head.BrickColor = BrickColor.new("Really black")
- torso.BrickColor = BrickColor.new("Really black")
- leftleg.BrickColor = BrickColor.new("Really black")
- rightleg.BrickColor = BrickColor.new("Really black")
- rightarm.BrickColor = BrickColor.new("Really black")
- leftarm.BrickColor = BrickColor.new("Really black")
- torso.Anchored = true
- e=Instance.new('Part', model)
- e.Size = Vector3.new(2.25,2.25,2.25)
- e.Transparency = 1
- e.Anchored = true
- e.CFrame = CFrame.new(head.Position)
- q=Instance.new('ParticleEmitter', e)
- q.Rate = 500
- q.Speed = NumberRange.new(7)
- q.VelocitySpread = 40
- q.Lifetime = NumberRange.new(0.1,1)
- q.Texture = 'rbxassetid://164417280'
- q.Acceleration = Vector3.new(0,-50,0)
- q.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5, 0.1), NumberSequenceKeypoint.new(1, 0.01, 0.01)})
- q.RotSpeed = NumberRange.new(-180, 180)
- q.Rotation = NumberRange.new(-360, 360)
- q.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.2, 0), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
- S = Instance.new("Sound")
- S.Parent = Character.Torso
- S.SoundId = "rbxassetid://337667089"
- S.Volume = 10
- S.Looped = false
- S.Pitch = 1
- S:Play()
- end
- end
- Character.Torso.Touched:connect(onTouch)
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position, Direction, MaxDistance, IgnoreDescendants
- return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- 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 m11 > m00 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 >= 0.0001 then
- if (1 - cosTheta) > 0.0001 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
- else
- if (1+cosTheta) > 0.0001 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
- 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 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
- swait()
- LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
- Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
- RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
- Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
- LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
- RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
- Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
- Torso.Weld.C1 = CFrame.new(0, -1, 0)
- Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
- for i,v in pairs(Character:GetChildren()) do
- if v:IsA('Accoutrement') or v:IsA('Shirt') or v:IsA('Pants') then
- v:Destroy()
- elseif v:IsA('Part') and v.Name=='Head' then
- v.face:Destroy()
- end
- end
- Character['Body Colors'].HeadColor=BrickColor.new('Really black')
- Character['Body Colors'].TorsoColor=BrickColor.new('Really black')
- Character['Body Colors'].RightArmColor=BrickColor.new('Really black')
- Character['Body Colors'].LeftArmColor=BrickColor.new('Really black')
- Character['Body Colors'].RightLegColor=BrickColor.new('Really black')
- Character['Body Colors'].LeftLegColor=BrickColor.new('Really black')
- Humanoid.DisplayDistanceType='None'
- --Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
- --newWeld(wp0, wp1, wc0x, wc0y, wc0z)
- local LEye=Part('LEye','New Yeller','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character)
- Mesh = Instance.new("SpecialMesh",LEye)
- Mesh.MeshType = "Sphere"
- Mesh.Scale = Vector3.new(1,1,1)
- Mesh.Offset = Vector3.new(-0.3,0.1,-0.55)
- newWeld(Head,LEye,0,0,0)
- local LEGlow=Instance.new('SurfaceLight')
- LEGlow.Color=Color3.fromRGB(255,0,0)
- LEGlow.Range=6
- LEGlow.Brightness=10
- LEGlow.Parent=LEye
- local BodMesh = Instance.new("CharacterMesh", Character)
- BodMesh.BodyPart = "Torso"
- wait()
- BodMesh.MeshId = "27111894"
- local BodMesh = Instance.new("CharacterMesh", Character)
- BodMesh.BodyPart = "RightArm"
- wait()
- BodMesh.MeshId = "98332573"
- BodMesh.OverlayTextureId = "136169861"
- local BodMesh = Instance.new("CharacterMesh", Character)
- BodMesh.BodyPart = "LeftArm"
- wait()
- BodMesh.MeshId = "98332476"
- BodMesh.OverlayTextureId = "136169861"
- local BodMesh = Instance.new("CharacterMesh", Character)
- BodMesh.BodyPart = "RightLeg"
- wait()
- BodMesh.MeshId = "27111882"
- local BodMesh = Instance.new("CharacterMesh", Character)
- BodMesh.BodyPart = "LeftLeg"
- wait()
- BodMesh.MeshId = "27111857"
- pants = Instance.new("Pants",Character)
- wait()
- pants.PantsTemplate = "rbxassetid://192706483"
- sine = 0
- change = 1
- sprint=false
- local punches={
- a=false,
- b=false,
- c=false
- }
- mouse.KeyDown:Connect(function()
- if punches.a==false then
- punches.a=true wait(.4) punches.a=false
- else
- punches.a=true
- print('a ',punches.a)
- if punches.b==false then
- punches.b=true wait(.4) punches.b=false
- else
- punches.b=true
- print('b ',punches.b)
- if punches.c==false then
- punches.c=true wait(.4) punches.c=false
- else
- punches.c=true
- print('c ',punches.c)
- print('a ',punches.a,'b ',punches.b,'c ',punches.c)
- end
- end
- end
- end)
- mouse.KeyDown:Connect(function(k)
- if k == "leftshift" then
- sprint=true
- if Song.SoundId == Chase then
- return
- end
- if invisible == false and sprint == true then
- for i = 1,10 do
- Song.Volume = Song.Volume - 0.1
- swait()
- end
- Song.SoundId = Chase
- Song.Pitch = ChasePitch
- Song:Play()
- for i = 1,20 do
- Song.Volume = Song.Volume + 0.1
- swait()
- end
- else if invisible == true and sprint == true then
- if Song.SoundId == Amb then
- return
- end
- for i = 1,20 do
- Song.Volume = Song.Volume - 0.1
- swait()
- end
- Song.SoundId = Amb
- Song.Pitch = AmbPitch
- Song:Play()
- for i = 1,10 do
- Song.Volume = Song.Volume + 0.1
- swait()
- end
- end
- end
- end
- if k == "x" then
- if invisible == false then
- invisible = true
- Hair.Transparency = 0.2
- Head.Transparency = 0.2
- Left_Arm.Transparency = 0.2
- Right_Arm.Transparency = 0.2
- Torso.Transparency = 0.2
- Left_Leg.Transparency = 0.2
- Right_Leg.Transparency = 0.2
- wait()
- Hair.Transparency = 0.4
- Head.Transparency = 0.4
- Left_Arm.Transparency = 0.4
- Right_Arm.Transparency = 0.4
- Torso.Transparency = 0.4
- Left_Leg.Transparency = 0.4
- Right_Leg.Transparency = 0.4
- wait()
- Hair.Transparency = 0.6
- Head.Transparency = 0.6
- Left_Arm.Transparency = 0.6
- Right_Arm.Transparency = 0.6
- Torso.Transparency = 0.6
- Left_Leg.Transparency = 0.6
- Right_Leg.Transparency = 0.6
- wait()
- Hair.Transparency = 0.8
- Head.Transparency = 0.8
- Left_Arm.Transparency = 0.8
- Right_Arm.Transparency = 0.8
- Torso.Transparency = 0.8
- Left_Leg.Transparency = 0.8
- Right_Leg.Transparency = 0.8
- wait()
- Hair.Transparency = 1
- Head.Transparency = 1
- Left_Arm.Transparency = 1
- Right_Arm.Transparency = 1
- Torso.Transparency = 1
- Left_Leg.Transparency = 1
- Right_Leg.Transparency = 1
- if sprint==true and Song.SoundId == Chase and invisible == true then
- Song.SoundId = Amb
- Song.Pitch = AmbPitch
- Song:Play()
- end
- if sprint==true and Song.SoundId == Amb and invisible == false then
- Song.SoundId = Chase
- Song.Pitch = ChasePitch
- Song:Play()
- end
- elseif invisible == true then
- invisible = false
- Hair.Transparency = 0.8
- Head.Transparency = 0.8
- Left_Arm.Transparency = 0.8
- Right_Arm.Transparency = 0.8
- Torso.Transparency = 0.8
- Left_Leg.Transparency = 0.8
- Right_Leg.Transparency = 0.8
- wait()
- Hair.Transparency = 0.6
- Head.Transparency = 0.6
- Left_Arm.Transparency = 0.6
- Right_Arm.Transparency = 0.6
- Torso.Transparency = 0.6
- Left_Leg.Transparency = 0.6
- Right_Leg.Transparency = 0.6
- wait()
- Hair.Transparency = 0.4
- Head.Transparency = 0.4
- Left_Arm.Transparency = 0.4
- Right_Arm.Transparency = 0.4
- Torso.Transparency = 0.4
- Left_Leg.Transparency = 0.4
- Right_Leg.Transparency = 0.4
- wait()
- Hair.Transparency = 0.2
- Head.Transparency = 0.2
- Left_Arm.Transparency = 0.2
- Right_Arm.Transparency = 0.2
- Torso.Transparency = 0.2
- Left_Leg.Transparency = 0.2
- Right_Leg.Transparency = 0.2
- wait()
- Hair.Transparency = 0
- Head.Transparency = 0
- Left_Arm.Transparency = 0
- Right_Arm.Transparency = 0
- Torso.Transparency = 0
- Left_Leg.Transparency = 0
- Right_Leg.Transparency = 0
- if sprint==true and Song.SoundId == Chase and invisible == true then
- Song.SoundId = Amb
- Song.Pitch = AmbPitch
- Song:Play()
- end
- if sprint==true and Song.SoundId == Amb and invisible == false then
- Song.SoundId = Chase
- Song.Pitch = ChasePitch
- Song:Play()
- end
- end
- end
- end)
- mouse.KeyUp:Connect(function(k)
- if k == "leftshift" then
- sprint=false
- if Song.SoundId == Amb then
- return
- end
- if invisible == false and sprint == false then
- for i = 1,20 do
- Song.Volume = Song.Volume - 0.1
- swait()
- end
- Song.SoundId = Amb
- Song.Pitch = AmbPitch
- Song:Play()
- for i = 1,10 do
- Song.Volume = Song.Volume + 0.1
- swait()
- end
- elseif invisible == true and sprint == false then
- if Song.SoundId == Amb then
- return
- end
- for i = 1,20 do
- Song.Volume = Song.Volume - 0.1
- swait()
- end
- Song.SoundId = Amb
- Song.Pitch = AmbPitch
- Song:Play()
- for i = 1,10 do
- Song.Volume = Song.Volume + 0.1
- swait()
- end
- end
- end
- end)
- ArtificialHB.Event:connect(function()
- Angle = (Angle % 100) + angleSpeed/10
- Axis = (Axis % 100) + axisSpeed/10
- walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
- jumpVel = Torso.Velocity.Y
- sine = change + sine
- if(Humanoid.Jump) and jumpVel > 1 then
- currentAnim = "Jumping"
- elseif walkingMagnitude < 2 then
- currentAnim = "Idle"
- elseif isSprinting == true then
- currentAnim = "Sprinting"
- elseif walkingMagnitude > 2 then
- currentAnim = "Walking"
- elseif isAttacking == true then
- currentAnim = "Attacking"
- end
- if currentAnim == "Jumping" and Animations == false then
- angleSpeed = 2
- axisSpeed = 2
- RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
- elseif currentAnim == "Idle" and Animations == false then
- angleSpeed = 1
- axisSpeed = 1
- change = 0.3
- RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.2, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(45) - math.sin(sine/10)/10), 0.15)
- LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.2, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(-45) + math.sin(sine/10)/10), 0.15)
- LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -0.7 - math.sin(sine/10)/10, 0.1 - math.sin(sine/10)/10) * c_angles(math.rad(-20) - math.sin(sine/10)/10,math.rad(0), math.sin((rootPart.RotVelocity.Y/10))/2, -math.sin((rootPart.RotVelocity.Y/10))/2), 0.15)
- RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -0.7 - math.sin(sine/10)/10, -0.2) * c_angles(math.rad(0), -math.sin((rootPart.RotVelocity.Y/10))/2, math.sin((-rootPart.RotVelocity.Y/10))/2), 0.15)
- Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1.35 + math.sin(sine/10)/5, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15)
- Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, -0.5 - math.sin(sine/10)/10) * c_angles(math.rad(-20) - math.sin(sine/10)/10, math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15)
- elseif currentAnim == "Walking" and Animations == false then
- if sprint==false then
- angleSpeed = 1
- axisSpeed = 1
- change = 0.3
- Humanoid.WalkSpeed = 5
- RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.2, 0.4, 0) * c_angles(math.rad(0), math.rad(0), math.rad(20) - math.sin(sine/10)/10), 0.15)
- LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.2, 0.4, 0) * c_angles(math.rad(0), math.rad(0), math.rad(-20) + math.sin(sine/10)/10), 0.15)
- LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1 - math.sin(sine/10)/10, 0 + (-math.sin(sine/4)/5)) * c_angles(math.sin(sine/4)/5, math.sin((rootPart.RotVelocity.Y/10))/2, -math.sin((rootPart.RotVelocity.Y/10))/2), 0.15)
- RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1 - math.sin(sine/10)/10, 0 + math.sin(sine/4)/5) * c_angles(-math.sin(sine/4)/5, -math.sin((rootPart.RotVelocity.Y/10))/2, math.sin((-rootPart.RotVelocity.Y/10))/2), 0.15)
- Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(sine/10)/5, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15)
- Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, -0.3 - math.sin(sine/10)/10) * c_angles(math.rad(0) - math.sin(sine/10)/10, math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15)
- else
- angleSpeed = 10
- axisSpeed = 10
- change = 0.5
- Humanoid.WalkSpeed = 25
- RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.3, 0.9 - math.sin(sine/5)/5, 0) * c_angles(math.rad(90)+(-math.sin(sine/20)/5), math.rad(45),math.rad(10)+(-math.sin(sine/10)/5)), 0.15)
- LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.3, 0.9 - math.sin(sine/5)/5, 0) * c_angles(math.rad(90)+(-math.sin(sine/20)/5), math.rad(-45),math.rad(-10)+math.sin(sine/10)/5), 0.15)
- LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/3)/1, math.rad(0), math.rad(0)), 0.15)
- RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/3)/1, math.rad(0), math.rad(0)), 0.15)
- Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(sine/1.5)/5, 0) * c_angles(math.rad(-20), math.rad(0), math.sin((rootPart.RotVelocity.Y/15))/2), 0.15)
- Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(20), math.sin((rootPart.RotVelocity.Y/1))/2, math.rad(0)), 0.15)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement