local C={cut=.7,head=.3,hb=.4,bonus=.25,minDmg=8,rand=.25,half=.3,fount=12,pool=4.5,maxSplat=800,maxDrop=60,maxCorp=100} local P,W,RS,UIS,TS,LT,PS=game:GetService("Players"),workspace,game:GetService("RunService"),game:GetService("UserInputService"),game:GetService("TweenService"),game:GetService("Lighting"),game:GetService("PhysicsService") local R,env=Random.new(),(getgenv and getgenv())or _G if env.GFX then pcall(env.GFX) end local X,cn={on=true},{} env.GFXX=X local function new(c,p,t) local i=Instance.new(c) if p.Shape then i.Shape=p.Shape end for k,v in pairs(p)do if k~="Shape"then i[k]=v end end i.Parent=t return i end local function bp(p,par) local d={Massless=true,CanCollide=false,CanQuery=false,CanTouch=false,CastShadow=false,Material=Enum.Material.SmoothPlastic} for k,v in pairs(p)do d[k]=v end return new("Part",d,par) end local function weld(a,b)return new("WeldConstraint",{Part0=a,Part1=b},b)end local CY,BL=Enum.PartType.Cylinder,Enum.PartType.Ball local Root=new("Folder",{},W) local Cor,Gib,Sp=new("Folder",{},Root),new("Folder",{},Root),new("Folder",{},Root) local rp=RaycastParams.new() rp.FilterDescendantsInstances={Root} rp.RespectCanCollide=true pcall(function()PS:RegisterCollisionGroup("GFXc")end) local gok=pcall(function()PS:CollisionGroupSetCollidable("GFXc","GFXc",false)end) local cc=new("ColorCorrectionEffect",{},LT) local G=new("ScreenGui",{IgnoreGuiInset=true,ResetOnSpawn=false,DisplayOrder=999}) pcall(function()G.Parent=(gethui and gethui())or game:GetService("CoreGui")end) if not G.Parent then G.Parent=P.LocalPlayer:WaitForChild("PlayerGui") end local btn=new("TextButton",{Size=UDim2.new(0,92,0,34),Position=UDim2.new(0,8,.45,0),BackgroundColor3=Color3.fromRGB(120,0,0),BackgroundTransparency=.25,TextColor3=Color3.new(1,1,1),TextScaled=true,Font=Enum.Font.GothamBold,Text="CLEAR"},G) new("UICorner",{},btn) cn[#cn+1]=btn.Activated:Connect(function() Cor:ClearAllChildren() Gib:ClearAllChildren() btn.Text="CLEARED" task.delay(.8,function()btn.Text="CLEAR" end) end) env.GFX=function()X.on=false for _,c in ipairs(cn)do pcall(function()c:Disconnect()end)end Root:Destroy() G:Destroy() cc:Destroy() end local function S(s)local t={}for w in s:gmatch("[^,]+")do t[w]=1 end return t end local CUT=S("Head,Left Arm,Right Arm,Left Leg,Right Leg,LeftUpperArm,LeftLowerArm,LeftHand,RightUpperArm,RightLowerArm,RightHand,LeftUpperLeg,LeftLowerLeg,LeftFoot,RightUpperLeg,RightLowerLeg,RightFoot") local MAIN=S("Head,Left Arm,Right Arm,Left Leg,Right Leg,LeftUpperArm,RightUpperArm,LeftUpperLeg,RightUpperLeg") local function col()return Color3.fromRGB(R:NextInteger(70,135),0,0)end local function cl(v)return v.Magnitude>40 and v.Unit*40 or v end local sp,pl={},{} local function splat(pos,n,s,perm,c) local p=bp({Anchored=true,Shape=CY,Reflectance=.1,Color=c or col(),Size=Vector3.new(.03,s*R:NextNumber(.7,1.2),s*R:NextNumber(.7,1.2)), CFrame=CFrame.lookAt(pos+n*R:NextNumber(.02,.06),pos+n*2)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(R:NextNumber(0,6.28),0,0)},Sp) if perm then pl[#pl+1]=p else sp[#sp+1]=p if #sp>C.maxSplat then table.remove(sp,1):Destroy() end end if math.abs(n.Y)<.3 and s>.5 and R:NextNumber()<.5 then local len,top=R:NextNumber(1,3.5),CFrame.lookAt(pos+n*.07,pos+n*2) local d=bp({Anchored=true,Color=p.Color,Size=Vector3.new(.1,.05,.03),CFrame=top},Sp) sp[#sp+1]=d TS:Create(d,TweenInfo.new(R:NextNumber(5,9),Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Size=Vector3.new(.1,len,.03),CFrame=top*CFrame.new(0,-len/2,0)}):Play() end return p end local function spl(o,k,r) for _=1,k do local d=Vector3.new(R:NextNumber(-1,1),R:NextNumber(-1.3,.1),R:NextNumber(-1,1)) local h=d.Magnitude>.01 and W:Raycast(o,d.Unit*r,rp) if h then splat(h.Position,h.Normal,R:NextNumber(.4,1.5)) end end end local dr={} local function drop(p,v) if #dr>=C.maxDrop then return end local s=R:NextNumber(.12,.3) dr[#dr+1]={bp({Anchored=true,Shape=BL,Color=col(),Size=Vector3.new(s,s,s),Position=p},Root),p,v,0} end local function burst(p,n,s,bias) for _=1,n do local d=Vector3.new(R:NextNumber(-1,1),R:NextNumber(-.2,1),R:NextNumber(-1,1))+(bias or Vector3.zero) if d.Magnitude>.01 then drop(p,d.Unit*R:NextNumber(s*.4,s)) end end end cn[#cn+1]=RS.Heartbeat:Connect(function(dt) for i=#dr,1,-1 do local d=dr[i] d[4]=d[4]+dt d[3]=d[3]+Vector3.new(0,-W.Gravity*dt,0) local np=d[2]+d[3]*dt local h=W:Raycast(d[2],np-d[2],rp) local rm=d[4]>3 if h then rm=true local m=h.Instance:FindFirstAncestorOfClass("Model") if not(m and m:FindFirstChildOfClass("Humanoid")) and R:NextNumber()<.7 then splat(h.Position,h.Normal,R:NextNumber(.25,.9)) end else d[2]=np d[1].Position=np end if rm then d[1]:Destroy() table.remove(dr,i) end end end) local function em(par,a,b) return new("ParticleEmitter",{Texture="rbxasset://textures/particles/smoke_main.dds",Color=ColorSequence.new(Color3.fromRGB(125,0,0),Color3.fromRGB(60,0,0)), Size=NumberSequence.new(.45,.12),Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,.05),NumberSequenceKeypoint.new(.7,.25),NumberSequenceKeypoint.new(1,1)}), Lifetime=NumberRange.new(.4,1),Speed=NumberRange.new(a,b),SpreadAngle=Vector2.new(180,180),Acceleration=Vector3.new(0,-65,0),Drag=1.5, Rotation=NumberRange.new(0,360),Rate=0,Enabled=false},par) end local function puff(par,n,a,b)local e=em(par,a or 8,b or 28) e:Emit(n) task.delay(2.5,function()e:Destroy()end)end local function bleed(par,rate,sec) local e=em(par,0,3) e.Rate=rate e.Enabled=true task.delay(sec,function()e.Enabled=false task.wait(1.5)e:Destroy()end) end local function fount(at,sec) local e=em(at,18,30) e.SpreadAngle=Vector2.new(9,9) e.Lifetime=NumberRange.new(.5,1.1) task.spawn(function() local t=os.clock() while X.on and at.Parent and os.clock()-tn do table.remove(k,1):Destroy() end end local function hide(st,l) for _,p in ipairs(l)do st.h[#st.h+1]=p st.hs[p]=1 p.LocalTransparencyModifier=1 p.CanCollide=false for _,d in ipairs(p:GetChildren())do if d:IsA("Decal")then d.Transparency=1 end end end end X.t={C,P,W,RS,UIS,TS,R,cc,new,bp,weld,Root,Cor,Gib,rp,gok,cl,CUT,MAIN,sp,pl,splat,spl,burst,puff,bleed,fount,motors,chain,stump,PH,trim,hide,cn} local env=(getgenv and getgenv())or _G local X=env.GFXX if not X then return warn("شغل الجزء 1 اول") end local C,P,W,RS,UIS,TS,R,cc,new,bp,weld,Root,Cor,Gib,rp,gok,cl,CUT,MAIN,sp,pl,splat,spl,burst,puff,bleed,fount,motors,chain,stump,PH,trim,hide,cn=table.unpack(X.t,1,34) local function chunks(p) for _=1,5 do local s=R:NextNumber(.3,.7) local c=bp({Massless=false,CanCollide=true,CustomPhysicalProperties=PH,Size=Vector3.new(s,s,s), Color=({p.Color,Color3.fromRGB(150,20,25),Color3.fromRGB(230,225,210)})[R:NextInteger(1,3)], CFrame=p.CFrame*CFrame.new(R:NextNumber(-.5,.5),R:NextNumber(0,.7),R:NextNumber(-.5,.5))},Gib) trim(Gib,60) c.AssemblyLinearVelocity=Vector3.new(R:NextNumber(-18,18),R:NextNumber(8,24),R:NextNumber(-18,18)) bleed(c,20,3) end end local function prep(c) for _,d in ipairs(c:GetDescendants())do if d:IsA("Script")or d:IsA("LocalScript")or d:IsA("BillboardGui")or d:IsA("Sound")or d:IsA("ForceField")then d:Destroy() end end local h=c:FindFirstChildOfClass("Humanoid") if h then h.BreakJointsOnDeath=false h.RequiresNeck=false h.PlatformStand=true h.DisplayDistanceType=Enum.HumanoidDisplayDistanceType.None h.HealthDisplayType=Enum.HumanoidHealthDisplayType.AlwaysOff pcall(function()h.EvaluateStateMachine=false end) end end local function phys(c) local ps={} for _,d in ipairs(c:GetDescendants())do if d:IsA("BasePart")then d.Anchored=false d.Massless=false d.CustomPhysicalProperties=PH d.CanCollide=false if not d:FindFirstAncestorOfClass("Accessory")then ps[#ps+1]=d if gok then d.CollisionGroup="GFXc" end end end end if not gok then for i=1,#ps do for j=i+1,#ps do new("NoCollisionConstraint",{Part0=ps[i],Part1=ps[j]},ps[i]) end end end task.delay(.15,function()for _,p in ipairs(ps)do if p.Parent then p.CanCollide=true end end end) end local function limb(ch,names,out,vel) ch.Archivable=true local ok,c=pcall(function()return ch:Clone()end) if not ok or not c then return end prep(c) for _,d in ipairs(c:GetChildren())do if d:IsA("BasePart")then if not names[d.Name]then d:Destroy()end elseif d:IsA("Tool")then d:Destroy() elseif d:IsA("Accessory")then local h=d:FindFirstChild("Handle") local w=h and h:FindFirstChild("AccessoryWeld") if not(w and w.Part1 and names[w.Part1.Name])then d:Destroy()end end end for _,d in ipairs(c:GetDescendants())do if d:IsA("Motor6D")then d:Destroy()end end local ps={} for _,d in ipairs(c:GetChildren())do if d:IsA("BasePart")then ps[#ps+1]=d end end local m=ps[1] if not m then c:Destroy() return end for _,p in ipairs(ps)do if p~=m then weld(m,p) end end phys(c) c.Parent=Cor trim(Cor,C.maxCorp) m.AssemblyLinearVelocity=vel+out*16+Vector3.new(R:NextNumber(-4,4),8,R:NextNumber(-4,4)) m.AssemblyAngularVelocity=Vector3.new(R:NextNumber(-8,8),R:NextNumber(-8,8),R:NextNumber(-8,8)) bleed(m,40,5) end local function cutLive(ch,st,part) if st.s[part.Name] or st.hs[part] then return end local ms=motors(ch) local m for _,x in ipairs(ms)do if x.Part1==part and x.Part0.Name~="HumanoidRootPart" then m=x;break end end if not m then return end local l=chain(ms,part) local names={} for _,p in ipairs(l)do names[p.Name]=1 end local jp=(m.Part0.CFrame*m.C0).Position local out=part.Position-jp out=out.Magnitude>.05 and out.Unit or Vector3.new(0,-1,0) local hr=ch:FindFirstChild("HumanoidRootPart") local v=hr and cl(hr.AssemblyLinearVelocity) or Vector3.zero fount(stump(m),C.fount) st.s[part.Name]=1 hide(st,l) for _,a in ipairs(ch:GetChildren())do if a:IsA("Accessory")then local h=a:FindFirstChild("Handle") local w=h and h:FindFirstChild("AccessoryWeld") if h and w and w.Part1 and names[w.Part1.Name]then hide(st,{h})end end end if part.Name=="Head" and R:NextNumber()0 then local dist=(v-r.Direction*t).Magnitude if dist=hum.MaxHealth*.5 local ok,e=pcall(function() local hp=pick() local f if hp and CUT[hp.Name] and R:NextNumber()<((hp.Name=="Head"and C.head or C.cut)+C.bonus)then f=hp.Name end local t=tor() if t then spl(t.Position,heavy and 14 or 8,14)end local hpos=hp and hp.Position local r=corpse(ch,heavy,st,f) if r then puff(r,heavy and 90 or 55,10,32) burst(r.Position,heavy and 24 or 12,28) bleed(r,45,7) pool(r) if hp and hp.Name=="Head" then puff(r,110,14,40) burst(hpos,24,36,Vector3.new(0,1,0)) spl(hpos,10,16) end elseif t then puff(t,60,10,30) end end) if not ok then warn("[GFX] "..tostring(e)) end end local function hit(d) local hp=pick()or tor() if not hp then return end puff(hp,math.clamp(math.floor(d*.8),6,40),8,26) burst(hp.Position,math.clamp(math.floor(d*.4),3,15),24) spl(hp.Position,math.clamp(math.floor(d/6),1,6),12) bleed(hp,12,5) if CUT[hp.Name]and d>=C.minDmg and R:NextNumber()<(hp.Name=="Head"and C.head or C.cut)then cutLive(ch,st,hp)end end local cs={} cs[1]=hum.HealthChanged:Connect(function(h) local d=last-h last=h if dead or not X.on then return end if h<=0 then die(math.max(d,0)) elseif d>=1 then local ok,e=pcall(hit,d) if not ok then warn(e) end end end) cs[2]=hum.Died:Connect(function()die(hum.MaxHealth)end) cs[3]=ch.AncestryChanged:Connect(function(_,p) if not p then tr[ch]=nil for _,c in ipairs(cs)do c:Disconnect()end end end) end cn[#cn+1]=RS.Stepped:Connect(function() for _,st in pairs(tr)do for _,p in ipairs(st.h)do if p.Parent then if p.LocalTransparencyModifier~=1 then p.LocalTransparencyModifier=1 end if p.CanCollide then p.CanCollide=false end end end end end) task.spawn(function() local n,lw=0,false while X.on do task.wait(.35) n=n+1 local cam=W.CurrentCamera local lc=P.LocalPlayer.Character local lh=lc and lc:FindFirstChildOfClass("Humanoid") local low=lh and lh.Health>0 and lh.Health/lh.MaxHealth<.3 or false if low~=lw then lw=low TS:Create(cc,TweenInfo.new(.5),{Saturation=low and -.6 or 0}):Play() end for _,m in ipairs(Cor:GetChildren())do local t=m:GetAttribute("t") local rt=m:FindFirstChild("UpperTorso")or m:FindFirstChild("Torso") if t and rt and os.clock()-t<40 and rt.AssemblyLinearVelocity.Magnitude>3 then local r=W:Raycast(rt.Position,Vector3.new(0,-3.5,0),rp) if r then splat(r.Position,r.Normal,.5,false,Color3.fromRGB(80,0,0)) end end end for ch,st in pairs(tr)do local h=ch:FindFirstChild("HumanoidRootPart") if h and cam and (h.Position-cam.CFrame.Position).Magnitude<100 and h.AssemblyLinearVelocity.Magnitude>2 then local r=W:Raycast(h.Position,Vector3.new(0,-5,0),rp) if r then if st.wet<=0 then for _,l in ipairs({sp,pl})do for _,b in ipairs(l)do if b.Parent and b.Size.Y>=.5 and (b.Position-r.Position).Magnitude0 then st.wet=st.wet-1 splat(r.Position+h.CFrame.RightVector*.6*(n%2*2-1),r.Normal,.35,false,Color3.fromRGB(40+st.wet*12,0,0)) end end end end end end) local function onD(d)if d:IsA("Humanoid")and d.Parent and d.Parent:IsA("Model")then task.defer(watch,d.Parent)end end for _,d in ipairs(W:GetDescendants())do onD(d)end cn[#cn+1]=W.DescendantAdded:Connect(onD)