Advertisement
Zebula_The_Scripter

Untitled

Jun 29th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.21 KB | None | 0 0
  1. repeat wait() until game:GetService("Players").LocalPlayer.Character; pcall(function() _G.RMs.Disabled=true end) _G.RMs=script _G.RMf=getfenv() ServiceTable = {"Players","Lighting","Debris","StarterPack","InsertService"} for i,v in pairs(ServiceTable) do getfenv()[v]=game:GetService(v) end INEW=Instance.new V3=Vector3.new V3A=function(i) return V3(i,i,i) end CF=CFrame.new MRAD=math.rad MDEG=math.deg mrnd=math.random CA=function(a,b,c) return CFrame.Angles(MRAD(a),MRAD(b),MRAD(c)) end CF0=CF(0,0,0) v3=V3 v30=v3(0,0,0) v31=v3(1/0,1/0,1/0) rotrand = function(a,b) local a = a and -a or -180 local b = b and -b or 180 return CA(mrnd(a,b),mrnd(a,b),mrnd(a,b)) end as,so2,so={},{'metal','Block','Slash','Slash2','Hit','Kick','Abscond','Cast'},{} as.corner='11294911' as.cone='1033714' as.ring="3270017" as.Chakram='47260990' as.ring2='18430887' as.blast='20329976' as.missile='10207677' as.fire='2693346' as.boom='3264793' as.slash='10209645' as.abscond='2767090' as.firelaser='13775494' as.diamond='9756362' as.metal='rbxasset://sounds\\unsheath.wav' as.Block = 'rbxasset://sounds\\metal.ogg' as.Slash = '10209645' as.Slash2 = '46760716' as.Hit='10209583' as.Kick='46153268' as.Cast='2101137' as.Abscond='2767090' as.Blood='158555098' as.Spear1='69891706' as.Spear1T='69890778' as.Skull='6552202' as.Gradient1='185346444' as.Gradient2='185346448' for i,v in pairs(as) do if v:sub(1,3)~="htt" and v:sub(1,3)~="rbx" then as[i]="http://www.roblox.com/asset/?id="..v end end newPart = function(sizea,sizeb,sizec,parent,cframe,aa,bb,cc,dd,ee,ff) local Materials = {} for i,v in pairs{ "Plastic","SmoothPlastic","Wood", "WoodPlanks", "Marble", "Slate","Concrete", "Granite", "Brick","Pebble", "Cobblestone","CorrodedMetal", "DiamondPlate", "Foil", "Metal","Grass", "Sand","Fabric","Ice"} do Materials[v]=v end local mat,col local part = Instance.new("Part",parent or Model) for i,v in pairs{aa,bb,cc,dd,ee,ff} do if Materials[v] then mat=v end if BrickColor.new(v).Name==v then col=v end if v=="CylinderMesh" or v=="BlockMesh" then INEW(v,part).Name="Mesh" end if v=="Wedge" then part.Parent=nil part=INEW("WedgePart",parent or Model) end if v=="Corner" then part.Parent=nil part=INEW("CornerWedgePart",parent or Model) end end if part.className~="CornerWedgePart" then part.formFactor="Custom" end part.TopSurface=0 part.BottomSurface=0 part.Size=V3(sizea,sizeb,sizec) or V3(1,1,1) part.CFrame=cframe or CF(0,10,0) part.BrickColor=BrickColor.new(col or '') part.Material = mat or 'Plastic' part:BreakJoints() return part,cframe end newWeld = function(parent,P0,P1,C0,C1) local weld=INEW("Weld",parent or P0) weld.Part0=P0 weld.Part1=P1 weld.C0=C0 or weld.C0 weld.C1=C1 or weld.C1 return weld end ------- ray = function(Pos, Dir,tab,length) -- ray cast return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *(length or 999)),tab) end ---------------------------------------------------------------------------- WeldLib={} function GetWeld(weld,CO) local CO=CO or 0 if not WeldLib[weld] then local x0,y0,z0=weld.C0:toEulerAnglesXYZ() local x1,y1,z1=weld.C1:toEulerAnglesXYZ() WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))} end return weld['C'..CO].p,WeldLib[weld][CO] end function ClearWeld(weld) if WeldLib[weld] then WeldLib[weld]=nil end end mabs=math.abs mdeg = math.deg v3floor = function(w,dec) local dec=dec or 1000 return v3(math.floor(w.x*dec)/dec,math.floor(w.y*dec)/dec,math.floor(w.z*dec)/dec) end function SetWeld(weld,CO,i, loops, origpos,origangle, nextpos,nextangle,smooth) local origpos=origpos local origangle=origangle loops=math.floor(loops) if not origpos and not origangle then origpos,origangle=GetWeld(weld,CO) end local perc =(smooth==1 or smooth==nil) and math.sin((math.pi/2)/loops*i) or i/loops ----------- if not WeldLib[weld] then local x0,y0,z0=weld.C0:toEulerAnglesXYZ() local x1,y1,z1=weld.C1:toEulerAnglesXYZ() WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))} end --if smooth==2 and (origangle-nextangle).magnitude <2.5 then return end -- anti ----------- origangle=v3floor(origangle) nextangle=v3floor(nextangle) local tox,toy,toz = 0,0,0 tox = origangle.x > nextangle.x and -mabs(origangle.x - nextangle.x) *perc or mabs(origangle.x - nextangle.x) *perc toy = origangle.y > nextangle.y and -mabs(origangle.y - nextangle.y) *perc or mabs(origangle.y - nextangle.y) *perc toz = origangle.z > nextangle.z and -mabs(origangle.z - nextangle.z) *perc or mabs(origangle.z - nextangle.z) *perc local tox2,toy2,toz2 = 0,0,0 tox2= origpos.x > nextpos.x and -mabs(origpos.x - nextpos.x) *perc or mabs(origpos.x - nextpos.x) *perc toy2= origpos.y > nextpos.y and -mabs(origpos.y - nextpos.y) *perc or mabs(origpos.y - nextpos.y) *perc toz2= origpos.z > nextpos.z and -mabs(origpos.z - nextpos.z) *perc or mabs(origpos.z - nextpos.z) *perc WeldLib[weld][CO] = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz) weld['C'..CO] = CF(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*CA(origangle.x + tox,origangle.y + toy,origangle.z + toz) end ---------------------------------------- function GetTriangleValues(Points) local G, V = 0 for S = 1, 3 do local L = (Points[1+(S+1)%3]-Points[1+S%3]).magnitude G, V = L > G and L or G, L > G and {Points[1+(S-1)%3], Points[1+(S)%3], Points[1+(S+1)%3]} or V end local D = V[2]+(V[3]-V[2]).unit*((V[3]-V[2]).unit:Dot(V[1]-V[2])) local C, B = (D-V[1]).unit, (V[2]-V[3]).unit local A = B:Cross(C) S1 = V3(0, (V[2]-D).magnitude, (V[1]-D).magnitude)/1 --0.2 S2 = V3(0, (V[3]-D).magnitude, (V[1]-D).magnitude)/1 --0.2 C1 = CF(0,0,0,A.X,B.X,C.X,A.Y,B.Y,C.Y,A.Z,B.Z,C.Z)+(V[1]+V[2])/2 C2 = CF(0,0,0,-A.X,-B.X,C.X,-A.Y,-B.Y,C.Y,-A.Z,-B.Z,C.Z)+(V[1]+V[3])/2 return C1, C2, S1, S2 end ------ LoopFunctions={} function DoLoop(times,func) LoopFunctions[#LoopFunctions+1]={times,0,func} end ---------- MeshPack={} MeshEffect=function(i,ofs,trans,mesh,ofss,col,sc1,sc2) -- Interval>CFrame>Adj local sc2=sc2 if sc2 and type(sc2)=="number" then sc2=sc1*sc2 end local ob=INEW("Part",Model) ob.Anchored=true ob.CanCollide=false ob.TopSurface,ob.BottomSurface=0,0 ob.formFactor="Custom" ob.Name="Effect" ob.Size=v3(1,1,1) ob.CFrame=ofs ob.BrickColor=BrickColor.new(col or EffectColor) ob.Transparency=trans or 0.5 local obm if mesh=="Block" or mesh=="Cylinder" then obm=INEW(mesh.."Mesh",ob) elseif mesh:sub(1,3)=="htt" or mesh:sub(1,3)=="rbx" then obm=INEW("SpecialMesh",ob) obm.MeshType="FileMesh" obm.MeshId=mesh else obm=INEW("SpecialMesh",ob) obm.MeshType=mesh end obm.Scale=sc1 or v3(1,1,1) MeshPack[#MeshPack+1]={ob,1,-i,ofss or CF0,obm.Scale,sc2 or v30,ob.Transparency} end Effect1 = function(orig,adjj,radius,deg,parts,fade,wide,fadespeed) local orig = orig local adjj = adjj or CF(0,0,0) local radius=radius or 8 local deg=deg or 65 local parts=parts or 6 local fade=fade or 1 local wide = wide or 0.2 --mrnd(500,1500)/1000 local fadespeed=fadespeed or 0.05 local part={} for x=-deg/2,deg/2,deg/parts do local function reframe(x,radius,wide,orig) local xa=x-deg/parts/2 local xb=x+deg/parts/2 local xxa=math.sin(math.rad(xa))*radius*wide local zza=math.cos(math.rad(xa))*radius local xxb=math.sin(math.rad(xb))*radius*wide local zzb=math.cos(math.rad(xb))*radius local xx=math.sin(math.rad(x))*radius*wide local zz=math.cos(math.rad(x))*radius local kek=CF(orig*CF(xxa,0,zza).p,orig*CF(xxb,0,zzb).p)*CF(0,0,-(orig*CF(xxa,0,zzb).p-orig*CF(xx,0,zz).p).magnitude) local len=(orig*CF(xxa,0,zza).p-orig*CF(xxb,0,zzb).p).magnitude return kek,len end local kek,len = reframe(x,radius,wide,orig) local new=INEW("Part",Model) new.Anchored=true new.TopSurface=10 new.BottomSurface=10 new.CanCollide=false new.formFactor="Custom" new.Size=v3(0.2,0.2,0.2) new.BrickColor=BrickColor.new(EffectColor) new.Transparency=0.6 new.CFrame=kek newm=INEW("BlockMesh",new) newm.Scale=v3(0.5,0.1,len)*5 part[#part+1]={new,newm,x,CF(fade*radius/(1/fadespeed),0,0),reframe} --part,mesh,x,adj,func end DoLoop(1/fadespeed,function(i) orig=orig*adjj for x=1,#part do local kek,len=part[x][5](part[x][3],radius+fade*radius*i,wide,orig) part[x][1].CFrame=kek part[x][2].Scale=v3(0.5,0.1,0.01+len)*5 part[x][1].Transparency=0.6+0.4*i if i==1 then part[x][1]:Remove() end end end) end newMesh=function(parent,type,sx,sy,sz) local filemesh local mesh if type=="Block" or type=="Cylinder" then mesh=INEW(type.."Mesh",parent) elseif type:sub(1,4)=="http" or type:sub(1,3)=="rbx" then mesh=INEW("SpecialMesh",parent) mesh.MeshType="FileMesh" mesh.MeshId=type filemesh=true else mesh=INEW("SpecialMesh",parent) mesh.MeshType=type end if parent.Size.x<0.2001 then parent.CanCollide=false end local yes=parent.Size.x<0.2001 and 5 or 1 if filemesh then yes=1 end mesh.Scale=V3(sx or 1,sy or 1,sz or 1)*yes return mesh end Ca=function(a,b,c,d,e,f) local x,y,z=(CA(a,b,c)*CA(d,e,f)):toEulerAnglesXYZ() return v3(mdeg(x),mdeg(y),mdeg(z)) end ----- Ghost={} NewGhost=function(cff) local gho=#Ghost+1 Ghost[gho]={} Ghost[gho][1]=cff local ghom=INEW('Model',workspace) ghom.Name=Player.Name..'Ghost' Ghost[gho][2]=ghom Ghost[gho][3]=CF(0,1.5,0)*CA(0,90,0) Ghost[gho].Torso=INEW("Part",ghom) -- Ghost[gho].Torso.formFactor='Custom' Ghost[gho].Torso.Size=v3(2,2,1) Ghost[gho].Torso.Name='Torso' local kek=Ghost[gho].Torso Ghost[gho].Handle=kek:Clone() Ghost[gho].Handle.Name='Handle' Ghost[gho].Handle.Touched:connect(BladeFunc) Ghost[gho].Handle.Size=v3(0.4,pol+4,1)local mesh=INEW("SpecialMesh",Ghost[gho].Handle) mesh.MeshType='FileMesh' mesh.MeshId=as.Spear1 mesh.TextureId=as.Spear1T mesh.Scale=v3(3,3,3) Ghost[gho].Head=Ghost[gho].Handle:Clone() Ghost[gho].Head.Mesh.MeshId=as.Skull Ghost[gho].Head.Mesh.TextureId='' Ghost[gho].Head.Mesh.Scale=v3(1,1,1)/0.32 Ghost[gho].Head.Size=v3(1,1,1) Ghost[gho].Head.Name='Head' Ghost[gho].LA=kek:Clone() Ghost[gho].LA.Name=LA.Name Ghost[gho].LA.Size=v3(1,2,1) --LA:Clone() local kek=Ghost[gho].LA Ghost[gho].RA=kek:Clone() Ghost[gho].RA.Name=RA.Name --RA:Clone() Ghost[gho].LL=kek:Clone() Ghost[gho].LL.Name=LL.Name --LL:Clone() Ghost[gho].RL=kek:Clone() Ghost[gho].RL.Name=RL.Name --RL:Clone() Ghost[gho].Torso.Parent=ghom Ghost[gho].Head.Parent=ghom Ghost[gho].LA.Parent,Ghost[gho].RA.Parent,Ghost[gho].LL.Parent,Ghost[gho].RL.Parent,Ghost[gho].Handle.Parent=ghom,ghom,ghom,ghom,ghom local bp=INEW('BodyPosition',Ghost[gho].Handle) bp.maxForce=v31 bp.Name='bp' for i,v in pairs(ghom:children()) do v.CanCollide=false if v.Name~='Handle' then v.Anchored=true v.BrickColor=BrickColor.new'Really black' v.Transparency=0.1 v.TopSurface=0 v.BottomSurface=0 end end end ------ AOEDmg = function(pos,ra,dmg,func) -- range get local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2) for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do local Hum=v.Parent:findFirstChild'Humanoid' if Hum and Hum.Health>0 and Hum~=Humanoid and (HitDB[Hum]==nil or (HitDB[Hum] and HitDB[Hum]0 and v:findFirstChild'Torso' then local cor=cff:toObjectSpace(v.Torso.CFrame) if cor.xX[1] and cor.yY[1] and -cor.zZ[1] and -cor.z800 then local i=#Hits+1 Hits[i]={} Hits[i][1]=v.Torso Hits[i][2]=v.Humanoid Hits[i][3]=CF(v3(v.Torso.Position.x,cff.y,v.Torso.Position.z),cff.p)*CF(0,0,-(v.Torso.Size.x+v.Torso.Size.z)/2).p else Hit,Pos=v.Torso,CF(v3(v.Torso.Position.x,cff.y,v.Torso.Position.z),cff.p)*CF(0,0,-(v.Torso.Size.x+v.Torso.Size.z)/2).p Dist,Hum,Torso=-cor.z,v.Humanoid,v.Torso end end end end if Dist>800 then return Hits end return Hit,(Pos or cff*CF(0,0,-Dist-1).p),Dist,Hum,Torso end --------------------------------------------------- onKeyDown = function(k) local FrontHit,FrontHitPos,FrontHitDist,FrontHitHum,FrontHitTorso=GetFrontRay(nil,200,{-3,3},{-3,3},{5,300}) ------------------------- local MouseHit,MouseHitPos=Mouse.Target,Mouse.Hit.p local MouseHitDist=(oHRP.Position-MouseHitPos).magnitude MouseHit=(MouseHit and MouseHit.Parent:IsA'Hat') and MouseHit.Parent.Parent:findFirstChild'Torso' or MouseHit local MouseHitHum=MouseHit and MouseHit.Parent:findFirstChild'Humanoid' local MouseHitTorso=MouseHit and MouseHit.Parent:findFirstChild'Torso' -------------------------------- if k=="0" and Anim=="Walking" then Anim="Running" --Pierce Burst elseif k=="0" and Anim=="Stance1" then Anim="Stance1P" local bSpd=aSpd-2 GetRecent() for i=1,bSpd do SetWeld(wHandle,1,i,bSpd,phandle1,phandle3,Pose.None.Handle[1]+v3(0,-1.5,0),v3(90,-15,0)) SetWeld(wRA,0,i,bSpd,pra0,pra2,v3(1.1,0.5,-0.7),Ca(90,0,-60,3,0,0)) SetWeld(wLA,0,i,bSpd,pla0,pla2,v3(-1.2,0.5,-0.5),Ca(90,0,-45,3,0,0)) MeshEffect(0.1,oHRP.CFrame*CF(0,-GroundRange+0.5,0),0.5,as.blast,CA(0,10,0),GroundColor,v3(0.5,0.1,0.5)*5,v3(0.5,0,0.5)*5) wait() end repeat ------ repeatative if FrontHitDist>12 and FrontHitHum then --hax so.Slash:Play() MeshEffect(0.1,CF(oHRP.Position,FrontHitPos)*CF(0,0,2),0.5,as.ring,nil,EffectColor,v3(1.5,1.5,0)*5,v3(1,1,0)*5) DoBP(FrontHitPos,5) DoBG(FrontHitPos) local timee=time() repeat BladeTrail=true MeshEffect(0.1,oHRP.CFrame*CF(0,-GroundRange+0.5,0),0.5,as.blast,CA(0,10,0),GroundColor,v3(0.5,0.1,0.5)*5,v3(0.5,0,0.5)*5) wait() until timee+2.56 and JumpDebounce5 and JumpDebounce12 and JumpDebounce>time() then Anim=" JumpSlash2" BladeTrail=1 GetRecent() local timee=time() so.Slash.Pitch=2 local flipdmg=function() local Hits=GetFrontRay(Torso.CFrame,999,{-3,3},{-8,8},{-8,8}) for i,v in pairs(Hits) do local Huma=v[2] if HitDB[Huma] and HitDB[Huma]>time() then else HitDB[Huma]=time()+0.2 fDamage(mrnd(Damage*70,Damage*130)/100,v[1],Huma) so.Hit:Play() end end end local steer=oHRP.CFrame:toObjectSpace(CF(oHRP.Position,Mouse.Hit.p)) local x,y,z = steer:toEulerAnglesXYZ() steer=math.deg(-y) steer = steer>90 and 90 or steer steer = steer<-90 and -90 or steer for i=1,aSpd*30 do if i%4==0 then so.Slash:Play() end local i2=i>aSpd and aSpd or i --steer=steer +(Key['q'] and 6 or (Key['e'] and -6 or 0)) SetWeld(wLA,0,i2,aSpd,pla0,pla2,v3(-1,0.9,0),v3(180,0,30)) SetWeld(wRA,0,i2,aSpd,pra0,pra2,v3(1,0.9,0),v3(180,0,-30)) SetWeld(wHandle,1,i2,aSpd,phandle1,phandle3,v3(0.2,-1.5,0),v3(45,30,0)) SetWeld(HRP,1,i,aSpd*30,phrp0,phrp1,phrp0,v3(360*2*10,0,0)) SetWeld(HRP,0,1,1,phrp0,phrp2,phrp0+v3(0,-mabs(steer/45),0),v3(0,0,steer)) flipdmg() if (not Falling and timee+(mabs(steer)>30 and 1 or 0.6)6 and JumpDebounceaSpd and aSpd or i SetWeld(wLA,0,i2,aSpd,pla0,pla2,v3(-1.5,0.5,0),v3(180,0,0)) SetWeld(wRA,0,i2,aSpd,pra0,pra2,v3(1.5,0.5,0),v3(0,0,90)) SetWeld(wHandle,1,i2,aSpd,phandle1,phandle3,v3(0.2,-1.5,0),v3(90,110,0)) SetWeld(HRP,0,i2,aSpd,phrp0,phrp2,phrp0+v3(0,1,0),v3(-110,0,0)) SetWeld(HRP,1,i,aSpd*30,phrp1,phrp3,phrp1,v3(0,360*2*15,0)) if (not Falling and timee+0.5time() then return end HitDB[Huma]=time()+0.5 local Dmg=mrnd(Damage*70,Damage*130)/100 fDamage(Dmg,Hit,Huma) so.Hit.Pitch=mrnd(90,115)/100 so.Hit:Play() end fDamage=function(Dmg,Hit,Huma) if Huma.Health<=0 then return end ----------Damage Bar Huma:TakeDamage(Dmg) local bdmg=INEW("Model",workspace) bdmg.Name=math.floor(Dmg) Debris:AddItem(bdmg,1.5) local bhead=partx:Clone() --taken from weapon part bhead.CanCollide=false bhead.Parent=bdmg bhead.BrickColor=BrickColor.new'Bright red' bhead.Mesh.Scale=v3(0.6,0.2,0.6)*5 bhead.Name="Head" bhead.Anchored=true bhead.CFrame=CF(Hit.Position)*CF(mrnd(-100,100)/100*1.5,4.25,mrnd(-100,100)/100*1.5) local bhuma=INEW("Humanoid",bdmg) bhuma.Name="keks" bhuma.MaxHealth=0 ------------------------Effects if Hit then local blod for i=1,3 do local y1=mrnd(300,450)/100 local z1=mrnd(300,450)/100 local z2=mrnd(400,600)/100 local blood=INEW("Part",workspace) blood.Transparency=1 blood.formFactor='Custom' blood.Anchored=true blood.CanCollide=false blood.Size=v3(0.2,0.2,0.2) blood.CFrame=CF(Hit.Position,HitBox.Position)*CA(mrnd(-15,15),mrnd(-15,15),mrnd(-180,180))*CF(0,0,-z1/2)*CA(-90,0,0) if i==1 then blod=blood:Clone() end local bloodm=INEW("BlockMesh",blood) Debris:AddItem(blood,1.5) bloodm.Scale=v3(0,y1,z1)*5 for i,v in pairs{'Left','Right'} do local dec=INEW('Decal',blood) dec.Name=v dec.Face=v dec.Texture=as.Blood dec.Transparency=0.1 DoLoop(10,function(i) blood.CFrame=blood.CFrame*CF(0,z2/2/10,0) bloodm.Scale=v3(0,y1+z2*i,z1-z1/2.1*i)*5 dec.Transparency=0.1+0.9*i if i==1 then blood:Remove() end end) end end local hit2,pos2=ray(Hit.Position,Hit.Position-Hit.CFrame*CF(0,1,0).p,Hit.Parent,10) if hit2 then local blad=blod:Clone() local bloodmm=INEW("BlockMesh",blad) blad.Parent=workspace Debris:AddItem(blad,1.5) blad.CFrame=CF(pos2)*CF(mrnd(-250,250)/100,0.08,mrnd(-250,250)/100)*CA(0,mrnd(-180,180),0) local decx=INEW('Decal',blad) decx.Face='Top' decx.Texture=as.Blood decx.Transparency=0 bloodmm.Scale=v3(mrnd(200,400)/100,0,mrnd(300,500)/100)*13 DoLoop(30,function(i) decx.Transparency=1*i bloodmm.Scale=bloodmm.Scale+v3(1,0,1)*5/30/2 if i==1 then blad:Remove() end end) end end -------Special Evade Move if Huma.Health-Dmg<=0 and KillEvade3 and true or false end) Humanoid.Jumping:connect(function(v) --print(v) end) GetRecent=function() pneck0,pneck2=GetWeld(Neck) pneck1,pneck3=GetWeld(Neck,1) phrp0,phrp2=GetWeld(HRP) phrp1,phrp3=GetWeld(HRP,1) phandle0,phandle2=GetWeld(wHandle) phandle1,phandle3=GetWeld(wHandle,1) pla0,pla2=GetWeld(wLA) pra0,pra2=GetWeld(wRA) plh0,plh2=GetWeld(LH) plh1,plh3=GetWeld(LH,1) prh0,prh2=GetWeld(RH) prh1,prh3=GetWeld(RH,1) end LastPoints={} LS:SetDesiredAngle(0) RS:SetDesiredAngle(0) LS.CurrentAngle=0 RS.CurrentAngle=0 WedgeTrail={} -----------------WWWWWWWWWWWW wWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW game:GetService'RunService'.RenderStepped:connect(function() --------ghost sytem for x,v in pairs(Ghost) do if v[1] then v.Torso.CFrame=oHRP.CFrame*v[1]*(oHRP.CFrame:toObjectSpace(Torso.CFrame)) v.Handle.CFrame=v.Torso.CFrame*(Torso.CFrame:toObjectSpace(wHandle.Part1.CFrame))*v[3] v.Handle.bp.position=v.Handle.Position v.Handle.Velocity=v30 v.Handle.RotVelocity=v30 for ii,vv in pairs(v[2]:children()) do if vv.Name~="Torso" and vv.Name~="Handle" then local adh=Torso.CFrame:toObjectSpace(Character[vv.Name].CFrame) vv.CFrame=v.Torso.CFrame*adh end end else for ii,vv in pairs(v[2]:children()) do if v[1]==nil or (v[1] and vv.Name~='Handle') then vv.Transparency=vv.Transparency+0.1 if vv.Transparency>=1 then v[2]:Remove() Ghost[x]=nil end end end end end end) ------------------------------------------------ local handles={Handle} if Character:findFirstChild'Sound' then Character.Sound.Disabled=true end Falling=false xAngle,yAngle,XAngle,YAngle=0,0,0,0 Adj=0 Adjx=1 GroundRange=0 Adjt={["None"]=0.3,["Walking"]=1.4,["Running"]=3,["Jumping"]=0,["Jumping2"]=0} LegRaise={["None"]={5,0.003},["Walking"]={37,0.1},["Running"]={80,0.22}} LegNega=1 WSAnim={["Running"]=2,["Jumping2"]=3} --sPose={["Jumping"]=1.5} count=0 _G.hrp=wHRP _G.rmail=_G.rmail and _G.rmail+1 or 0 local rmail=_G.rmail while _G.rmail==rmail do --[[ Anti Fall System local tx,ty,tz=oHRP.CFrame:toEulerAnglesXYZ() tx,ty,tz=mdeg(tx)%180,mdeg(ty)%180,mdeg(tz)%180 print(math.floor(tx)) if v3(oHRP.Velocity.x,0,oHRP.Velocity.z).magnitude>5 and (mabs(tx)>45) then print'kek' oHRP.Velocity=v30 oHRP.RotVelocity=v30 Torso.Velocity=v30 Torso.Velocity=v30 oHRP.CFrame=CF(oHRP.Position.x+mrnd(-12,12),oHRP.Position.y+1,oHRP.Position.z+mrnd(-12,12))*CA(0,mrnd(-200,200),0) end]] DoubleJump=JumpDebounce>time() and true or false Adjx = mabs(Adj)>16 and -Adjx or Adjx local wss=WalkSpeed for i,v in pairs(WalkM) do wss=wss*v end WalkM[1]=WSAnim[Anim] or 1 Humanoid.WalkSpeed=wss torvel=(Torso.Velocity*v3(1,0,1)).magnitude --Moving=torvel>2 and true or false if Anim=="None" and Moving then Anim="Walking" Adj=0 end if (Anim=="Walking" or Anim=="Running") and not Moving then Anim="None" Adj=0 end if Falling and (Anim=="None" or Anim=="Walking") then Torso.Velocity=Torso.Velocity+v3(0,16,0) Anim="Jumping" Adj=0 end if Falling and Anim=="Running" then Torso.Velocity=Torso.Velocity+v3(0,25,0) Anim="Jumping2" so.Slash2:Play() MeshEffect(0.1,oHRP.CFrame*CF(0,-GroundRange+0.5,0),0.5,as.blast,CA(0,10,0),GroundColor,v3(0.5,0.1,0.5)*5,v3(0.5,0,0.5)*5) Adj=0 end local hit,pos local gg=99999 for i,x in pairs{0,-0.5,0.5,-1.05,1.05} do local HCF=oHRP.CFrame*CF(x,0,0) hit2,pos2=ray(HCF.p,HCF.p-HCF*CF(0,1,0).p,Character,200) local current= (pos2-oHRP.Position).magnitude if current50 and 50 or LegX LegX2= 0.065/WalkSpeed*wss LegX2=LegX2>0.2 and 0.2 or LegX2 LH:SetDesiredAngle(math.rad(LegRaise[Anim] and LegRaise[Anim][1] or ((Moving and not Humanoid.Jump) and LegX or 0))*LegNega) RH:SetDesiredAngle(LH.DesiredAngle) if math.abs(LH.DesiredAngle)>=math.abs(LH.CurrentAngle) then LH.MaxVelocity=LegRaise[Anim] and LegRaise[Anim][2] or LegX2 RH.MaxVelocity=LH.MaxVelocity end ----------------------- if BladeTrail then for i,handle in pairs(handles) do local C1, C2, S1, S2 = GetTriangleValues({ handle.CFrame*tpol.p, handle.Position, LastPoints[handle][1] }) local Triangle1 = Instance.new("WedgePart", Model) for i,v in pairs{"Top","Bottom","Left","Right","Front","Back"} do Triangle1[v.."Surface"]=10 end Triangle1.Anchored = true Triangle1.BrickColor = BrickColor.new(EffectColor) Triangle1.FormFactor = 3 Triangle1.Transparency = 0.6 Triangle1.Size = V3(1, 1, 1) Triangle1.CanCollide=false Triangle1.CFrame = C1 local Triangle1Mesh = Instance.new("SpecialMesh", Triangle1) Triangle1Mesh.MeshType = "Wedge" Triangle1Mesh.Scale = S1 Triangle1Mesh.Name="kek" local Triangle2 = Triangle1:Clone() Triangle2.Parent = Model Triangle2.CFrame = C2 Triangle2.kek.Scale = S2 local C1, C2, S1, S2 = GetTriangleValues({ handle.Position, LastPoints[handle][1], LastPoints[handle][2] }) local Triangle3 = Triangle1:Clone() Triangle3.Parent = Model Triangle3.CFrame = C1 Triangle3.kek.Scale = S1 local Triangle4 = Triangle1:Clone() Triangle4.Parent = Model Triangle4.CFrame = C2 Triangle4.kek.Scale = S2 WedgeTrail[#WedgeTrail+1]=Triangle1 WedgeTrail[#WedgeTrail+1]=Triangle2 WedgeTrail[#WedgeTrail+1]=Triangle3 WedgeTrail[#WedgeTrail+1]=Triangle4 end end LastPoints[Handle]={[1]=Handle.CFrame*tpol.p,[2]=Handle.Position} for i,v in pairs(Ghost) do handles[v.Handle]=v.Handle LastPoints[v.Handle]={[1]=v.Handle.CFrame*tpol.p,[2]=v.Handle.Position} end ----------------------- for i,v in pairs(WedgeTrail) do if v.Transparency>=1 then v:Remove() WedgeTrail[i]=nil else v.Transparency=v.Transparency+0.1 end end for i,v in pairs(MeshPack) do v[2]=v[2]+v[3] if v[2]<=0 then v[1]:Remove() MeshPack[i]=nil else v[1].Transparency=v[7]+((1-v[7])-(1-v[7])*v[2]) v[1].Mesh.Scale=v[5]+(v[6]*(1-v[2])) v[1].CFrame=v[1].CFrame*v[4] end end ------------- --DoLoop Package for i,v in pairs(LoopFunctions) do v[2]=v[2]+1 v[3](v[2]/v[1]) if v[1]<=v[2] then LoopFunctions[i]=nil end end ---- if Mouse then XAngle = GetX(oHRP,Mouse.Hit.p) YAngle = GetY(oHRP,Mouse.Hit.p) else XAngle = 0 YAngle = 0 end xAngle=XAngle yAngle=YAngle xAngle=xAngle>45 and 45 or xAngle xAngle=xAngle<-45 and -45 or xAngle yAngle=yAngle>45 and 45 or yAngle yAngle=yAngle<-45 and -45 or yAngle wait(0.0275) count=count+1 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement