Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------
- --skarp laser raser--
- -------------------------
- --By --
- --CKbackup-
- -----------
- player = game.Players.LocalPlayer
- chara = player.Character
- debby = game.Debris
- Mouse = player:GetMouse()
- chara.Humanoid.WalkSpeed = 20
- rs = game:GetService("RunService").RenderStepped
- attacking = false
- --Outfit--
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- BladeM = New("Model",chara,"BladeM",{})
- Blade = New("Part",BladeM,"Blade",{Size = Vector3.new(0.25, 0.400000036, 4.25),CFrame = CFrame.new(-10.6186581, 3.17678142, -22.8749371, -3.39850521e-05, -0.866028011, 0.499995649, 4.42377857e-10, 0.499995828, 0.866028011, -1, 2.94322326e-05, -1.69919949e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
- Mesh = New("SpecialMesh",Blade,"Mesh",{Scale = Vector3.new(0.75, 0.75, 0.75),MeshId = "rbxassetid://436561566",TextureId = "rbxassetid://436561571",MeshType = Enum.MeshType.FileMesh,})
- SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- STrail = New("Part",BladeM,"STrail",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 3.00000024, 0.200000003),CFrame = CFrame.new(-10.9177656, 2.85871983, -22.8999252, -7.84831172e-06, -0.499996543, 0.866027772, 2.41521539e-05, -0.866027653, -0.49999696, 1, 1.69922841e-05, 1.88728209e-05),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
- Weld = New("ManualWeld",STrail,"Weld",{Part0 = STrail,Part1 = Blade,C0 = CFrame.new(0, 0, 0, -7.84829808e-06, 2.41521357e-05, 1, -0.499996603, -0.866027415, 1.69922878e-05, 0.866027534, -0.499996662, 1.88728318e-05),C1 = CFrame.new(0.0249977112, 0.10000515, -0.425002098, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),})
- LauncherM = New("Model",chara,"LauncherM",{})
- Launcher = New("Part",LauncherM,"Launcher",{Size = Vector3.new(0.600000024, 1, 1),CFrame = CFrame.new(-11.0414219, 1.85505056, -22.7000008, 0, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, -1, 0, 0),CanCollide = false,})
- Mesh = New("SpecialMesh",Launcher,"Mesh",{MeshId = "rbxassetid://2099661075",TextureId = "rbxassetid://2099661105",MeshType = Enum.MeshType.FileMesh,})
- LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- LBarrel = New("Part",LauncherM,"LBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-13.7908401, 0.911291361, -22.7000027, 0, -0.258818865, 0.965925932, 0, 0.965925932, 0.258818865, -1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
- Weld = New("ManualWeld",LBarrel,"Weld",{Part0 = LBarrel,Part1 = Launcher,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818865, 0.965925872, 0, 0.965925872, 0.258818865, 0),C1 = CFrame.new(1.90734863e-06, -0.199999809, -2.89999676, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),})
- RifleM = New("Model",chara,"RifleM",{})
- LaserRifle = New("Part",RifleM,"LaserRifle",{Size = Vector3.new(0.400000036, 1, 1),CFrame = CFrame.new(-12.1999998, 1.51739705, -23.4623299, 1, 0, 0, 0, 0.866025507, 0.499999911, 0, -0.499999911, 0.866025507),CanCollide = false,})
- Mesh = New("SpecialMesh",LaserRifle,"Mesh",{MeshId = "rbxassetid://449586754",TextureId = "rbxassetid://449586763",MeshType = Enum.MeshType.FileMesh,})
- RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- RBarrel = New("Part",RifleM,"RBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-12.1999989, 0.804000676, -24.8979721, 1, 0, 0, 0, 0.866025567, 0.499999821, 0, -0.499999821, 0.866025567),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
- Weld = New("ManualWeld",RBarrel,"Weld",{Part0 = RBarrel,Part1 = LaserRifle,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999791, 0, 0.499999791, 0.866025507),C1 = CFrame.new(9.53674316e-07, 0.100001335, -1.60000038, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),})
- function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
- local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
- local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
- local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
- return TEff
- end
- SlashT = CreateTrailObj(STrail,"White","Royal purple",0,0)
- SlashT.LightEmission = 1
- SlashT.Texture = "http://www.roblox.com/asset/?id=849899387"
- --Sounds--
- function LoadSnd(id,loop,vol,pit)
- local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
- return snd
- end
- SwingSnd = LoadSnd(158037267,false,1,1)
- Swing2Snd = LoadSnd(12222208,false,1,1)
- HitSnd = LoadSnd(153092274,false,1,1)
- ExpSnd = LoadSnd(142070127,false,1,1)
- FlySnd = LoadSnd(169445602,false,1,1)
- BExpSnd = LoadSnd(168586621,false,1,.5)
- GunFlameSnd = LoadSnd(169380505,false,1,1.5)
- ChargeSnd = LoadSnd(136007472,false,1,1)
- --Play Sound in Part--
- function PlaySnd(snd,part)
- local sound = snd:Clone()
- sound.PlayOnRemove = true
- sound.Parent = part
- sound:Destroy()
- end
- --Damage Function--
- function dealdmg(dude,damage,env,toim,kby,kbx)
- hurt = coroutine.wrap(function()
- if dude ~= chara and dude:FindFirstChild("IsHit") == nil then
- finaldmg = damage + math.random(-env,env)
- dude.Humanoid.Health = dude.Humanoid.Health - finaldmg
- local vall = Instance.new("ObjectValue",dude)
- vall.Name = "IsHit"
- debby:AddItem(vall,toim)
- local bfos = Instance.new("BodyVelocity",dude.Head)
- bfos.P = 20000
- bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
- bfos.Velocity = Vector3.new(0,kby,0) + chara.HumanoidRootPart.CFrame.lookVector * kbx
- debby:AddItem(bfos,.1)
- local naeeym2 = Instance.new("BillboardGui",dude)
- naeeym2.Size = UDim2.new(0,100,0,40)
- naeeym2.StudsOffset = Vector3.new(0,3,0)
- naeeym2.Adornee = dude.Head
- naeeym2.Name = "TalkingBillBoard"
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.BorderSizePixel = 0
- tecks2.Text = "-"..finaldmg
- tecks2.Font = "Fantasy"
- tecks2.FontSize = "Size24"
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(1,0.6,0)
- tecks2.TextStrokeColor3 = Color3.new(0,0,0)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- for i = 1, 5 do
- wait(.1)
- tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
- tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
- tecks2.TextTransparency = tecks2.TextTransparency + .2
- end
- naeeym2:Destroy()
- end
- end)
- hurt(dude,damage,env,toim)
- end
- --Explode Hitbox--
- function ExHitbox(rad,pos,damage,env,toim,kby,kbx)
- local E = Instance.new("Explosion")
- E.Position = pos
- E.Parent = game.Workspace
- E.BlastRadius = rad
- E.BlastPressure = 0
- E.Visible = false
- E.Hit:connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid")~=nil then
- dealdmg(hit.Parent,damage,env,toim,kby,kbx)
- end
- end)
- end
- --Blade Hit Effect--
- function SlashEff(pos)
- local p = Instance.new("Part",game.Workspace)
- p.Size = Vector3.new(1,1,1)
- p.BrickColor = BrickColor.new("Alder")
- p.Material = "Neon"
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = pos * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
- local pm = Instance.new("SpecialMesh",p)
- pm.MeshType = "Sphere"
- pm.Scale = Vector3.new(.5,0,.5)
- local disp = coroutine.wrap(function()
- for i = 1, 4 do
- wait(.01)
- p.Transparency = p.Transparency + .2
- pm.Scale = pm.Scale + Vector3.new(0,5,0)
- end
- wait(.01)
- p:Destroy()
- end)
- disp()
- end
- --Blade Touch--
- dela = .5
- bladedmg = 13
- bladeactive = false
- function bladehit(hit)
- if bladeactive == true then
- if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
- dealdmg(hit.Parent,bladedmg,1,dela,0,10)
- PlaySnd(HitSnd,hit.Parent.Head)
- SlashEff(hit.CFrame)
- end
- end
- end
- Blade.Touched:connect(bladehit)
- --Grab Touch--
- weldd = nil
- exeact = false
- exed = false
- function grabhit(hit)
- if exeact == true and exed == false then
- if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
- weldd = Instance.new("Weld",hit.Parent)
- weldd.Part0 = hit.Parent.Head
- weldd.Part1 = RBarrel
- exed = true
- end
- end
- end
- RBarrel.Touched:connect(grabhit)
- --Material Return--
- gprop = {}
- function materialhit()
- local part = workspace:FindPartOnRay(Ray.new(chara.HumanoidRootPart.Position-Vector3.new(0,2.4,0),Vector3.new(0,-1000,0)))
- if part then
- gprop = {part.BrickColor,part.Material}
- end
- end
- --Clerp Animations--
- TC = chara.HumanoidRootPart.RootJoint
- HC = chara.Torso.Neck
- RAC = chara.Torso["Right Shoulder"]
- LAC = chara.Torso["Left Shoulder"]
- RLC = chara.Torso["Right Hip"]
- LLC = chara.Torso["Left Hip"]
- TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- RW = Instance.new("Weld",HC.Parent)
- RW.Part1 = HC.Parent
- RW.Part0 = chara["Right Arm"]
- RW.C0 = RWF
- LW = Instance.new("Weld",HC.Parent)
- LW.Part1 = HC.Parent
- LW.Part0 = chara["Left Arm"]
- LW.C0 = LWF
- RLW = nil
- LLW = nil
- function AddLegWelds()
- RLW = Instance.new("Weld",chara["Right Leg"])
- RLW.Part1 = HC.Parent
- RLW.Part0 = chara["Right Leg"]
- RLW.C0 = RLWF
- LLW = Instance.new("Weld",chara["Left Leg"])
- LLW.Part1 = HC.Parent
- LLW.Part0 = chara["Left Leg"]
- LLW.C0 = LLWF
- end
- function DestroyLegWelds()
- RLC = New("Motor6D",chara.Torso,"Right Hip",{Part0 = chara.Torso,Part1 = chara["Right Leg"],C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),})
- LLC = New("Motor6D",chara.Torso,"Left Hip",{Part0 = chara.Torso,Part1 = chara["Left Leg"],C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
- RLW:Destroy()
- LLW:Destroy()
- end
- function clerp(a,b,c)
- return a:lerp(b,c)
- end
- --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
- --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
- --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
- --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
- TC.C0 = TCF
- HC.C0 = HCF
- RW.C0 = RWF
- LW.C0 = LWF
- --Idle Clerp--
- ITCF = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
- IHCF = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50))
- IRWF = RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-5))
- ILWF = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(5))
- function res()
- TC.C0 = ITCF
- HC.C0 = IHCF
- RW.C0 = IRWF
- LW.C0 = ILWF
- end
- res()
- --Laser Slashes--
- function LasSlash()
- del = true
- bladeactive = true
- SlashT.Enabled = true
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- for i = 1,5 do
- for i = 0,1,.2 do
- rs:wait()
- TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),i)
- end
- SwingSnd:Play()
- for i = 0,1,.2 do
- rs:wait()
- TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(360)),i)
- end
- SwingSnd:Play()
- end
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- del = false
- bladeactive = false
- SlashT.Enabled = false
- res()
- end
- --Grab Move--
- function GrabMove()
- del = true
- chara.Humanoid.WalkSpeed = 0
- exeact = true
- wait(.01)
- SwingSnd:Play()
- local bfos = Instance.new("BodyVelocity",chara.Torso)
- bfos.P = 10000
- bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
- bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 500
- debby:AddItem(bfos,.1)
- RWeld:Destroy()
- RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
- wait(.5)
- if exed == true then
- exeact = false
- for i = 0,.6,.1 do
- rs:wait()
- HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.4+i)
- LW.C0 = clerp((LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(100)),.4+i)
- end
- wait(.5)
- PlaySnd(GunFlameSnd,chara)
- PlaySnd(ExpSnd,chara)
- local hitpt = Instance.new("Part",game.Workspace)
- hitpt.Size = Vector3.new(1,1,1)
- hitpt.Anchored = true
- hitpt.CanCollide = false
- hitpt.BrickColor = BrickColor.new("New Yeller")
- hitpt.CFrame = RBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
- local hitb = Instance.new("Part",game.Workspace)
- hitb.Size = Vector3.new(1,1,1)
- hitb.Anchored = true
- hitb.CanCollide = false
- hitb.BrickColor = BrickColor.new("Toothpaste")
- hitb.Material = "Neon"
- hitb.CFrame = CFrame.new(hitpt.Position.x,hitpt.Position.y,hitpt.Position.z) * CFrame.fromEulerAnglesXYZ(math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30)))
- local hitbm = Instance.new("SpecialMesh",hitb)
- hitbm.MeshType = "Sphere"
- hitbm.Scale = Vector3.new(1,1,1)
- local hitm = Instance.new("SpecialMesh",hitpt)
- hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- local hpt = coroutine.wrap(function()
- for i = 1, 9 do
- wait(.05)
- hitpt.Transparency = hitpt.Transparency + .1
- hitm.Scale = hitm.Scale + Vector3.new(.5,.5,.5)
- hitb.Transparency = hitb.Transparency + .1
- hitbm.Scale = hitbm.Scale + Vector3.new(.5,.5,.5)
- end
- hitpt:Destroy()
- hitb:Destroy()
- end)
- hpt()
- exed = false
- weldd:Destroy()
- ExHitbox(5,RBarrel.Position,24,2,.1,50,50)
- wait(1)
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-150)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- elseif exed == false then
- exeact = false
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- end
- RWeld:Destroy()
- RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- chara.Humanoid.WalkSpeed = 20
- del = false
- res()
- end
- --Shoot--
- function Shoot()
- del = true
- RWeld:Destroy()
- RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
- for i = 1, 5 do
- GunFlameSnd:Play()
- local missile = Instance.new("Part",game.Workspace)
- missile.Size = Vector3.new(.4,.4,.4)
- missile.Name = "Blast"
- missile.Transparency = 1
- missile.Position = RBarrel.Position
- missile.CFrame = RBarrel.CFrame
- missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0)
- force.Parent = missile
- local p1mit = CreateTrailObj(missile,"Toothpaste","Toothpaste",0,0)
- p1mit.Enabled = true
- missile.Touched:connect(function(hit)
- if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then
- force:Destroy()
- force = nil
- missile.Anchored = true
- ExHitbox(3,missile.Position,12,1,.1,0,5)
- wait(2)
- missile:Destroy()
- end
- end)
- wait(.1)
- end
- wait(.5)
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- RWeld:Destroy()
- RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- del = false
- res()
- end
- --Cannon--
- function Cannon()
- del = true
- SwingSnd:Play()
- chara.Humanoid.WalkSpeed = 5
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.4+i)
- HC.C0 = clerp(IHCF,HCF,.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i)
- end
- SWeld:Destroy()
- SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),C1 = CFrame.new(0.381341934, 0.176781416, 0.625062943, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- wait(.2)
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.6-i)
- HC.C0 = clerp(IHCF,HCF,.6-i)
- RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
- end
- LWeld:Destroy()
- LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 4.28015164e-06, -0.707107425, -0.707106471, 6.74945295e-06, 0.707106054, -0.707107604, 1, -1.74605191e-06, 7.79910715e-06),C1 = CFrame.new(-2.09882545, -1.07468522, 0.0127067566, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- RW.C0 = clerp(RWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
- LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
- end
- wait(.5)
- ChargeSnd:Play()
- local hitpt = Instance.new("Part",game.Workspace)
- hitpt.Size = Vector3.new(1,1,1)
- hitpt.CanCollide = false
- hitpt.BrickColor = BrickColor.new("Toothpaste")
- hitpt.Material = "Neon"
- hitpt.Transparency = 1
- hitpt.Position = LBarrel.Position
- local wee = Instance.new("Weld",hitpt)
- wee.Part0 = LBarrel
- wee.Part1 = hitpt
- local hitbm = Instance.new("SpecialMesh",hitpt)
- hitbm.MeshType = "Sphere"
- hitbm.Scale = Vector3.new(0,0,0)
- for i = 0, 1, .05 do
- wait(.05)
- hitpt.Transparency = 1-i
- hitbm.Scale = Vector3.new(i*2,i*2,i*2)
- local tr = coroutine.resume(coroutine.create(function()
- local hitp = Instance.new("Part",game.Workspace)
- hitp.Size = Vector3.new(1,1,1)
- hitp.Anchored = true
- hitp.CanCollide = false
- hitp.BrickColor = BrickColor.new("Toothpaste")
- hitp.Transparency = 1
- hitp.CFrame = LBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
- local hitm = Instance.new("SpecialMesh",hitp)
- hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- hitm.Scale = Vector3.new(4,4,1)
- for i = 0,1,.1 do
- wait(.05)
- hitp.Transparency = i
- hitm.Scale = Vector3.new(10-(i*10),10-(i*10),1-i)
- end
- hitp:Destroy()
- end))
- end
- wait(1)
- hitpt:Destroy()
- local bfos = Instance.new("BodyVelocity",chara.Torso)
- bfos.P = 10000
- bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
- bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * -500
- debby:AddItem(bfos,.1)
- FlySnd:Play()
- local missile = Instance.new("Part",game.Workspace)
- missile.Size = Vector3.new(1,1,1)
- missile.Name = "Blast"
- missile.Position = LBarrel.Position
- missile.CFrame = LBarrel.CFrame
- missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200
- missile.BrickColor = BrickColor.new("Toothpaste")
- missile.Material = "Neon"
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0)
- force.Parent = missile
- local meh = Instance.new("SpecialMesh",missile)
- meh.MeshType = "Sphere"
- meh.Scale = Vector3.new(2,2,2)
- missile.Touched:connect(function(hit)
- if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then
- force:Destroy()
- force = nil
- missile.Anchored = true
- ExHitbox(50,missile.Position,60,1,.1,100,100)
- BExpSnd:Play()
- for i = 0, 1, .1 do
- local tr = coroutine.resume(coroutine.create(function()
- local hitp = Instance.new("Part",game.Workspace)
- hitp.Size = Vector3.new(1,1,1)
- hitp.Anchored = true
- hitp.CanCollide = false
- hitp.BrickColor = BrickColor.new("Toothpaste")
- hitp.Transparency = 1
- hitp.CFrame = missile.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
- local hitm = Instance.new("SpecialMesh",hitp)
- hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- hitm.Scale = Vector3.new(4,4,1)
- for i = 0,1,.01 do
- wait(.0001)
- hitp.Transparency = i
- hitm.Scale = Vector3.new(i*150,i*150,i)
- end
- hitp:Destroy()
- end))
- end
- for i = 0,1,.01 do
- wait(.0001)
- missile.Transparency = i
- meh.Scale = Vector3.new(2+i*90,2+i*90,2+i*90)
- end
- missile:Destroy()
- end
- end)
- wait(.1)
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
- LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
- end
- LWeld:Destroy()
- LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.4+i)
- HC.C0 = clerp(IHCF,HCF,.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i)
- end
- SWeld:Destroy()
- SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.6-i)
- HC.C0 = clerp(IHCF,HCF,.6-i)
- RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
- end
- chara.Humanoid.WalkSpeed = 20
- del = false
- res()
- end
- --Block--
- blockval = false
- healthlock = 0
- effeff = nil
- function ToggleBlock()
- if blockval == false then
- blockval = true
- SwingSnd:Play()
- healthlock = chara.Humanoid.Health
- effeff = Instance.new("ForceField",chara)
- effeff.Name = "FawsFeeld"
- --effeff.Visible = false
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.4+i)
- --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.4+i)
- end
- elseif blockval == true then
- SwingSnd:Play()
- effeff:Destroy()
- blockval = false
- for i = 0,.6,.1 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.6-i)
- --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.6-i)
- end
- res()
- end
- end
- --Mouse Functions--
- del = false
- combo = 0
- function onKeyDown(key)
- if key == "q" and attacking == false then
- ToggleBlock()
- elseif del == false and blockval == false then
- if key == "z" then
- LasSlash()
- elseif key == "x" then
- GrabMove()
- elseif key == "c" then
- Shoot()
- elseif key == "v" then
- Cannon()
- end
- end
- end
- function onButton1Down()
- if del == false then
- del = true
- bladeactive = true
- SlashT.Enabled = true
- --Combo 1
- if combo == 0 then
- wait(.001)
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.4+i)
- end
- SwingSnd:Play()
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- wait(.1)
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.6-i)
- end
- combo = 1
- --Combo 2
- elseif combo == 1 then
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- for i = 0,1,.2 do
- rs:wait()
- TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),i)
- end
- SwingSnd:Play()
- for i = 0,1,.2 do
- rs:wait()
- TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(360)),i)
- end
- SwingSnd:Play()
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF,.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- combo = 2
- --Combo 3
- elseif combo == 2 then
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
- end
- SWeld:Destroy()
- SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, -3.34970828e-05, -1.78813934e-07, -1.00000024, 3.96366158e-06, 1.00000024, -1.78813934e-07),C1 = CFrame.new(0.0813121796, -2.22322369, -0.174974442, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
- RW.C0 = (RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
- Swing2Snd:Play()
- local bfos = Instance.new("BodyVelocity",chara.Head)
- bfos.P = 20000
- bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
- bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 150
- debby:AddItem(bfos,.1)
- wait(.2)
- SWeld:Destroy()
- SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
- for i = 0,.6,.2 do
- rs:wait()
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
- LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
- end
- combo = 0
- end
- del = false
- bladeactive = false
- SlashT.Enabled = false
- res()
- end
- end
- --Mouse Activation--
- if Mouse then
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.Button1Down:connect(onButton1Down)
- end
- --Loop Function--
- walking = false
- while true do
- wait()
- materialhit()
- if del == false then attacking = false elseif del == true then attacking = true end
- if blockval == true and chara:FindFirstChild("HitByUlt")==nil then
- chara.Humanoid.Health = healthlock
- end
- torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude
- if torvel < 1 and walking == true and del == false and attacking == false and blockval == false then
- for i = 0,1,.5 do
- rs:wait()
- if del == false and attacking == false and blockval == false then
- TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),ITCF,i)
- HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),IHCF,i)
- RW.C0 = IRWF
- LW.C0 = clerp((LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),ILWF,i)
- end
- end
- walking = false
- elseif torvel > 1 and walking == false and del == false and attacking == false and blockval == false then
- for i = 0,1,.5 do
- rs:wait()
- if del == false and attacking == false and blockval == false then
- TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i)
- HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),i)
- RW.C0 = IRWF
- LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),i)
- end
- end
- walking = true
- else
- end
- end
Add Comment
Please, Sign In to add comment