Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SavedFenvs = {}
- for i,v in pairs(getfenv()) do
- SavedFenvs[i]=true
- end
- -- c/while wait() do for i=1,200 do Instance.new("Message",game.Players.Damply.PlayerGui).Text="yes" end end
- ins = Instance.new
- v3 = Vector3.new
- cn = CFrame.new
- ca2 = CFrame.Angles
- mf = math.floor
- mran = math.random
- mrad = math.rad
- mdeg = math.deg
- ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
- ud=UDim2.new
- bn = BrickColor.new
- c3 = Color3.new
- Players = game:service'Players'
- Lighting = game:service'Lighting'
- Debris = game:service'Debris'
- Lastqi={}
- qit = {}
- qit["n"]="Name"
- qit["sc"]="Size"
- qit["cf"]="CFrame"
- qit["an"]="Anchored"
- qit["can"]="CanCollide"
- qit["mat"]="Material"
- qit["bn"]="BrickColor"
- qit["mid"]="MeshId"
- qit["tid"]="TextureId"
- qit["sca"]="Scale"
- qit["tra"]="Transparency"
- qit["ref"]="Reflectance"
- qit["mtyp"]="MeshType"
- qit["P0"]="Part0"
- qit["P1"]="Part1"
- qit["tya"]="TextYAlignment"
- qit["txa"]="TextXAlignment"
- qit["bc3"]="BackgroundColor3"
- qit["tc3"]="TextColor3"
- qit["pos"]="Position"
- qit["txt"]="Text"
- qit["bgt"]="BackgroundTransparency"
- qit["txs"]="TextTransparency"
- qit["tst"]="TextStrokeTransparency"
- qit["tsc3"]="TextStrokeColor3"
- qit["bsp"]="BorderSizePixel"
- print'test'
- C3Pro={}
- C3Pro['BackgroundColor3']=0
- C3Pro['TextColor3']=0
- C3Pro['TextStrokeColor3']=0
- C3Pro['Color']=0
- C3Pro['BorderColor3']=0
- C3Pro['BackgroundColor3']=0
- C3Pro['BackgroundColor3']=0
- BNPro={}
- BNPro['BrickColor']=0
- BNPro['TextColor']=0
- BNPro['TextStrokeColor']=0
- BNPro['BorderColor']=0
- BNPro['BackgroundColor']=0
- GuiClass={}
- GuiClass["Frame"]=0
- GuiClass["TextLabel"]=0
- GuiClass["TextButton"]=0
- GuiClass["TextBox"]=0
- GuiClass["ImageLabel"]=0
- GuiClass["ImageButton"]=0
- qi = function(tab)
- local v = ins(tab[1])
- --
- if v:IsA("Part") or v:IsA("WedgePart") then v.formFactor="Custom" end
- if v:IsA("BasePart") then v.TopSurface=0 v.BottomSurface=0 v.Locked=true end
- if GuiClass[v.className] then v.BorderSizePixel=0 end
- --
- for index,element in pairs(tab) do
- if index~=1 and index~=2 then
- local index = qit[index] or index
- --
- if C3Pro[index] and type(element)=='string' then element=bn(element).Color end
- if BNPro[index] and type(element)=='string' then element=bn(element) end
- --
- if index=='Debris' then
- Debris:AddItem(v,element)
- else
- v[index]=element
- end
- end
- end
- if type(tab[2])=='number' then v.Parent=Lastqi[#Lastqi-tab[2]] elseif tab[2] then v.Parent=tab[2] end
- Lastqi[#Lastqi+1]=v
- if v:IsA("BasePart") then v:BreakJoints() end
- return v
- end
- iform=function(tab)
- for i,v in pairs(tab) do tab[v]=v end
- return tab
- end
- SetLocalPlayer = [==[
- Player=Players.LocalPlayer
- Char=Player.Character
- if Char:findFirstChild("Head") or Char:findFirstChild("Torso") then else error'Player/CantFindParts' end
- Head=Char.Head
- Torso=Char.Torso
- Hum=Char.Humanoid
- Backpack=Player.Backpack
- PlayerGui=Player.PlayerGui
- ]==]
- q = function(f) -- quick function
- coroutine.resume(coroutine.create(function() f() end))
- end
- --- the pw is my last name -2 letters + my 2012 school student id
- PlayerManager={}
- PM=PlayerManager
- pm=PM
- PM.Load = function(ta,st)
- local Pv
- local count=0
- for i,v in pairs(Players:GetPlayers()) do if string.find(v.Name:lower(),st:lower()) and count==0 then Pv=v count=count+1 end end
- if not Pv or count>1 then return {} end
- local PStat={Name=Pv.Name,Age=Pv.AccountAge,v=Pv}
- if Pv.Character and Pv.Character:findFirstChild'Torso' then PStat.Torso=Pv.Character.Torso end
- if Pv.Character and Pv.Character:findFirstChild'Humanoid' then PStat.H=Pv.Character.Humanoid end
- PStat.Kill = function() if Pv.Character then Pv.Character:BreakJoints() end end
- PStat.asd = function() if Pv.Character and Pv.Character:findFirstChild'Torso' and Pv.Character:findFirstChild'Humanoid' then
- Pv.Character.Humanoid.Sit=true Pv.Character.Torso.CFrame=Pv.Character.Torso.CFrame*ca(45,0,0) Pv.Character.Torso.Velocity=Pv.Character.Torso.CFrame.lookVector*100 end end
- PStat.r=function() Pv:LoadCharacter() end
- PStat.Char=function() return Pv.Character end
- PStat.load=function() return Pv,Pv.Character,Pv.Backpack,Pv:findFirstChild'PlayerGui' end
- PStat.gca=function(t,naa) local Pv2=pm:l(naa).v if Pv2 then Pv.CharacterAppearance=Pv2.CharacterAppearance end end
- return PStat
- end
- PM.l=PM.Load
- --c/PlayerManager:Load'drew':asd()
- --c/_G.br = function() _G.brr = _G.brr and _G.brr:Remove() _G.brr = qi{'Part',workspace,an=true,FrontSurface='Hinge',cf=cn(0,6,0)} return _G.brr end
- Welds={}
- anipack={}
- Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
- if not w or not w.Parent then return end
- if not Welds[w] then
- local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
- local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
- Welds[w]={[0]={w.C0.x,w.C0.y,w.C0.z,d0,e0,f0},[1]={w.C1.x,w.C1.y,w.C1.z,d1,e1,f1}}
- end
- local c0,c1=Welds[w][0],Welds[w][1]
- c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
- c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
- local A0,B0,C0,D0,E0,F0 = unpack(c0)
- local A1,B1,C1,D1,E1,F1 = unpack(c1)
- local Do = function(i)
- if ty==0 then
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
- elseif ty==1 then
- w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- else
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca(D0,E0,F0)
- w.C1=cn(A1,B1,C1) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- end
- end
- if inc<1 then anipack[Do]={0,inc,sined,ty,c0,c1,d,e,f} else Do(1) end
- if not qq then repeat wait() until not anipack[Do] end
- end
- qAni=function(w,a,b,c,d,e,f,ty,inc,sined) q(function() Ani(w,a,b,c,d,e,f,ty,inc,sined,true) end) end
- rAni=function(w)
- Welds[w]=nil
- end
- --Tween loop
- Tl=function(a,b,c,ff,s)
- local Do=function(i) ff(i) end
- for i=a,b,c do
- Do(s and math.sin(math.pi/2*i) or i)
- wait()
- end
- Do(b)
- end
- qTl=function(a,b,c,ff,s) q(function() Tl(a,b,c,s,ff,s) end) end
- _G.LibVol=1
- Sound = function(id,par,vol,pit)
- local sou = qi({"Sound",par or workspace,Volume=(vol or 1)*_G.LibVol,Pitch=pit or 1,SoundId=id,Debris=4})
- delay(0,function() sou:play() end)
- return sou
- end
- GetX = function(CFF)
- local a1,a2,a3,a4,a5,a6,a7,a8,a9=CFF:components()
- return math.floor(math.deg(math.asin(a9)))
- end
- Dmg = function(Hum,Dealt,Hitter)
- if not Hum then return end
- if Dealt then Dealt=math.floor(Dealt) end
- local HM=Hum.Parent
- local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
- local Blocks=HMB and HMB.Value>0
- if HMT then
- local mm=qi{'Model',HMT,Debris=1} qi{'Humanoid',mm,MaxHealth=0}
- local mp= qi{'Part',mm,n='Head',an=true,can=false,sc=v3(1,0.2,1),cf=HMT.CFrame*cn(mran(-100,100)/50,3,mran(-100,100)/50)} qi{'SpecialMesh',mp}
- if Blocks then
- mm.Name='Block!'
- mp.BrickColor=bn'Bright blue'
- HMB.Value=HMB.Value-1
- else
- mm.Name=Dealt
- mp.BrickColor=bn'Bright red'
- end
- end
- if not Blocks then
- if game.PlaceId==20279777 and NewScript then
- NewScript(Hum:GetFullName()..'.Health='..Hum:GetFullName()..'.Health-'..Dealt..' script:Remove()',workspace)
- else
- Hum.Health=Hum.Health-Dealt
- end
- end
- end
- GetHum = function(part)
- local Hum,HT,block
- for i,v in pairs(part.Parent:children()) do
- if v:IsA("Humanoid") then
- Hum=v
- elseif v.Name=='Torso' then
- HT=v
- elseif v.Name=='Block' and v:IsA("NumberValue") then
- block=v
- end
- end
- return Hum,HT,block
- end
- ray = function(Pos, Dir,tab) -- ray cast
- return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
- end
- raydist=function(Pos,Dir,tab)
- local hit,pos=ray(Pos,Dir,tab)
- return (Pos-pos).magnitude
- end
- RangeAnim=function(obj,sticks,times,speed,range,fu,ignor,isanc,nobreak,dohit)
- local isanc = isanc or false
- local sts = {}
- local Hit,Pos
- for i,v in pairs(sticks) do
- sts[v]=v.CFrame:toObjectSpace(obj.CFrame)
- end
- for ty=1,times do
- if not obj.Parent then return end
- obj.CFrame=obj.CFrame*cn(0,0,-speed)
- for i,v in pairs(sts) do i.CFrame=obj.CFrame*v end
- local hit,pos=ray(obj.Position,obj.Position-obj.CFrame*cn(0,0,1).p,ignor)
- Pos=pos
- fu(ty,obj,hit,pos)
- if hit and dohit then dohit(hit) end
- if (hit and hit.Name~='unray') and (pos-obj.Position).magnitude<range then if not isanc or (hit.Anchored and hit.Transparency<1) then Hit=hit if not nobreak then break end end end
- wait()
- end
- return Hit,(Pos-obj.Position).magnitude,Pos
- end
- GetRegion = function(pos,ra,f,f2) -- range get
- local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
- q(function()
- for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
- local Hum=GetHum(v)
- if v.Name=='Torso' and Hum and Hum.Health>0 then
- q(function() f(Hum,v) end)
- elseif f2 and not Hum then
- q(function() f2(v) end)
- end
- end
- end)
- end
- AddBV=function(str,cfr,par,deb,yy)
- if not par or not str then return end
- if par:findFirstChild'LibBV' then par.LibBV:Remove() end
- return qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,not yy and 1/0 or 0,1/0),Debris=deb,n='LibBV'}
- end
- AddBG=function(str,par,deb)
- if not par then return end
- if par:findFirstChild'LibBG' then par.LibBG:Remove() end
- return i{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Debris=deb,n='LibBG'}
- end
- Trails={}
- trailpack={}
- Trail=function(obj,th,color,inc,waitt,adj,par)
- local adj=adj or cn(0,0,0)
- Trails[obj]=1
- q(function()
- local lastpos=(obj.CFrame*adj).p
- while Trails[obj] and obj.Parent do wait(waitt)
- local newpos=(obj.CFrame*adj).p
- local mag=(newpos-lastpos).magnitude
- local trp=qi{'Part',par or obj,sc=v3(1,1,1),an=true,can=false,Reflectance=0.4,bn=color,cf=cn(lastpos,newpos)*cn(0,0,-mag/2)}
- local trpm=qi{'BlockMesh',trp}
- local trpms=trpm.Scale
- lastpos=newpos
- trp.Transparency=0.3
- trpm.Scale=v3(th,th,mag)
- trailpack[trp]={1,inc,trpm,th,mag}
- end
- end)
- end
- meshpack={}
- MeshEffect=function(par,cf,x,y,z,inc,col,sha,adj) --yes,remade
- local adj = adj or cn(0,0,0)
- local mp=qi{'Part',par,sc=v3(1,1,1),bn=bn(col),cf=cf,tra=0.3,can=false,an=true,n='unray'}
- local ms
- if sha:sub(1,4)=='http' then
- ms=qi{'SpecialMesh',mp,mid=sha}
- elseif sha=='Block' then
- ms=qi{'BlockMesh',mp}
- elseif sha=='Cylinder' then
- ms=qi{'CylinderMesh',mp}
- elseif sha=='Head' or sha=='Sphere' then
- ms=qi{'SpecialMesh',mp,MeshType=sha}
- end
- mp.Transparency=0.2
- mp.CFrame=mp.CFrame*adj
- ms.Scale=v3(x,y,z)*0.3
- meshpack[mp]={0,inc,adj,x,y,z,ms}
- end
- function findGround(pos)
- local ax,ay,az = pos:toEulerAnglesXYZ()
- local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,0.1,0)),Char)
- if bhit then return bhit,cn(bpos)*ca(mdeg(ax),mdeg(ay),mdeg(az)) end
- end
- Lightning = function(par,p0,p1,tym,th,col,inc,spr)
- local bricks={}
- local cur={}
- local mag=(p0-p1).magnitude
- for i=1,tym,1 do
- cur[i]=cn(p0,p1)*cn(0,0,-mag/tym*i).p+v3(mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100)
- end
- cur[0]=p0
- cur[tym]=p1
- for i=1,tym do
- local mag2=(cur[i-1]-cur[i]).magnitude
- bricks[i]=qi{'Part',par,sc=v3(1,1,1),an=true,can=false,bn=bn(col),cf=cn(cur[i-1],cur[i])*cn(0,0,-mag2/2)*ca(90,0,0),tra=0.3,ref=0.15} qi{'BlockMesh',bricks[i],sca=v3(th,mag2+0.15,th)}
- end
- q(function()
- for i=0,1,inc do
- for x,v in pairs(bricks) do v.Transparency=0.3+(0.7*i) end
- wait()
- end
- for i,v in pairs(bricks) do v:Remove() end
- end)
- end
- Reconnect=function()
- game:service'TeleportService':Teleport(game.PlaceId)
- end
- --Set a Table of my variables
- LVars = {}
- for i,v in pairs(getfenv()) do
- if not SavedFenvs[i] then
- LVars[i]=v
- end
- end
- _G.LVars = LVars
- for i,v in pairs(LVars) do _G[i]=v end
- -- loadstring
- _G['C'..'H'..'R'..'ON']=[==[
- for i,v in pairs(_G.LVars) do
- getfenv()[i]=v
- end
- ]==]
- _G.okbye=function()
- local ded=Instance.new("StringValue",workspace)
- for i=1,10000 do
- ded.Value = ded.Value .."lolllllllllllllllll".. ded.Value
- wait(0.03)
- end
- end
- _G.nopl=function()
- while wait() do Debris:AddItem(Instance.new('Model',Players),0.01) end
- end
- q(function()
- if Players.LocalPlayer==nil then
- for i,v in pairs(script:children()) do
- if v:IsA("StringValue") then
- for i,p in pairs(Players:GetPlayers()) do
- q(function() print('RMLib ran for ' ..p.Name) newLocalScript(v.Value,p.Character) end)
- end
- end
- end
- end
- end)
- --script/loadstring(_G.RMLib)() print(ins)
- print('libbaload')
- --[[
- ]]
- script.Parent = nil
- it = Instance.new
- v3=Vector3.new
- bc=BrickColor.new
- c3=Color3.new
- cn=CFrame.new
- ca=CFrame.Angles
- ca2=function(a,b,c)
- return ca(math.rad(a),math.rad(b),math.rad(c))
- end
- ti=table.insert
- tr=table.remove
- rn=math.random
- rd=math.rad
- mf=math.floor
- ud = UDim2.new
- inf=math.huge
- dg=math.deg
- mdeg=math.deg
- v310=v3(1/0,1/0,1/0)
- pi=math.pi
- w=wait
- cf=cn
- bn=bc
- ts=tostring
- Workspace=game:GetService("Workspace")
- Players=game:GetService("Players")
- Player=Players.LocalPlayer
- Lighting=game:GetService("Lighting")
- Debris=game:GetService("Debris")
- work=Workspace
- server=Players
- tb=Player
- lighting=Lighting
- deb=Debris
- asset = "http://www.roblox.com/asset/?id="
- Asset=asset
- ids = {}
- ids.Shoot = 10209633
- ids.Reload = 10209636
- ids.Crown = 20329976
- ids.Crown2 = 1323306
- ids.Icon = 52611635
- ids.Explode = 2697431
- ids.Ring = 3270017
- for i,v in pairs(ids) do
- if type(v)=='number' then
- ids[i]='http://www.roblox.com/asset/?id='..v
- end
- game:GetService("ContentProvider"):Preload(ids[i])
- end
- qi = function(ttz)
- local qii = it(ttz[1]) table.foreach(ttz,function(oi,oi2)
- if oi ~= 1 and oi ~= 2 then qii[oi] = oi2 end end) qii.Parent=ttz[2] return qii end
- q = function(f)
- coroutine.resume(coroutine.create(function() f() end)) end
- ft = function(tablez,item)
- for i=1,#tablez do if tablez[i] == item then return i end end return nil end
- ft2 = function(tablez,item)
- for i=1,#tablez do if tablez[i][1] == item then return i end end return nil end
- pa = function(pa,pn,sh,x,y,z,c,a,tr,re,bc2)
- local fp=nil
- if sh ~= "Wedge" and sh ~= "CornerWedge" and sh ~= "VehicleSeat" and sh ~= "Seat" then
- fp=it("Part",pa)
- fp.Material = "SmoothPlastic"
- fp.TopSurface = "SmoothNoOutlines"
- fp.BottomSurface = "SmoothNoOutlines"
- fp.RightSurface = "SmoothNoOutlines"
- fp.LeftSurface = "SmoothNoOutlines"
- fp.BackSurface = "SmoothNoOutlines"
- fp.FrontSurface = "SmoothNoOutlines"
- fp.Shape=sh or "Block"
- fp.formFactor="Custom"
- elseif sh == "Wedge" then
- fp=it("WedgePart",pa)
- fp.formFactor="Custom"
- elseif sh == "CornerWedge" then
- fp=it("CornerWedgePart",pa)
- elseif sh == "VehicleSeat" then
- fp=it("VehicleSeat",pa)
- elseif sh == "Seat" then
- fp=it("Seat",pa)
- end
- fp.Size=v3(x or 4,y or 2,z or 2)
- fp.Friction = 2
- fp.CanCollide=c or true
- fp.Anchored=a or false
- fp.BrickColor=bc(bc2 or "")
- fp.Transparency=tr or 0
- fp.Reflectance=re or 0
- fp.Name=pn or "TBLib Part"
- fp.Locked = true
- fp.CFrame=cn(0,0,0)
- fp:BreakJoints()
- fp.Anchored = a
- return fp
- end
- function ClearClass(Object,Class)
- for _,v in pairs(Object:GetChildren()) do
- if v:IsA(Class) then
- v:Destroy()
- end
- end
- end
- function GetClass(Object,Class)
- for _,v in pairs(Object:GetChildren()) do
- if v:IsA(Class) then
- return v
- end
- end
- end
- function re(par,obj)
- if par:findFirstChild(obj) then
- par[obj]:Remove''
- end
- end
- function invis(o)
- for i,v in pairs(o:children()) do
- if v:IsA("BasePart") then
- v.Transparency=1
- end
- invis(v)
- end
- end
- function newhats(p,o,o2)
- for i,v in pairs(p:children()) do
- if v:IsA("Hat") then
- local np=v.Handle:Clone''
- np.Material = "SmoothPlastic"
- np.Transparency=0
- np.Mesh.Scale=np.Mesh.Scale*1.04
- np.Parent=o
- np.CFrame=v.Handle.CFrame
- np.Name="Hat"
- stick2(np,o2,o)
- end
- end
- end
- fade = function(prt,incr)
- q(function()
- for i=prt.Transparency,1,incr do
- prt.Transparency=i
- wait()
- end
- prt:Remove''
- end)
- end
- function weld(pa,p0,p1,x,y,z,a,b,c)
- local fw=it("Weld",pa)
- fw.Part0=p0
- fw.Part1=p1
- fw.C0=cn(x,y,z)*ca(a,b,c)
- return fw
- end
- stick = function(hit2,hit)
- return qi({"Weld",hit2,Part0=hit2,Part1=hit,C0=hit2.CFrame:inverse()*cn(hit2.Position),C1=hit.CFrame:inverse()*cn(hit2.Position)})
- end
- function stick2(hit2,hit,tostick)
- local weld=it("Weld")
- weld.Part0=tostick
- weld.Part1=hit2
- local HitPos=hit.Position
- local CJ=cn(HitPos)
- local C0=hit2.CFrame:inverse() *CJ
- local C1=hit.CFrame:inverse() * CJ weld.C0=C1
- weld.C1=C0
- weld.Parent=hit2
- end
- ray = function(Pos, Dir,tab)
- return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
- end
- function rtab(tabz,obj)
- for i=1,#tabz do
- if tabz[i] == obj then
- tr(tabz,i)
- break
- end
- end
- end
- sTrail={}
- function Trail2(lopz,ob,waitz,col,thickz,ofz) cw(function() ti(sTrail,ob)
- local oldpos=(ob.CFrame *ofz).p local lopz2=0
- local function loltr() local obp=(ob.CFrame *ofz).p lopz2=lopz2 + 1
- local mag=(oldpos - obp).magnitude
- local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col) tr.Anchored=true
- tr.CFrame=cn(oldpos,obp)
- tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
- local trm=it("CylinderMesh",tr) trm.Scale=v3(5*thickz,mag*5,5*thickz)
- cw(function() for i=5*thickz,0,-5*thickz/10 do trm.Scale=v3(i,mag*5,i) w() end tr:Remove'' end)
- tr.CFrame=tr.CFrame *ca(rd(90),0,0) oldpos=obp end
- repeat loltr()
- wait(waitz) until ft(sTrail,ob) == nil or lopz2 == lopz loltr() end) end
- Trail = function(ob,times,waitz,col,thickz,ofz) -- Brick Trail
- q(function()
- local oldpos=(ob.CFrame *ofz).p
- for i=1,times do
- if effon==true then
- local obp=(ob.CFrame *ofz).p
- local mag=(oldpos - obp).magnitude
- local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col)
- tr.Anchored=true
- tr.CFrame=cn(oldpos,obp)
- tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
- trm=it("CylinderMesh",tr)
- trm.Scale=v3(thickz,mag*5,thickz)
- q(function()
- for i=thickz,0,thickz/10 do
- trm.Scale=v3(i,mag*5,i)
- wait()
- end
- tr:Remove''
- end)
- tr.CFrame=tr.CFrame *ca(rd(90),0,0)
- oldpos=obp wait(waitz)
- end
- end
- end)
- end
- de = function(it,ti) game:service'Debris':AddItem(it,ti) end -- Debris
- GlowMesh = function(anch,meshid2,rootz,mv3,colzz,adjus,l1,l2,l3) q(function() -- Glowmesh
- local spi=pa(rootz,"glowmesh","Block",mv3.X,mv3.Y,mv3.Z,false,false,l1,0,colzz) local spim=it("SpecialMesh",spi) spi.CanCollide=false if meshid2:lower()=="sphere" then spim.MeshType="Sphere" elseif meshid2:lower()=="block" then spim=it("BlockMesh",spi) else spim.MeshType="FileMesh" spim.MeshId=meshid2 end
- if anch then local spiw=qi({"Weld",spi,Part0=rootz,Part1=spi}) spiw.C0 =spiw.C0 *adjus else spi.Anchored=true spi.CFrame=adjus end
- for i=l1,l2,l3 do spi.Transparency=i spim.Scale=mv3*(i+0.3) wait() end spi:Remove'' end)
- end
- DetectSurface = function(pos, part) -- Surface Detector
- local surface = nil local pospos = part.CFrame
- local pos2 = pospos:pointToObjectSpace(pos) local siz = part.Size local shaep = part.Shape
- if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
- surface = {"Anything", cn(pospos.p, pos)*cn(0, 0, -(pospos.p - pos).magnitude+0.12)*ca(rd(-90), 0, 0)}
- else if pos2.Y > ((siz.Y/2)-0.01) then surface = {"Top", ca(0, 0, 0)}
- elseif pos2.Y < -((siz.Y/2)-0.01) then surface = {"Bottom", ca(-math.pi, 0, 0)} elseif pos2.X > ((siz.X/2)-0.01) then surface = {"Right", ca(0, 0, rd(-90))}
- elseif pos2.X < -((siz.X/2)-0.01) then surface = {"Left", ca(0, 0, rd(90))} elseif pos2.Z > ((siz.Z/2)-0.01) then surface = {"Back", ca(rd(90), 0, 0)} elseif pos2.Z < -((siz.Z/2)-0.01) then surface = {"Front", ca(rd(-90), 0, 0)} end end return surface end
- BulletHole = function(HitPos,HitObj,sc,img,par) -- Bullethole function
- local Surface = DetectSurface(HitPos, HitObj)
- local C = cn(HitPos) * ca(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
- if Surface[1] == "Anything" then C = Surface[2] end local theimg = img or ds.BulletHole
- local bl = pa(workspace or par,"bullethole","Block",sc,0,sc,false,true,1,0,"") qi({"Decal",bl,Face="Top",Texture=theimg})
- bl.CFrame = C*cn(0,-0.1,0) if not HitObj.Anchored then bl.Anchored = false stick(bl,HitObj) bl.ChildRemoved:connect(function() bl:Remove() end) end q(function() wait(5) for i=0,1,0.05 do bl.Size=v3(-i*sc,0,-i*sc) wait() end de(bl,0) end)
- end
- so = function(id,par,vol,pit) q(function() -- Sound maker
- local sou = qi({"Sound",par or workspace,Volume=vol,Pitch=pit or 1,SoundId=id})
- wait() sou:play() wait(6) sou:Remove() end) end
- -- local/so(asset..ds.GothicMusic,workspace,1,2.6)
- function GetRegion(p0,p1,f,f2) q(function()
- for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),c,100) ) do if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and v.Parent:findFirstChild("Torso") then q(function() f(v.Parent) end) elseif f2 and v.Parent.Parent:findFirstChild("Humanoid") == nil then f2(v) end end
- end) end
- FindGround = function(pos) -- ground finder
- local ax,ay,az = pos:toEulerAnglesXYZ()
- local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,200,0)))
- if bhit and bpos then
- return cn(bpos)*ca(ax,ay,az)
- end
- return nil
- end
- function NPC(Name, Position) -- npc maker
- local Character = Instance.new("Model")
- Character.Name = Name
- local Humanoid = Instance.new("Humanoid")
- Humanoid.Parent = Character
- local Template = Instance.new("Part")
- Template.FormFactor = "Custom"
- Template.Size = Vector3.new(1, 2, 1)
- Template.Locked = true
- local Head = Template:Clone()
- Head.Name = "Head"
- Head.TopSurface = "Smooth"
- Head.BottomSurface = "Smooth"
- Head.Size = Vector3.new(2, 1, 1)
- Head.Parent = Character
- local Mesh = Instance.new("SpecialMesh")
- Mesh.MeshType = "Head"
- Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
- Mesh.Parent = Head
- local Face = Instance.new("Decal")
- Face.Name = "face"
- Face.Texture = "rbxasset://textures/face.png"
- Face.Parent = Head
- local Torso = Template:Clone()
- Torso.Name = "Torso"
- Torso.LeftSurface = "Weld"
- Torso.RightSurface = "Weld"
- Torso.CFrame = CFrame.new(0, 10000, 0)
- Torso.Size = Vector3.new(2, 2, 1)
- Torso.Parent = Character
- local TShirt = Instance.new("Decal")
- TShirt.Name = "roblox"
- TShirt.Parent = Torso
- local LeftArm = Template:Clone()
- LeftArm.Name = "Left Arm"
- LeftArm.Parent = Character
- local RightArm = Template:Clone()
- RightArm.Name = "Right Arm"
- RightArm.Parent = Character
- local LeftLeg = Template:Clone()
- LeftLeg.Name = "Left Leg"
- LeftLeg.Parent = Character
- local RightLeg = Template:Clone()
- RightLeg.Name = "Right Leg"
- RightLeg.Parent = Character
- Character:BreakJoints()
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.Parent = Torso
- local LeftShoulder = Instance.new("Motor")
- LeftShoulder.Name = "Left Shoulder"
- LeftShoulder.Part0 = Torso
- LeftShoulder.Part1 = LeftArm
- LeftShoulder.MaxVelocity = 0.1
- LeftShoulder.C0 = CFrame.new(-Torso.Size.x / 2 - RightArm.Size.x / 2, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
- LeftShoulder.C1 = CFrame.new(0, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
- LeftShoulder.Parent = Torso
- local RightShoulder = Instance.new("Motor")
- RightShoulder.Name = "Right Shoulder"
- RightShoulder.Part0 = Torso
- RightShoulder.Part1 = RightArm
- RightShoulder.MaxVelocity = 0.1
- RightShoulder.C0 = CFrame.new(Torso.Size.x / 2 + RightArm.Size.x / 2, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
- RightShoulder.C1 = CFrame.new(0, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
- RightShoulder.Parent = Torso
- local LeftHip = Instance.new("Motor")
- LeftHip.Name = "Left Hip"
- LeftHip.Part0 = Torso
- LeftHip.Part1 = LeftLeg
- LeftHip.MaxVelocity = 0.1
- LeftHip.C0 = CFrame.new(-LeftLeg.Size.x / 2, -LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
- LeftHip.C1 = CFrame.new(0, LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
- LeftHip.Parent = Torso
- local RightHip = Instance.new("Motor")
- RightHip.Name = "Right Hip"
- RightHip.Part0 = Torso
- RightHip.Part1 = RightLeg
- RightHip.MaxVelocity = 0.1
- RightHip.C0 = CFrame.new(RightLeg.Size.x / 2, -RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
- RightHip.C1 = CFrame.new(0, RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
- RightHip.Parent = Torso
- local BodyColors = Instance.new("BodyColors")
- BodyColors.LeftArmColor = BrickColor.new("Bright yellow")
- BodyColors.RightArmColor = BrickColor.new("Bright yellow")
- BodyColors.LeftLegColor = BrickColor.new("Br. yellowish green")
- BodyColors.RightLegColor = BrickColor.new("Br. yellowish green")
- BodyColors.HeadColor = BrickColor.new("Bright yellow")
- BodyColors.TorsoColor = BrickColor.new("Bright blue")
- BodyColors.Parent = Character
- Character.Parent = Workspace
- Character:MoveTo(Position)
- Character:MoveTo(Torso.Position + Vector3.new(0, 3, 0))
- return Character
- end
- AddBV=function(str,cfr,par,debt)
- if not par then return end
- if par:findFirstChild'LibBV' then par.LibBV:Remove() end
- tbbodyvelocity=qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,1/0,1/0),Name='LibBV'} deb:AddItem(tbbodyvelocity,debt)
- end
- AddBG=function(str,par,debt)
- if not par then return end
- if par:findFirstChild'LibBG' then par.LibBG:Remove() end
- tbbodygyro=qi{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Name='LibBG'} deb:AddItem(tbbodygyro,debt)
- end
- AddBAV=function(vec3,par,debt)
- if not par then return end
- if par:findFirstChild'LibBAV' then par.LibBAV:Remove() end
- tbbodyangularvelocity=qi{'BodyAngularVelocity',par,maxTorque=v3(1/0,1/0,1/0),angularvelocity=vec3,Name='LibBAV'} deb:AddItem(tbbodyangularvelocity,debt)
- end
- Dmg = function(Hum,Dealt,Critical)
- local HM=Hum.Parent
- local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
- local Blocks=HMB and HMB.Value>0
- if HMT then
- local mm=qi{'Model',HMT} qi{'Humanoid',mm,MaxHealth=0} deb:AddItem(mm,1)
- local mp= qi{'Part',mm,Name='Head',formFactor="Custom",Anchored=true,CanCollide=false,Size=v3(1,0.2,1),CFrame=HMT.CFrame*cn(rn(-100,100)/50,3,rn(-100,100)/50)} qi{'BlockMesh',mp}
- if Blocks then
- mm.Name='Block!'
- mp.BrickColor=bn'Bright blue'
- HMB.Value=HMB.Value-1
- elseif not Blocks then
- mm.Name=Dealt
- mp.BrickColor=bn'Bright red'
- end
- end
- if not Blocks then
- Hum:TakeDamage(Dealt)
- end
- end
- GetHum = function(part)
- local Hum,HT,block
- for i,v in pairs(part.Parent:children()) do
- if v:IsA("Humanoid") then
- Hum=v
- elseif v.Name=='Torso' then
- HT=v
- elseif v.Name=='Block' and v:IsA("NumberValue") then
- block=v
- end
- end
- return Hum,HT,block
- end
- Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness
- local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
- for i=1,tym do
- local li = it("Part",c) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = bc(col)
- li.formFactor = "Custom" li.CanCollide = false li.Size = v3(th,th,magz/tym) local ofz = v3(trz[rn(1,2)],trz[rn(1,2)],trz[rn(1,2)])
- local trolpos = cn(curpos,p1)*cn(0,0,magz/tym).p+ofz
- if tym == i then
- local magz2 = (curpos - p1).magnitude li.Size = v3(th,th,magz2)
- li.CFrame = cn(curpos,p1)*cn(0,0,-magz2/2)
- else
- li.CFrame = cn(curpos,trolpos)*cn(0,0,magz/tym/2)
- end
- curpos = li.CFrame*cn(0,0,magz/tym/2).p de(li,0.25)
- end
- end
- MakeCrater = function(pos,sc,tyms,debz,par) -- crater maker
- q(function()
- if not debz then
- debz = 5
- end
- local bhit,bpos=ray(pos,pos - (pos + v3(0,200,0)))
- if bhit and bpos then
- for i=1,tyms do
- q(function()
- local gr = pa(par or workspace,"","Block",rn(5,13)/10*sc,0.25*sc,rn(4,10)/10*sc,true,true,bhit.Transparency,bhit.Reflectance,bhit.BrickColor.Name)
- gr.Material = bhit.Material
- gr.TopSurface = bhit.TopSurface
- gr.CFrame = cn(bpos+v3(rn(-12,12)/10*sc,0,rn(-12,12)/10*sc))*ca(rd(rn(-40,40)),rd(rn(-360,360)),rd(rn(-40,40)))
- wait(debz)
- fade(gr,0.1)
- end)
- end
- end
- end)
- end
- MakeCrack = function(pos,sc,debz,par) -- crackmaker
- q(function()
- if not debz then
- debz = 5
- end
- local bhit,bpos=ray(pos,pos - (pos + v3(0,10,0)))
- if bhit and bpos then
- local cr = pa(par or workspace,"Crack","Block",sc,0,sc,false,true,1,0,"") cr.CFrame = cn(bpos)
- local dec=qi({"Decal",cr,Face="Top",Texture=ds.Crack}) de(cr,debz)
- end
- end)
- end
- a = {}
- a.insw={}
- function cleanweld(wexx,namzi)
- local tn=ft2(a.insw,wexx)
- if tn==nil then return end
- if namzi=="p0" then
- a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=0,0,0 elseif namzi=="p1" then
- a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=0,0,0 elseif namzi=="a0" then
- a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=0,0,0 elseif namzi=="a1" then
- a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=0,0,0
- end
- end
- function c2(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
- q(function()
- c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
- end)
- end
- a.Welding=0
- function c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
- if ft2(a.insw,wexx)==nil then
- ti(a.insw,{wexx,{}})
- local tn=ft2(a.insw,wexx)
- a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=wexx.C0.x,wexx.C0.y,wexx.C0.z
- a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=wexx.C1.x,wexx.C1.y,wexx.C1.z
- a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=wexx.C0:toEulerAnglesXYZ()
- a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=wexx.C1:toEulerAnglesXYZ()
- end
- local tn=ft2(a.insw,wexx)
- local xx2,yy2,zz2=0,0,0
- local x2,y2,z2=0,0,0
- if c0orc1==0 then
- xx2,yy2,zz2=a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]
- x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
- elseif c0orc1==1 then
- xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
- x2,y2,z2=a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]
- else
- xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
- x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
- end a.Welding=a.Welding + 1
- local twa=1
- if smmx >= 1 then
- else
- for i=smmx,0.8,smmx do
- twa = 1
- if c0orc1==0 then
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- elseif c0orc1==1 then
- wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- else local x,y,z = wexx.C0:toEulerAnglesXYZ()
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
- wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- end
- if fu then
- q(fu)
- end
- wait()
- end
- for i=0.8,1,smmx*0.45 do
- twa = 1
- if c0orc1==0 then
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- elseif c0orc1==1 then
- wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- else local x,y,z = wexx.C0:toEulerAnglesXYZ()
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
- wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- end
- wait()
- end
- end
- local i=1
- if c0orc1==0 then
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- elseif c0orc1==1 then
- wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- else local x,y,z = wexx.C0:toEulerAnglesXYZ()
- wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
- wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
- end
- a.Welding=a.Welding - 1
- local tn=ft2(a.insw,wexx)
- if c0orc1==0 then
- a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
- a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
- elseif c0orc1==1 then
- a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
- a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
- elseif c0orc1==3 then
- local x,y,z=wexx.C0.x,wexx.C0.y,wexx.C0.z
- a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
- local x,y,z=wexx.C1:toEulerAnglesXYZ()
- a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
- end
- end
- Welds={}
- Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
- if not Welds[w] then
- local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
- local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
- Welds[w]={[0]={w.C0.x,w.C0.y,w.C0.z,d0,e0,f0},[1]={w.C1.x,w.C1.y,w.C1.z,d1,e1,f1}}
- end
- local c0,c1=Welds[w][0],Welds[w][1]
- c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
- c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
- local A0,B0,C0,D0,E0,F0 = unpack(c0)
- local A1,B1,C1,D1,E1,F1 = unpack(c1)
- local Do = function(i)
- if ty==0 then
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
- elseif ty==1 then
- w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- else
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2(D0,E0,F0)
- w.C1=cn(A1,B1,C1) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- end
- end
- for i=inc,1,inc do
- Do(sined and math.sin(math.pi/2*i) or i)
- wait()
- end
- Do(1)
- if ty==0 then
- c0[4],c0[5],c0[6]=d,e,f
- else
- c1[4],c1[5],c1[6]=d,e,f
- end
- end
- qAni=function(w,a,b,c,d,e,f,ty,inc,sined) q(function() Ani(w,a,b,c,d,e,f,ty,inc,sined) end) end
- rAni=function(w)
- Welds[w]=nil
- end
- gunshot = function(speed,sc,dmg,cff) q(function() -- gunshot function
- local bb = pa(workspace,"bullet","Block",0.2*sc,0.3*sc,0.2*sc,true,true,0,0.1,"Black") qi({"CylinderMesh",bb})
- bb.CFrame = cff*ca(rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500))
- so(ds.Fire,bb,0.3,1) wait() for i=1,50 do
- bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,-1,0)).p)
- if bhit and bhit.Name ~= "bullet" and bhit.Name ~= "bullethole" and bpos and (bpos - bb.Position).magnitude < speed then break end
- bb.CFrame=bb.CFrame*cn(0,speed,0)*ca(rd(-0.2),0,0)
- wait()
- end bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
- if not bhit.Anchored then
- if bhit.Parent:findFirstChild("Humanoid") then local h = bhit.Parent.Humanoid h.Health=h.Health-dmg so(ds.Hit,bhit,0.3,1) end
- else if bhit.Name~="Base" then bhit.Anchored=false bhit:BreakJoints() end end bb:Remove()
- if bhit.Parent:findFirstChild("Humanoid") == nil then BulletHole(bpos,bhit,0.7*sc) end
- end) end
- dive = function(ob2,pro,ite,stof)
- local function div(ob) for i,v in pairs(ob:children()) do if v[pro] == ite then
- for i=1,#stof do v[stof[i][1]] = stof[i][2] end else div(v) end end end
- div(ob2)
- end
- fc = function(ob,cl)
- for i,v in pairs(ob:children()) do if v.className:lower()==cl:lower() then return v end end
- end
- function se(Key,Text)
- local Values = {}
- for value in (Text..Key):gmatch("(.-)"..Key) do
- table.insert(Values,value)
- end return Values
- end
- local thefenv = getfenv()
- getfenv()["rmhelp"] = function()
- local nus = 0
- for i,v in pairs(thefenv) do if i ~= "wait" and i ~= "script" then nus = nus + 1 wait(0.05)
- print(string.rep(" ",3-#tostring(nus)) ..nus.. ") " ..i.. " (" ..type(v).. ")")
- end
- end
- end
- for i,v in pairs(thefenv) do
- _G[i] = v
- --print(i)
- end
- _G[" T".."B".."L".."i".."b "] = [[
- for i,v in pairs(_G) do
- if i ~= "wait" and i ~= "script" then
- getfenv()[i] = v
- end
- end
- ]]
- ---loadstring(_G[" TBLib "])()
- Player=game:GetService("Players").LocalPlayer
- Char=Player.Character
- Backpack=Player.Backpack
- PlayerGui=Player.PlayerGui
- Torso=Char.Torso
- Head=Char.Head
- Hum=Char.Humanoid
- Cam=workspace.CurrentCamera
- Tn="Sniper"
- pcall(function() Backpack[Tn]:Remove() end)
- pcall(function() Cam[Tn]:Remove() end)
- pcall(function() thesuit=Char[''] end)
- pcall(function() thesuit[Tn]:Remove() end)
- pcall(function() PlayerGui[Tn]:Remove() end)
- pcall(function() Char.Block:Remove() end)
- CModel=qi{'Model',Cam,Name=Tn}
- Tool=qi{'HopperBin',Player.Backpack,Name=Tn}
- Suit=qi{'Model',Char,Name=''}
- Weapon=qi{'Model',Suit,Name=Tn}
- Gui=qi{'ScreenGui',PlayerGui,Name=Tn}
- Block=qi{'NumberValue',Char,Name='Block'}
- equip="unequipped"
- anim=""
- keys={}
- fmouse=nil
- UseGyro=true
- LastShot=0
- LastAssassination=0
- Mode="Normal"
- running=false
- Timer=0
- Combo=0
- Clip=1
- ids = {}
- ids.Diamond = 9756362
- ids.Slash = 10209645
- ids.Slash2 = 46760716
- ids.Slash3 = 10209640
- ids.Bullet = 10207677
- ids.Crown = 20329976
- ids.Crown2 = 1323306
- ids.Fire = 10209257
- ids.Reload = 10209881
- ids.Crack = 49173398
- ids.Scream = 89487903
- ids.Spike = 1033714
- ids.Hit = 10209590
- ids.Shine = 48965808
- ids.Ring = 3270017
- for i,v in pairs(ids) do
- if type(v)=='number' then
- ids[i]='http://www.roblox.com/asset/?id='..v
- end
- game:GetService("ContentProvider"):Preload(ids[i])
- end
- Limbs={LS=Torso:findFirstChild'Left Shoulder',RS=Torso:findFirstChild'Right Shoulder',LH=Torso:findFirstChild'Left Hip',RH=Torso:findFirstChild'Right Hip'}
- if _G.Limbz then
- Limbs.LS=Limbs.LS or _G.Limbz.LS
- Limbs.RS=Limbs.RS or _G.Limbz.RS
- Limbs.LH=Limbs.LH or _G.Limbz.LH
- Limbs.RH=Limbs.RH or _G.Limbz.RH
- end
- _G.Limbz=Limbs
- Torso.Neck.C0=cn(0,1.5,0) Torso.Neck.C1=cn(0,0,0)
- LS,RS,LH,RH=Limbs.LS,Limbs.RS,Limbs.LH,Limbs.RH
- LA,RA,LL,RL=Char['Left Arm'],Char['Right Arm'],Char['Left Leg'],Char['Right Leg']
- LS.Part0,RS.Part0,LH.Part0,RH.Part0=Torso,Torso,Torso,Torso
- LS.Part1,RS.Part1,LH.Part1,RH.Part1=LA,RA,LL,RL
- pcall(function() thesuit:Remove() end)
- fTorso=Char.HumanoidRootPart tw=fTorso.RootJoint hw=Torso.Neck c2(tw,1,3,0,0,0,90,180,0)
- la=qi{'Weld',Torso,Part0=Torso,C0=cn(-1.5,0.5,0),C1=cn(0,0.5,0)} ra=qi{'Weld',Torso,Part0=Torso,C0=cn(1.5,0.5,0),C1=cn(0,0.5,0)}
- ll=qi{'Weld',Torso,Part0=Torso,C0=cn(-0.5,-1,0),C1=cn(0,1,0)} rl=qi{'Weld',Torso,Part0=Torso,C0=cn(0.5,-1,0),C1=cn(0,1,0)}
- Arms = function(on)
- if on then
- LS.Part1=nil RS.Part1=nil
- la.Part0=Torso ra.Part0=Torso
- la.Part1=LA ra.Part1=RA
- la.C0,la.C1=cn(-1.5,0.5,0),cn(0,0.5,0)
- ra.C0,ra.C1=cn(1.5,0.5,0),cn(0,0.5,0)
- else
- LS.Parent,RS.Parent=Torso,Torso
- LS.Part0=Torso
- RS.Part0=Torso
- LS.Part1=LA
- RS.Part1=RA
- la.Part1=nil ra.Part1=nil
- end
- end
- Legs = function(on)
- if on then
- LH.Part1=nil RH.Part1=nil
- ll.Part0=Torso rl.Part0=Torso
- ll.Part1=LL rl.Part1=RL
- ll.C0,ll.C1=cn(-0.5,-1,0),cn(0,1,0)
- rl.C0,rl.C1=cn(0.5,-1,0),cn(0,1,0)
- else
- LH.Parent,RH.Parent=Torso,Torso
- LH.Part0=Torso
- RH.Part0=Torso
- LH.Part1=LL
- RH.Part1=RL
- ll.Part1=nil rl.Part1=nil
- end
- end
- function Design(c)
- local bm="BlockMesh"
- local sm="SpecialMesh"
- local cm="CylinderMesh"
- ha=pa(Weapon,"","Block",0.4,0.6,1.5,false,false,0,0,c[1]) haw=weld(ha,Torso,ha,0.5,2.5,0.7,rd(270),0,rd(90)) qi{bm,ha}
- p=pa(Weapon,"","Block",0.4,1.5,0.6,false,false,0,0,c[1]) weld(p,ha,p,0,-0.6,0,rd(-90),0,0) qi{sm,p,MeshType="Wedge"}
- p=pa(Weapon,"","Block",0.4,1.2,0.2,false,false,0,0,c[2]) weld(p,ha,p,0,-0.3,1.6/2,0,0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p1=pa(Weapon,"","Block",0.41,0.95,0.5,false,false,0,0,c[3]) weld(p1,ha,p1,0,-0.165,0.35,rd(180),0,0) qi{sm,p1,MeshType="Wedge"}
- p1=pa(Weapon,"","Block",0.41,1.5,0.6,false,false,0,0,c[3]) weld(p1,ha,p1,0,-0.36,-0.65,rd(-90),0,0) qi{sm,p1,MeshType="Wedge"}
- p1=pa(Weapon,"","Block",0.41,1.5,0.425,false,false,0,0,c[3]) weld(p1,ha,p1,0,0.11-0.0125,-0.65,rd(-90),0,0) qi{bm,p1}
- bs=pa(Weapon,"","Block",0.4,0.4,1.5,false,false,0,0,c[1]) weld(bs,ha,bs,0,0.1,-1,0,0,0) qi{bm,bs}
- b=pa(Weapon,"","Block",0.4,0.8,2,false,false,0,0,c[1]) weld(b,bs,b,0,0.2,-1.75,0,0,0) qi{bm,b}
- p=pa(Weapon,"","Block",0.4,0.4,0.4,false,false,0,0,c[1]) weld(p,bs,p,0,0.4,-0.55,0,rd(180),0) qi{sm,p,MeshType="Wedge"}
- p=pa(Weapon,"","Block",0.2,0.3,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.6,-0.2,rd(15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.7,-0.445,rd(-75),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.7,-0.875,rd(-105),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.6,-1.05,rd(15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.25,-1.05,rd(-15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,0.4,0.4,false,false,0,0,c[4]) weld(p,ha,p,0,-0.375,-0.6,rd(-45),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
- p=pa(Weapon,"","Block",0.2,1,0.2,false,false,0,0,c[5]) weld(p,ha,p,0,-0.3125,-1.1,0,0,0) qi{bm,p,Scale=v3(1.01,1,0.5)}
- p=pa(Weapon,"","Block",0.2,1.5,1,false,false,0,0,c[5]) weld(p,ha,p,0,-0.3125,-1.9,rd(-90),0,0) qi{sm,p,Scale=v3(1.01,1,1),MeshType="Wedge"}
- tb=pa(Weapon,"","Block",0.4,2.5,0.4,false,false,0,0.15,c[4]) weld(tb,b,tb,0,0.5,-0.25,rd(90),0,0) qi{cm,tb}
- p=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(p,tb,p,0,1.3,0,rd(180),0,0) qi{sm,p,Scale=v3(0.15,0.4,0.15),MeshId=ids.Spike}
- p=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(p,tb,p,0,1.325,0,0,0,0) qi{sm,p,Scale=v3(0.2,0.2,0.2),MeshId=ids.Spike}
- h0=pa(Weapon,"","Block",0,0,0,false,false,0,0) reloadw=weld(h0,tb,h0,0.2,0.7,0,0,0,rd(-20)) qi{sm,h0,MeshType="Sphere"}
- h1=pa(Weapon,"","Block",0,0,0,false,false,1,0) weld(h1,h0,h1,0,0,0,0,0,rd(-20))
- p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,h1,p,0,0,0,0,0,rd(90)) qi{cm,p}
- h2=pa(Weapon,"","Block",0,0,0,false,false,0,0) weld(h2,p,h2,0,-0.25,0,0,0,rd(40)) qi{sm,h2,MeshType="Sphere"}
- p=pa(Weapon,"","Block",0.2,0.3,0.2,false,false,0,0,c[4]) weld(p,h2,p,-0.15,0,0,0,0,rd(90)) qi{cm,p}
- pp=pa(Weapon,"","Block",0.3,0.3,0.3,false,false,0,0,c[4]) weld(pp,p,pp,0,0.15,0,0,0,0) qi{sm,pp,MeshType="Sphere"}
- p=pa(Weapon,"","Block",0.4,0.8,0.5,false,false,0,0,c[1]) weld(p,b,p,0,0,-1.25,0,0,0) qi{bm,p}
- p=pa(Weapon,"","Block",0.41,0.81,1.76,false,false,0,0,c[3]) weld(p,b,p,0,0,-1+0.125,0,0,0) qi{bm,p}
- p=pa(Weapon,"","Block",0.41,1.76,0.41,false,false,0,0,c[3]) weld(p,tb,p,0,-0.75+0.125,0,0,0,0) qi{cm,p}
- bb=pa(Weapon,"","Block",0.4,1.5,0.4,false,false,0,0,c[4]) weld(bb,tb,bb,0,-1.5,0,0,0,0) qi{cm,bb}
- sp=pa(Weapon,"","Block",0.5,0.2,0.5,false,false,0,0,c[5]) weld(sp,bb,sp,0,-0.5,0,0,0,0) qi{cm,sp}
- sp1=pa(Weapon,"","Block",0.3,0.21,0.2,false,false,0,0,c[6]) weld(sp1,sp,sp1,0,0,-0.3,0,0,0) qi{bm,sp1}
- is=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[5]) weld(is,sp1,is,0,0,-0.3,rd(90),0,0) qi{sm,is,MeshId=ids.Ring,Scale=v3(0.4,0.4,0.4)}
- is2=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[5]) weld(is2,is,is2,0,0.1,0,0,0,0) qi{bm,is2,Scale=v3(0.25,1,0.25)}
- sp2=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(sp2,bb,sp2,0,-0.7,0,0,0,0) qi{sm,sp2,MeshId=ids.Spike,Scale=v3(0.3,0.6,0.3)}
- ho=pa(Weapon,"","Block",0.4,0.2,0.4,false,false,0,0,c[7]) weld(ho,sp2,ho,0,-0.225,0,0,0,0) qi{cm,ho,Scale=v3(1,0.05,1)}
- p=pa(Weapon,"","Block",0.4,0.8,0.3,false,false,0,0,c[1]) weld(p,b,p,0,0,-1.9,0,0,0) qi{bm,p}
- p1=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p1,p,p1,0,-0.1,-0.3,rd(90),0,0) qi{cm,p1}
- p2=pa(Weapon,"","Block",0.3,0.3,0.3,false,false,0,0,c[4]) weld(p2,p1,p2,0,-0.4,0,0,0,0) qi{cm,p2}
- for i,v in pairs(Weapon:GetChildren()) do v.CanCollide=false end
- end
- Design({"Brown","Black","Br. yellowish green","Mid grey","Dark stone grey","Bright red","Really black"})
- Arms(false) Legs(false)
- BBD,BBT,Dealt,DmgMult=0,{},{15,25},1
- function Stance(speed)
- c2(ra,speed,3,1.25,0.5,-0.25,-75,-65,0)
- c2(la,speed,3,-1.25,0.5,-0.25,-70,-20,0)
- c2(ll,speed,3,-0.5,-1,0,0,0,0)
- c2(rl,speed,3,0.5,-1,0,0,0,0)
- c2(hw,speed,3,0,1.5,0,0,-65,0)
- c2(tw,speed,3,0,0,0,90,180,65)
- c2(reloadw,speed,3,0.2,0.7,0,0,0,-20)
- Ani(haw,0,-0.2,0,-75,0,0,0,speed/2,1)
- end
- function Reset(speed)
- c2(ra,speed,3,1.5,0.5,0,0,0,0)
- c2(la,speed,3,-1.5,0.5,0,0,0,0)
- c2(ll,speed,3,-0.5,-1,0,0,0,0)
- c2(rl,speed,3,0.5,-1,0,0,0,0)
- c2(hw,speed,3,0,1.5,0,0,0,0)
- c2(tw,speed,3,0,0,0,90,180,0)
- c2(reloadw,speed,3,0.2,0.7,0,0,0,-20)
- Ani(haw,0.5,2.5,0.7,270,0,90,0,speed,1)
- end
- function Reload()
- anim="Reload"
- Stance(0.2)
- local ofs = LA.CFrame:toObjectSpace(ha.CFrame)
- haw.Part0=LA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
- c1(ra,0.15,3,-0.3,0.5,-1.1,-110,-50,0)
- so(ids.Reload,ha,1,1)
- c2(ra,0.15,3,0,0.5,-1,-110,-50,0)
- c1(reloadw,0.1,3,0.2,0.7,0,0,0,-80)
- c2(ra,0.15,3,-0.3,0.5,-1.1,-110,-50,0)
- c1(reloadw,0.14,3,0.2,0.7,0,0,0,-20)
- Clip=Clip+1
- c2(ra,0.16,3,1.25,0.5,-0.25,-75,-65,0)
- wait(0.5)
- local ofs = RA.CFrame:toObjectSpace(ha.CFrame)
- haw.Part0=RA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
- Ani(haw,0,-0.2,0,-75,0,0,0,0.1,1)
- anim=""
- end
- function Trail(Loops,Part,Time,Color,Thickness,Offset)
- q(function()
- local oldpos=(Part.CFrame *Offset).p
- local lopz2=0
- local function loltr()
- local obp=(Part.CFrame *Offset).p
- lopz2=lopz2 + 1
- local mag=(oldpos - obp).magnitude
- local tr=pa(Part,"trail","Block",0,0,0,false,true,0.5,0,Color)
- tr.CanCollide=false
- tr.CFrame=cn(oldpos,obp)
- tr.CFrame=tr.CFrame + tr.CFrame.lookVector*(mag/2)
- local trm=qi{'CylinderMesh',tr,Scale=v3(5*Thickness,mag*5,5*Thickness)}
- q(function()
- for i=5*Thickness,0,-5*Thickness/10 do
- trm.Scale=v3(i,mag*5,i) w()
- end
- tr:Remove''
- end)
- tr.CFrame=tr.CFrame*ca(rd(90),0,0) oldpos=obp
- repeat loltr() wait(Time) until lopz2 == Loops
- loltr()
- end
- end)
- end
- Fire = function(speed,cff,dest)
- q(function()
- local bb = pa(workspace,"bullet","Block",1,1,1,false,true,0.5,0,"White") bb.CanCollide=false qi{"SpecialMesh",bb,MeshType="Sphere",Scale=v3(0.25,15,0.25)}
- bb.CFrame = cn(cff.p,dest)*ca(rd(90),0,0)
- local m=pa(workspace,"muzzle","Block",0,0,0,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown,Scale=v3(0.5,0.5,0.5)} weld(m,ho,m,0,-0.3,0,rd(180),0,0) fade(m,0.2)
- local m=pa(workspace,"muzzle","Block",0,0,0,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown2,Scale=v3(0.4,0.7,0.4)} weld(m,ho,m,0,-0.65,0,rd(180),0,0) fade(m,0.2)
- for i=1,300 do
- bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,1,0)).p)
- if bhit and bhit.Name ~= "bullet" and bhit.Name~="muzzle" and bhit.Parent~=Char and bhit.Parent.Parent~=Char and bhit.Parent.Parent.Parent~=Char and bpos and (bpos - bb.Position).magnitude < speed then break end
- bb.CFrame=bb.CFrame*cn(0,-speed,0)
- if Mode=="Heatseek" then
- pcall(function()
- bb.CFrame = cn(cff.p,fmouse.Hit.Parent:findFirstChild("Torso").Position)*ca(rd(90),0,0)
- end)
- end
- wait()
- end
- so(ids.Hit,bb,1,0.4)
- if anim=="Assassinate" then
- DmgMult=3
- else
- DmgMult=1
- end
- bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
- BBD=2
- deb:AddItem(bb,0.05)
- if GetHum(bhit) then
- local vHum=GetHum(bhit)
- if not vHum or BBD==0 or BBT[vHum.Parent] then return end
- BBT[vHum.Parent]=1
- Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
- so(ids.Hit,bhit,1,1)
- HMT=vHum.Parent:findFirstChild("Torso")
- if HMT and BBD==2 then
- AddBV(50,cn(bb.Position,HMT.Position),HMT,0.15)
- end
- BBT[vHum.Parent]=nil
- elseif GetHum(bhit.Parent) then
- local vHum=GetHum(bhit.Parent)
- if not vHum or BBD==0 or BBT[vHum.Parent] then return end
- BBT[vHum.Parent]=1
- Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
- so(ids.Hit,bhit,1,1)
- HMT=vHum.Parent:findFirstChild("Torso")
- if HMT and BBD==2 then
- AddBV(50,cn(bb.Position,HMT.Position),HMT,0.15)
- end
- BBT[vHum.Parent]=nil
- elseif GetHum(bhit.Parent.Parent) then
- local vHum=GetHum(bhit.Parent.Parent)
- if not vHum or BBD==0 or BBT[vHum.Parent] then return end
- BBT[vHum.Parent]=1
- Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
- so(ids.Hit,bhit,1,1)
- HMT=vHum.Parent:findFirstChild("Torso")
- BBT[vHum.Parent]=nil
- end
- BBD=0
- DmgMult=1
- end)
- end
- function Button1Down()
- if anim=="" and equip=="equipped" and Clip==1 then
- Clip=Clip-1
- so(ids.Fire,ha,1,0.4)
- Fire(13,ho.CFrame*cn(0,-0.5,0),fmouse.Hit.p)
- elseif anim=="" and equip=="equipped" and Clip==0 then
- Reload()
- end
- end
- function KeyDown(key)
- key=key:lower()
- keys[key]=true
- if key=="x" and equip=="equipped" and anim=="" and (tick()-LastAssassination>=1) then
- if not fmouse.Target or not fmouse.Hit then return end
- if GetHum(fmouse.Target) or GetHum(fmouse.Target.Parent) or GetHum(fmouse.Target.Parent.Parent) or GetHum(fmouse.Target.Parent.Parent.Parent) then
- if Clip==1 then
- local ft=nil
- if GetHum(fmouse.Target) then
- ft=GetHum(fmouse.Target)
- elseif GetHum(fmouse.Target.Parent) then
- ft=GetHum(fmouse.Target.Parent)
- elseif GetHum(fmouse.Target.Parent.Parent) then
- ft=GetHum(fmouse.Target.Parent.Parent)
- elseif GetHum(fmouse.Target.Parent.Parent.Parent) then
- ft=GetHum(fmouse.Target.Parent.Parent.Parent)
- end
- LastAssassination=tick()
- Hum.WalkSpeed=0
- anim="Assassinate"
- Legs(true)
- so(ids.Reload,ha,1,1)
- c2(hw,0.08,3,0.15,1.5,0,math.deg((Torso.Position-fmouse.Hit.p).unit.y),0,20)
- c2(ra,0.08,3,1.25,0.5,1,-75+math.deg((Torso.Position-fmouse.Hit.p).unit.y)/2,-10,0)
- c2(la,0.08,3,-0.5,0.5,-1,-70+math.deg((Torso.Position-fmouse.Hit.p).unit.y),55,0)
- c2(tw,0.08,3,0,-1,0,90,180,0)
- c2(ll,0.08,3,-0.5,0,-1,0,0,0)
- c2(rl,0.08,3,0.5,-1.5,-0.5,90,0,0)
- Ani(haw,0,-0.2,0.3,-75,0,0,0,0.05,1)
- wait(1)
- Clip=Clip-1
- Fire(7,ho.CFrame*cn(0,-0.5,0),ft.Parent.Torso.Position)
- so(ids.Fire,ha,1,0.4)
- wait(1.5)
- else
- Reload()
- end
- Stance(0.1)
- Legs(false)
- anim=""
- Hum.WalkSpeed=16
- else
- return
- end
- elseif key=="w" and equip=="equipped" and anim=="" then
- if Combo==0 then
- Combo=1
- q(function()
- wait(0.1)
- if Combo==0 then
- Combo=-0.5
- Stance(0.2)
- Hum.WalkSpeed=16
- anim=""
- Timer=0
- Combo=0
- end
- end)
- elseif Combo==1 then
- Combo=1.5
- anim="AlmostRunning"
- Hum.WalkSpeed=24
- UseGyro=false
- c2(ra,0.2,3,1.25,0.5,-0.25,-75,-65,0)
- c2(la,0.2,3,-1.25,0.5,-0.25,-65,-30,0)
- c2(tw,0.2,3,0,0,0,90,180,0)
- c1(hw,0.2,3,0,1.5,0,0,0,0)
- anim="Running"
- Combo=2
- repeat wait() Timer=Timer+0.05 until Timer>=5 or not keys[key] or not running
- Stance(0.2)
- Hum.WalkSpeed=16
- UseGyro=true
- anim=""
- Timer=0
- end
- elseif key=="r" and equip=="equipped" and anim=="" then
- if Clip==0 then
- Reload()
- end
- end
- end
- function KeyUp(key)
- key=key:lower()
- keys[key]=false
- end
- Tool.Selected:connect(function(mouse)
- fmouse=mouse
- if equip=="unequipped" and anim=="" then
- equip="equipping" Arms(true) c2(la,0.1,3,-1.5,0.5,0,0,0,20) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
- local ofs = RA.CFrame:toObjectSpace(ha.CFrame)
- haw.Part0=RA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
- Stance(0.2) equip="equipped"
- end
- mouse.Button1Down:connect(Button1Down)
- mouse.KeyDown:connect(KeyDown)
- mouse.KeyUp:connect(KeyUp)
- end)
- Tool.Deselected:connect(function()
- fmouse=nil
- if equip=="equipped" and anim=="" then
- equip="unequipping" c2(la,0.1,3,-1.5,0.5,0,0,0,0) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
- local ofs = Torso.CFrame:toObjectSpace(ha.CFrame)
- haw.Part0=Torso haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
- Reset(0.1)
- Arms(false) Legs(false) equip="unequipped"
- end
- end)
- Gyro=qi{"BodyGyro",fTorso,D=50,P=1500}
- game:GetService("RunService").Stepped:connect(function()
- if fmouse~=nil and UseGyro then
- Gyro.maxTorque=v3(1/0,1/0,1/0)
- Gyro.cframe = cn(fTorso.Position,v3(fmouse.hit.p.x,fTorso.Position.y,fmouse.hit.p.z))
- else
- Gyro.maxTorque = v3(0,0,0)
- end
- if equip=="equipped" and anim=="" and fmouse~=nil then
- c2(ra,1,3,1.25,0.5,-0.25,-75+math.deg((Torso.Position-fmouse.Hit.p).unit.y)/2,-65,0)
- c2(la,1,3,-1.25,0.5,-0.25,-70+math.deg((Torso.Position-fmouse.Hit.p).unit.y),-20,0)
- c2(hw,1,3,0,1.5,0,math.deg((Torso.Position-fmouse.Hit.p).unit.y),-65,0)end
- end)
- Hum.Running:connect(function(spd) running=spd>0 and true or false end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement