Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'https://pastebin.com/EGri1k7d'
- local Instance2=function(a)return function(b)local c=Instance.new(a);for d,e in pairs(b)do
- local _,f=pcall(function()c[d]=e;end);if f then print(f);end;end;return c;end;end;
- local ChangeProperties=function(a)return function(b)for c,d in pairs(b)do local _,e=pcall(function()a[c]=d;end);
- if e then print(e);end;end;end;end;local function DeathEffect(char,a)char=(not a and char)or a;if not char then
- return;end;if not char:IsA'Model'then return;end;
- local hum,hrp=char:FindFirstChildWhichIsA'Humanoid',char:FindFirstChild'HumanoidRootPart';if not(hum and hrp)then
- return;end;hum.BreakJointsOnDeath=false;hum.Died:Connect(function()for _,a in pairs(char:GetDescendants())do
- if a:IsA'Motor6D'then a:Destroy();end;end;for _,a in pairs(char:GetDescendants())do
- if a:IsA'BasePart'then ChangeProperties(a){BrickColor=BrickColor.new("New Yeller");Material='Glass';};
- Instance2'WeldConstraint'{Part0=a;Part1=hrp;Parent=hrp;};elseif a:IsA'SpecialMesh'then a.TextureId='';
- elseif a:IsA'Decal'then a:Destroy();end;end;end);end;workspace.ChildAdded:Connect(DeathEffect);
- table.foreach(workspace:GetChildren(),DeathEffect);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement