Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'https://pastebin.com/raw/urnbaTJR'
- local Container={};
- local function Instance_2(c,p)if not c then return;end;p=p or{};
- local a=(function()for d,b in pairs(Container)do if b.ClassName==c then
- table.remove(Container,d);return b;end;end;end)()or Instance.new(c,p.Parent);
- for b,c in pairs(p)do local _,d=pcall(function()a[b]=c;end);if d then print(d);end;
- end;return a;end;
- local function Remove(a)local b=a:GetDescendants();table.insert(b,a);
- for _,c in pairs(b)do pcall(function()table.insert(Container,c);c.Parent=nil;end);end;
- end;
- local function Damage(h,d,f)if not h then return;end;d=d or 10;f=f or function()end;
- local a=h:FindFirstAncestorWhichIsA'Model';if not a then return;end;
- local b=a:FindFirstChildWhichIsA'Humanoid';
- local c=a:FindFirstChild'Head'or a:FindFirstChild'Torso'or a:
- FindFirstChild'UpperTorso'or a:FindFirstChild'HumanoidRootPart';
- if a==workspace then return;end;if b then if b.Health<=0 then return;end;
- if b.Health>101 then b.Health=0;f();else b:TakeDamage(d);f();end;elseif c then
- c:Destroy();f();else pcall(function()a:BreakJoints()f();end);end;end;
- local function Rainbow(Instance_1,Property,Color_Increment,Wait_Increment)
- if not Instance_1 or not Property then return;end;Color_Increment=Color_Increment or 2;
- Wait_Increment=Wait_Increment or 1/60;coroutine.wrap(function()local frame=0;
- while true do if Instance_1==nil or Instance_1.Parent==nil then break;end;frame=frame+Color_Increment;
- if frame>=360 then frame=0;end;Instance_1[Property]=Color3.fromHSV(frame/360,1,1);
- wait(Wait_Increment);end;end)();end;local name_inc=0;
- local function Summmon_Part()name_inc=name_inc+1;local Rainbow_Part=Instance_2('Part',{
- Parent=workspace;Size=Vector3.new(4,4,4);CanCollide=true;Anchored=false;Material=
- 'Cobblestone';Position=Vector3.new(0,20,10);Name='Rainbow_'..name_inc});
- Rainbow(Rainbow_Part,'Color');local bool=true;local Infect_And_Kill=function(a)
- if not a or not bool then return;end;if not a.Parent then return;end;
- if a.Parent.Name==Rainbow_Part.Name then return;end;
- if a.Name=='Baseplate'or a.Name=='Base'then return;end;bool=false;
- local sound=Rainbow_Part:FindFirstChild'Ice_Freeze'or Instance_2('Sound',{SoundId=
- 'rbxassetid://268249319';Volume=1;Looped=false;Playing=false;TimePosition=0;Name=
- 'Ice_Freeze';Parent=Rainbow_Part});sound:Play();
- local b=a:Clone();pcall(function()Remove(a)end);if not b then bool=true return;end;
- b.Parent=Rainbow_Part;b.Anchored=true;b.Material='Cobblestone';b.CanCollide=false;
- b.Transparency=0;if b:FindFirstChildWhichIsA'SpecialMesh'then
- b:FindFirstChildWhichIsA'SpecialMesh'.TextureId='';end;Rainbow(b,'Color');wait();
- for _,c in pairs(b:GetTouchingParts())do(function()if not c then return;end;
- Damage(c,1000);end)();end;wait()bool=true;local bool2=true;b.Touched:Connect(function(d)
- if not bool2 then return;end;bool2=false;Damage(d,1000,function()Remove(b);end);
- wait();bool2=true;end);end;Rainbow_Part.Touched:Connect(Infect_And_Kill);
- coroutine.wrap(function()while true do for _,a1 in pairs(Rainbow_Part:GetTouchingParts())do
- Infect_And_Kill(a1);end;wait();end;end)();end;Summmon_Part();
- workspace.ChildRemoved:Connect(function(a)
- if workspace:FindFirstChild('Rainbow_'..name_inc)then return;end;
- if not(a.Name):sub(1,8)=='Rainbow_'then return;end;Summmon_Part();end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement