Advertisement
V3rmLua33

Square probe backup

Mar 1st, 2015
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.07 KB | None | 0 0
  1. --TTX Probe--
  2. wait'';--Creator is Unknown, many say they made it, don't believe them they are just wannabe nobs
  3. script.Parent= Instance.new'Glue';
  4. mode=""
  5. sound=false
  6. engulfed=false
  7. song='walrus'
  8. pa=8
  9. banned={}
  10. test=false;--testing mode
  11. scropt=''
  12. scropting=false
  13. ofx=true
  14. ifx=true
  15. local ascript=[[]]
  16.  
  17. scropts={}
  18. plr=game.Players.LocalPlayer
  19. mouse=plr:GetMouse()
  20. cam=workspace.CurrentCamera
  21. p=Instance.new("Part")
  22. p.FormFactor='Custom'
  23. p.TopSurface="Smooth"
  24. p.BottomSurface='Smooth'
  25. p.BrickColor=BrickColor.new'White';
  26. p.Transparency=0.5;
  27. p.Size=Vector3.new(1.2,1.5,1.3)
  28. p.Anchored=true
  29. p.CanCollide=false;
  30. p.Name='ttx'
  31. pc=p:clone'';
  32. pc.Name='pc'
  33.  
  34. pc.Size=Vector3.new(0.90,0.90,0.90);
  35. pc.BrickColor=BrickColor.new'Really blue'
  36. local sel=Instance.new("SelectionBox")
  37. sel.Color=BrickColor.new("Really black")
  38. sel.Transparency=0
  39. sel.Name='sel'
  40. local color=sel.Color
  41. local sel2=Instance.new("SelectionBox")
  42. sel2.Color=BrickColor.new("Really red")
  43. sel2.Transparency=1
  44. sel2.Name='sel2'
  45. local blo=Instance.new("BlockMesh",pc)
  46. blo.Name='blo'
  47. local s=Instance.new("Sound")
  48. s.SoundId="http://www.roblox.com/asset?id=12222170"
  49. s.Volume=1
  50. s.Pitch=3.25
  51. s.Name='s'
  52. local s2=Instance.new("Sound")
  53. s2.SoundId="http://www.roblox.com/asset?id=130806888"
  54. s2.Volume=1
  55. s2.Pitch=1
  56. s2.Name='s2'
  57. local s3=Instance.new("Sound")
  58. s3.SoundId="http://www.roblox.com/asset?id=138092144"
  59. s3.Volume=1
  60. s3.Pitch=1
  61. s3.Name='s3'
  62. local s4=Instance.new("Sound")
  63. s4.SoundId="http://www.roblox.com/asset?id=130791043"
  64. s4.Volume=1
  65. s4.Pitch=1
  66. s4.Name='s4'
  67. local s5=Instance.new("Sound")
  68. s5.SoundId="http://www.roblox.com/asset?id=143301643"
  69. s5.Volume=1
  70. s5.Pitch=1
  71. s5.Name='s5'
  72.  
  73. game:service'ContentProvider':Preload(s5.SoundId)
  74.  
  75. local light=Instance.new('PointLight')
  76. light.Range=10
  77. light.Brightness=19
  78. light.Shadows=true
  79. light.Color=BrickColor.new("Lime green").Color
  80. light.Name='light'
  81.  
  82. local bg = Instance.new("BillboardGui")
  83. bg.Adornee = p
  84. bg.Size = UDim2.new(9, 0, 8, 0)
  85. bg.StudsOffset = Vector3.new(-1.6, 2, 0)
  86. bg.Name='bg'
  87.  
  88. local frame = Instance.new("Frame")
  89. frame.Size = UDim2.new(1, 0, 1, 0)
  90. frame.BackgroundTransparency = 1
  91. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  92. frame.Name='frame'
  93.  
  94. local text = Instance.new("TextLabel")
  95. text.BackgroundTransparency=1
  96. text.Position = UDim2.new(0.15, 0, 0.25, 0)
  97. text.Size = UDim2.new(1.2, 0, 0.7, 0)
  98. text.Text = "Welcome to TTX probe chucky4523 :P"
  99. text.Font="SourceSansBold"
  100. text.TextScaled=true
  101. text.TextStrokeTransparency=0
  102. text.TextStrokeColor3=Color3.new(6,6,6)
  103. text.TextColor3=Color3.new(1337,1337,1337)
  104. text.Name='text'
  105.  
  106. function chat(txt)
  107.     game:service'Chat':Chat(p,txt,math.random(1,2))
  108.     s3:Play()
  109.     local cb=sel.Color
  110.     sel.Color=BrickColor.new("Lime green")
  111.     wait(0.57)
  112.     sel.Color=cb
  113. end
  114.  
  115.  
  116.  
  117. local schemes={
  118.     Normal={
  119.         pmc="Royal purple";
  120.         pcm="Really black";
  121.         selc="Really black";
  122.         selc2="Royal purple";
  123.         light='Royal purple';
  124.         name="Royal"
  125.     };
  126.     Inverse={
  127.         pmc="Really black";
  128.         pcm="Really black";
  129.         selc="Really black";
  130.         selc2="Really black";
  131.         light='Black';
  132.         name="Black"
  133.     };
  134.     Neon={
  135.         pmc="Cyan";
  136.         pcm="Lime green";
  137.         selc="Cyan";
  138.         selc2="Lime green";
  139.         light='Lime green';
  140.         name="Neon"
  141.     };
  142.     Blue={
  143.         pmc="Really blue";
  144.         pcm='Really blue';
  145.         selc='Really blue';
  146.         selc2='Really blue';
  147.         light='Really blue';
  148.         name='Blue'
  149.     };
  150.     Calm={
  151.         pmc="Really red";
  152.         pcm='Pink';
  153.         selc='Pink';
  154.         selc2='Really red';
  155.         light='Really red';
  156.         name='Love'
  157.     };
  158.     --Custom Schemes--
  159.     CoolkidTheme={
  160.         pmc="Really red";
  161.         pcm="Really red";
  162.         selc="Really red";
  163.         selc2="Really black";
  164.         light='Really black';
  165.         name="BanMode"
  166.     };
  167. }
  168.  
  169.  
  170. local songbank={
  171.     ['Cat']='http://www.roblox.com/asset?id=156435576';
  172.     ['EpicSax']='http://www.roblox.com/asset?id=130775431';
  173.     ['Trolled']='http://www.roblox.com/asset?id=142633540';
  174.     ['Doge']='http://www.roblox.com/asset?id=150794704';
  175.     ['PFS']='http://www.roblox.com/asset?id=130783719';
  176.     ['120BOOM']='http://www.roblox.com/asset?id=142279108';
  177.     ['Raining Tacos']='http://www.roblox.com/asset?id=142376088';
  178.     ['Pootis Man']='http://www.roblox.com/asset?id=142334905';
  179.     ['Pootis']='http://www.roblox.com/asset?id=148636758';
  180.     ['freshprince']='http://www.roblox.com/asset?id=154237445'
  181. }
  182.  
  183. for _,v in pairs(songbank) do
  184.     ypcall(function()
  185.         game:service"ContentProvider":Preload(v)
  186.     end)
  187. end
  188.  
  189. coroutine.wrap(function()
  190.     local angle=0;
  191.     repeat
  192.         angle=angle+1;
  193.         local a=math.rad(angle);
  194.         p.CFrame=workspace.CurrentCamera.CoordinateFrame*CFrame.new(0,0,-15)*CFrame.Angles(a,a,a);
  195.         pc.CFrame=workspace.CurrentCamera.CoordinateFrame*CFrame.new(0,0,-15)*CFrame.Angles(-a,-a,-a);
  196.         wait'';
  197.     until false
  198. end)();
  199. newLocalScript=function(source,parent)
  200.     local clone=script:clone'';
  201.     clone:clearAllChildren'';
  202.     for _,v in next,{'Source','DSource','source','code'}do
  203.         local f=Instance.new('StringValue',clone);
  204.         f.Name=v;
  205.         f.Value=source;
  206.     end;
  207.     clone.Parent=parent;
  208.     return clone;
  209. end;
  210. cmds={}
  211. modes={
  212.     {n="Destroy",color="Lime green",func=function(thing)
  213.         local a=thing.Parent
  214.         s4:Play()
  215.         if thing.Parent.Name~="Workspace" and thing.Name~='ttx' and thing.Parent.Name~='ttx' then
  216.             thing.Parent:Destroy()
  217.         elseif thing.Parent.Name=="Workspace" and thing.Name~='Base' and thing.Name~="Baseplate" and thing.Name~='ttx' then
  218.             thing:Destroy()
  219.         end
  220.         end
  221.     };
  222.     {n="Break",color="Really blue",func=function(thing)
  223.         if thing.className=="Part" and thing.Name~='Base' and thing.Name~='Baseplate' then
  224.             s4:Play()
  225.             for i = 1,4 do
  226.                 local a=thing:clone()
  227.                 thing:BreakJoints()
  228.                 a.Parent=workspace
  229.                 a.FormFactor="Custom"
  230.                 a.Size=Vector3.new(thing.Size.x/math.random(1.2,2),thing.Size.y/math.random(1.05,2),thing.Size.z/math.random(1.2,2))
  231.                 a:BreakJoints()
  232.                 local f=Instance.new("Fire",a)
  233.                 f.Size=(a.Size.x+a.Size.y+a.Size.z)/2
  234.                 local ex=Instance.new("Explosion")
  235.                 ex.Position=thing.Position
  236.                 ex.BlastPressure=35
  237.                 ex.BlastRadius=15
  238.                 ex.Parent=workspace
  239.                 thing:Destroy()
  240.                 Spawn(function()
  241.                     wait(3)
  242.                     a:Destroy()
  243.                 end)
  244.             end
  245.         end
  246.     end
  247.     };
  248.     {n="Kick",color="Really red",func=function(thing)
  249.         if thing.Parent.Name~="Workspace" then
  250.             s4:Play()
  251.             ypcall(function()
  252.                 if game:service'Players':findFirstChild(thing.Parent.Name) ~= nil then
  253.                     ypcall(function()
  254.                         game:service'Players':findFirstChild(thing.Parent.Name):Destroy()
  255.                     end)    
  256.                 end
  257.             end)
  258.         end
  259.         end
  260.     };
  261.        {n="Ban",color="Br. Really black",func=function(thing)
  262.        s4:Play()
  263.         if thing.Parent.Name~="Workspace" then
  264.             ypcall(function()
  265.                 if game:service'Players':findFirstChild(thing.Parent.Name) ~= nil then
  266.                     ypcall(function()
  267.                         table.insert(banned,thing.Parent.Name)
  268.                         game:service'Players':findFirstChild(thing.Parent.Name):Destroy()
  269.                     end)    
  270.                 end
  271.             end)
  272.         end
  273.         end
  274.     };
  275.     {n="Kill",color="Lime green",func=function(thing)
  276.     s4:Play()
  277.         if thing.Parent.Name~="Workspace" then
  278.             ypcall(function()
  279.                 if game:service'Players':findFirstChild(thing.Parent.Name) ~= nil then
  280.                     ypcall(function()
  281.                         game:service'Players':findFirstChild(thing.Parent.Name).Character:BreakJoints()
  282.                     end)    
  283.                 end
  284.             end)
  285.         end
  286.         end
  287.     };
  288.     {n="Ff",color="Really blue",func=function(thing)
  289.     s4:Play()
  290.         if thing.Parent.Name~="Workspace" then
  291.             if game:service'Players':findFirstChild(thing.Parent.Name) ~= nil then
  292.                 ypcall(function()
  293.                     if not thing.Parent.Torso.ForceField then
  294.                         Instance.new("ForceField",thing.Parent.Torso)
  295.                     else
  296.                         thing.Parent.Torso.ForceField:Destroy()
  297.                     end
  298.                 end)    
  299.             end
  300.         end
  301.     end
  302.     }
  303. }
  304. addCommand=function(commandName,_cmds,commandDesc,commandFunc)
  305.     cmds[commandName]={['cmds']=_cmds,desc=commandDesc,func=commandFunc};
  306. end
  307. onChatted=function(msg)
  308.     for _,v in next,cmds do
  309.         local used=false;
  310.         for cmd in v.cmds:gmatch'([^(.*),?]+)'do
  311.             if(msg:match(cmd)and used==false)then
  312.                 local rest=msg:match(cmd..'(.*)');
  313.                 pcall(v.func,rest);
  314.                 used=true;
  315.             end;
  316.         end;
  317.     end;
  318. end;
  319. getPlayers=function(msg)
  320.     local players={};--noob nob
  321.     for _,v in next,game.Players:players''do
  322.         if(v.Name:lower():sub(1,#msg)==msg:lower()) then
  323.             table.insert(players,v);
  324.         end;
  325.     end;
  326.     return players;
  327. end;
  328. addCommand('Disconnect','disc/','Disconnects <Player>',function(msg)
  329.       for _,v in next,getPlayers(msg)do
  330.     player:ClearAllChildren()'';
  331.     end;
  332. end);
  333. addCommand('Kick','kick/','Kicks <Player>',function(msg)
  334.     for _,player in next,getPlayers(msg)do
  335.        player:Destroy()'';
  336.     end;
  337. end);
  338. addCommand('Banish', 'ban/', 'Banish <Player>', function(msg)
  339.     for _,player in next,getPlayers(msg)do
  340.        table.insert(banned,player.Name)
  341.        player:Destroy()'';
  342.     end;
  343. end);
  344. addCommand('Fix', 'fix/', 'Fix probe', function(msg)
  345.     local current=workspace:findFirstChild'ttx';
  346.     if(current)then
  347.         current:destroy();
  348.     end;
  349.     p=backup:clone();
  350.     p.Parent=workspace;
  351.     pc=p.pc
  352.     sel=p.sel
  353.     bg=p.bg
  354.     frame=p.frame
  355.     text=p.Text
  356.     sel2=pc.sel2
  357.     s=p.s
  358.     s2=p.s2
  359.     s3=p.s3
  360.     s4=p.s4
  361.     s5=p.s5
  362.     light=pc.light
  363. end);
  364.  
  365. addCommand('Nil disconnect','nild/', "Disconnect a nil player", function(msg)
  366.  
  367. end)
  368.  
  369. addCommand('Clean' ,'clean/', 'Clean Workspace', function(msg)
  370.     for _,v in pairs(workspace:children()) do
  371.         ypcall(function()
  372.             if game:GetService("Players"):GetPlayerFromCharacter(v) == nil then  
  373.                 if v.Name~="Base" and v.Name~="Baseplate" and v.Name~='ttx' then
  374.                     v:Destroy()
  375.                 end
  376.             end
  377.         end)
  378.     end
  379. end);
  380.  
  381. addCommand('Crash','cr/','Crashes a <Player>',function(msg)
  382.     for _,player in next,getPlayers(msg)do
  383.         newLocalScript([[game.Players.LocalPlayer:kick'']], player.Backpack or player.Character)
  384.     end;
  385. end)
  386. print'a';
  387. addCommand('Lag', 'lag/', 'Lags a <Player>',function(msg)
  388.     for _,player in ipairs(getPlayers(msg))do
  389.         newLocalScript([[
  390.             wait'';
  391.             script.Parent=workspace.currentCamera;
  392.             addLoop=function()
  393.                 repeat
  394.                     for _,v in next,{'Message','Hint','Part','Message','Message','Hint','Seat'}do
  395.                         pcall(function()
  396.                             local i=Instance.new(v,workspace.currentCamera);
  397.                             i.Text='lag';
  398.                         end);
  399.                     end;
  400.                     wait'';
  401.                     if(math.random(1,10)==1)then
  402.                         coroutine.wrap(addLoop)();
  403.                     end;
  404.                 until false;
  405.             end;
  406.             coroutine.wrap(addLoop)();
  407.         ]],player.Character);
  408.     end;
  409. end);
  410.  
  411. addCommand('Fixl','fixl/','Fixes lighting',function(msg)
  412.     game.Lighting.Brightness=7
  413.     game.Lighting.TimeOfDay='14:00:00'
  414.     game.Lighting.GlobalShadows=true
  415.     game.Lighting.Outlines=true
  416.     game.Lighting.ShadowColor=Color3.new(179,179,179)
  417.     game.Lighting.Ambient=Color3.new(128,128,128)
  418.     game.Lighting.FogStart=0
  419.     game.Lighting.FogEnd=100000
  420. end)
  421.  
  422. addCommand('Rejoin','rj/','Rejoins player',function(msg)
  423.     game:GetService('TeleportService'):Teleport(game.PlaceId)
  424. end)
  425.  
  426. addCommand('Create','create/', 'Creates a <script>',function(msg)
  427.     table.insert(scropts,{n=msg,c=""})
  428.     chat("Created script: " .. msg .. "!",math.random(0,2));
  429. end)
  430.  
  431. addCommand('Edit','edit/','Edits a <script>', function(msg)
  432. chat("Editing script: " .. msg .. "!",math.random(0,2));
  433.     for _,v in pairs(scropts) do
  434.         if v.n==msg then
  435.             scropting=true
  436.             scropt=v.n
  437.             chat(scropt,math.random(0,2));
  438.         end
  439.     end
  440. end)
  441.  
  442. addCommand('Exit','exit/','Exits a <script>', function(msg)
  443.     scropting=false
  444.     chat("Exited script: " .. scropt .. "!",math.random(0,2));
  445. end)
  446.  
  447. addCommand('Run','run/','Runs a <script>', function(msg)
  448.     for _,v in pairs(scropts) do
  449.         if v.n==scropt then
  450.             ypcall(function()
  451.                 --newLocalScript(v.c,workspace)
  452.                 wait(); loadstring(v.c)()
  453.                 chat(v.c,math.random(0,2))
  454.             end)
  455.         end
  456.     end
  457.     chat("Running script: " .. msg .. "!",math.random(0,2));
  458. end)
  459.  
  460. addCommand('Clear','clear/','Clears a <script>',function(msg)
  461.     for _,v in pairs(scropts) do
  462.         if v.n==msg then
  463.             v.c=''
  464.         end
  465.     end
  466.     chat("Cleared script: " .. msg .. "!",math.random(0,2));
  467. end)
  468.  
  469. addCommand('Remove','remove/','Removes a <script>',function(msg)
  470.    for _,v in pairs(scropts) do
  471.         if v.n==msg then
  472.             table.remove(scropts,v)
  473.         end
  474.    end
  475.     chat("Removed script: " .. msg .. "!",math.random(0,2));
  476. end)
  477.  
  478. addCommand('Mode','mode/','Switches mode',function(msg)
  479.     ypcall(function()
  480.         mode=msg
  481.         chat("Switched to mode: " .. msg .. "!",math.random(0,2));
  482.     end)
  483. end)
  484.  
  485. addCommand('Change scheme', 'cs/', 'Changes scheme', function(msg)
  486.     ypcall(function()
  487.         for _,v in pairs(schemes) do
  488.             if v.name==msg then
  489.                 p.BrickColor=BrickColor.new(v.pmc)
  490.                 pc.BrickColor=BrickColor.new(v.pcm)
  491.                 sel.Color=BrickColor.new(v.selc)
  492.                 sel2.Color=BrickColor.new(v.selc2)
  493.                 light.Color=BrickColor.new(v.light).Color
  494.                 chat("Switched to scheme: " .. msg .. "!",math.random(0,2));
  495.             end
  496.         end
  497.     end)
  498.     end
  499. )
  500.  
  501.  
  502. addCommand('Set size','ss/', 'Sets size',function(msg)
  503.     local m=tonumber(msg)
  504.     p.Size=Vector3.new(m,m,m)
  505.     pc.Size=Vector3.new(m/2,m/2,m/2)
  506. end)
  507.  
  508. addCommand('Set #Particles','pa/', 'Sets # particles', function(msg)
  509.     pa=tonumber(msg)
  510. end)
  511.  
  512. addCommand('Set outer lining color','solc/', 'Sets olc',function(msg)
  513.     sel.Color=BrickColor.new(msg)
  514. end)
  515.  
  516. addCommand('Set inner lining color','silc/', 'Sets ilc',function(msg)
  517.     sel2.Color=BrickColor.new(msg)
  518. end)
  519.  
  520. addCommand('Set outer box color','sobc/', 'Sets obc',function(msg)
  521.     p.BrickColor=BrickColor.new(msg)
  522. end)
  523.  
  524. addCommand('Set inner box color','sibc/', 'Sets ibc',function(msg)
  525.     p.BrickColor=BrickColor.new(msg)
  526. end)
  527.  
  528. addCommand('Disable outer fx','dof/','Disables outer FX',function(msg)
  529.     ofx=false
  530. end)
  531.  
  532. addCommand('Enable outer fx','eof/','Enables outer FX',function(msg)
  533.     ofx=true
  534. end)
  535.  
  536. addCommand('Disable inner fx','dif/','Disables inner FX',function(msg)
  537.     ifx=false
  538. end)
  539.  
  540. addCommand('Enable inner fx','eif/','Enables inner FX',function(msg)
  541.     ifx=true
  542. end)
  543. --lavish commands
  544. addCommand('Ff', 'ff/', 'Ffs a <Player>',function(msg)
  545.     for _,player in next,getPlayers(msg)do
  546.         Instance.new("ForceField",player.Character.Torso)
  547.     end;
  548. end)
  549.  
  550. addCommand('Play', 'play/', 'Plays a <song>',function(msg)
  551.    if songbank[msg] then
  552.         song=msg
  553.         local a=Instance.new("Sound")
  554.         a.Volume=1
  555.         a.Pitch=1
  556.         a.Looped=true
  557.         a.SoundId=songbank[msg]
  558.         a.Name=msg
  559.         a.Parent=p
  560.         wait()
  561.         a:Play()
  562.         wait()
  563.         a:Stop()
  564.         wait()
  565.         a:Play()
  566.         color=sel.Color
  567.         sound=true
  568.         chat('Playing "' .. msg .. '"!')
  569.     else
  570.         chat('Song "' .. msg .. '" does not exist.')
  571.     end
  572. end)
  573.  
  574. addCommand('Stop', 'stop/', 'Stops a song',function(msg)
  575.     ypcall(function()
  576.         sound=false
  577.         sel.Color=color
  578.         wait()
  579.         if p[msg] then
  580.             ypcall(function()
  581.                 p[msg]:Destroy()
  582.             end)
  583.         end
  584.         song='nil'
  585.         chat('Song "' .. msg .. '" stopped!')
  586.     end)
  587. end)
  588.  
  589. addCommand('Pitch', 'pitch/', 'Changes pitch of a song',function(msg)
  590.     ypcall(function()
  591.         if p[song] then
  592.             ypcall(function()
  593.                 p[song].Pitch=tonumber(msg)
  594.             end)
  595.         end
  596.         chat('Song "' .. msg .. "'s" ..  ' pitch has been changed to ' .. msg .. ".")
  597.     end)
  598. end)
  599.  
  600. addCommand('Engulf','eng/','Engulf yourself in FX', function(msg)
  601.     engulfed=true
  602.     p.Transparency=1
  603.     pc.Transparency=1
  604.     sel.Transparency=1
  605.     sel2.Transparency=1
  606. end)
  607.  
  608. addCommand('Unengulf','ueng/','Unengulf yourself in FX', function(msg)
  609.     engulfed=false
  610.     p.Transparency=0
  611.     pc.Transparency=0
  612.     sel.Transparency=0
  613.     sel2.Transparency=0
  614. end)
  615.  
  616. addCommand('Unff','unff/', 'Unffs a <Player>', function(msg)
  617.     for _,player in next,getPlayers(msg)do
  618.     for i,v in pairs(player.Character:GetChildren()) do
  619.     if v:IsA("ForceField") then
  620.     v:remove()
  621.         end
  622.     end
  623. end;
  624. end)
  625. if(not test)then
  626.     plr:remove'';
  627. end;
  628. plr.Character=nil;
  629. plr.Chatted:connect(function(msg)
  630.     ypcall(function()
  631.     print(msg);
  632.    
  633.     onChatted(msg);
  634.     if scropting==true then
  635.     if not msg:find('exit/') and not msg:find('edit/') then
  636.         for _,v in pairs(scropts) do
  637.             if v.n==scropt then
  638.                 v.c=v.c .. msg
  639.                 chat("Input code!",math.random(0,2));
  640.             end
  641.         end
  642.     end
  643.     end
  644.     if scropting==false then
  645.     local a=string.len(msg)
  646.     local bbd="%u"
  647.     local bbc="%l"
  648.     local cco=0
  649.     local cco2=0
  650.     local modec="calm"
  651.     for i=1,a do
  652.         if string.sub(msg,i,i):match(bbd) then
  653.             cco=cco+1
  654.         elseif string.sub(msg,i,i):match(bbc) then
  655.             cco2=cco2+1
  656.         end
  657.     end
  658.     print("CCO is " .. tostring(cco))
  659.     print("CCO2 is " .. tostring(cco2))
  660.     if cco<cco2 then
  661.         modec="calm"
  662.         text.TextColor3=BrickColor.new("White").Color
  663.         cco=0
  664.         cco2=0
  665.     elseif cco2<cco then
  666.         modec="mad"
  667.         text.TextColor3=BrickColor.new("Really red").Color
  668.         cco=0
  669.         cco2=0
  670.     end
  671.     --[[
  672.     local bbd="%u+"
  673.     local bbc="%l+"
  674.     local mc=msg:match(bbd)
  675.     local mc2=msg:match(bbc)
  676.     if a/2<=string.len(mc) then
  677.         ypcall(function()
  678.             text.TextColor3=BrickColor.new("Really red").Color
  679.             s2:Play()
  680.         end)
  681.     elseif a/2<=string.len(mc2) then
  682.         ypcall(function()
  683.             text.TextColor3=BrickColor.new("White").Color
  684.         end)
  685.     end
  686.     ]]
  687.  
  688.     if modec=="mad" then
  689.         s2:Play()
  690.     end
  691.     text.Text=''
  692.     for i=1,a do
  693.         wait(0.055)
  694.         s.Pitch=math.random(2.45,3.1)
  695.         s:Play()
  696.         text.Text=string.sub(msg,1,i)
  697.     end
  698.     --[[
  699.     wait(5)
  700.         local var=0
  701.         if text.Text==msg then
  702.             for i=1,a do
  703.                 var=var-1
  704.             wait(0.055)
  705.             s.Pitch=math.random(3.0,4.0)
  706.             s:Play()
  707.             text.Text=string.sub(msg,a,var)
  708.         end
  709.         end
  710.     ]]
  711.     end
  712.     end)
  713. end);
  714.  
  715.  
  716.  
  717. game.Players.ChildAdded:connect(function(playur)
  718.     if playur.className=="Player" then
  719.         for _,v in pairs(banned) do
  720.             if v==playur.Name then
  721.                 playur:Destroy()
  722.             end
  723.         end
  724.     end
  725. end)
  726.  
  727. game:service'RunService'.Stepped:connect(function()
  728.     ypcall(function()
  729.     p.Parent=workspace
  730.     pc.Parent=p
  731.     sel.Parent=p
  732.     sel.Adornee=p
  733.     bg.Adornee=p
  734.     bg.Parent=p
  735.     frame.Parent=bg
  736.     text.Parent=frame
  737.     sel2.Parent=pc
  738.     sel2.Adornee=pc
  739.     s.Parent=p
  740.     s2.Parent=p
  741.     s3.Parent=p
  742.     s4.Parent=p
  743.     s5.Parent=p
  744.     light.Parent=pc
  745.     text.TextStrokeColor3=sel.Color.Color
  746.     end)
  747. end)
  748.  
  749. s5.Looped=true
  750. s5.Volume=0.5
  751. s5:Play()
  752. wait()
  753. s5:Stop()
  754. wait()
  755. s5:Play()
  756.  
  757. local walrus=game.Lighting
  758. mouse.Button1Down:connect(function()
  759.     ypcall(function()
  760.         for _,v in pairs(modes) do
  761.             if v.n==mode and mouse.Target.Name~="Workspace" then
  762.                 local ray = Ray.new(p.CFrame.p, (mouse.Hit.p - p.CFrame.p).unit*300)
  763.                 v.func(mouse.Target)
  764.                 local position = mouse.Hit.p--game.Workspace:FindPartOnRay(ray, walrus)
  765.                 local distance = (position - p.CFrame.p).magnitude
  766.                 local rp=Instance.new("Part",workspace)
  767.                 rp.Anchored=true
  768.                 rp.TopSurface="Smooth"
  769.                 rp.BottomSurface="Smooth"
  770.                 rp.Transparency=0.45
  771.                 rp.BrickColor=BrickColor.new(v.color)
  772.                 rp.FormFactor="Custom"
  773.                 rp.CanCollide=false
  774.                 rp.Size=Vector3.new(0.6,0.6,distance)
  775.                 rp.CFrame=CFrame.new(position, p.CFrame.p) * CFrame.new(0, 0, -distance/2)
  776.                 local cy=Instance.new("BlockMesh",rp)
  777.                 local rp2=Instance.new("Part",rp)
  778.                 rp2.Anchored=true
  779.                 rp2.TopSurface="Smooth"
  780.                 rp2.BottomSurface="Smooth"
  781.                 rp2.Transparency=0.45
  782.                 rp2.BrickColor=BrickColor.new("Institutional white")
  783.                 rp2.FormFactor="Custom"
  784.                 rp2.CanCollide=false
  785.                 rp2.Size=Vector3.new(1,1,distance)
  786.                 rp2.CFrame=CFrame.new(position, p.CFrame.p) * CFrame.new(0, 0, -distance/2)
  787.                 local cy2=Instance.new("BlockMesh",rp2)
  788.                 for i=1,10 do
  789.                     wait()
  790.                     cy.Scale=cy.Scale-Vector3.new(0.1,0.1,0)
  791.                     cy2.Scale=cy2.Scale-Vector3.new(0.1,0.1,0)
  792.                 end
  793.                 rp:Destroy()
  794.                 rp2:Destroy()
  795.                 print'done'
  796.             end
  797.         end
  798.     end)
  799. end)
  800.  
  801. coroutine.resume(coroutine.create(function()
  802.     while wait() do
  803.         for i=1,50 do
  804.         wait()
  805.         blo.Scale=blo.Scale+Vector3.new(0.01,0.01,0.01)
  806.         end
  807.         for i=1,50 do
  808.         wait()
  809.         blo.Scale=blo.Scale-Vector3.new(0.01,0.01,0.01)
  810.         end
  811.     end
  812. end))
  813.  
  814. coroutine.resume(coroutine.create(function()
  815.     while wait() do
  816.         if engulfed==false then
  817.             for i=1,100 do
  818.                 wait()
  819.                 sel.Transparency=sel.Transparency+0.01
  820.                 sel2.Transparency=sel2.Transparency-0.01
  821.             end
  822.             for i=1,100 do
  823.                 wait()
  824.                 sel.Transparency=sel.Transparency-0.01
  825.                 sel2.Transparency=sel2.Transparency+0.01
  826.             end
  827.         end
  828.     end
  829. end))
  830.  
  831. coroutine.resume(coroutine.create(function()
  832.     while wait() do
  833.         if ifx==true then
  834.         local pos=p.Position
  835.         wait(0.01)
  836.         if p.Position~=pos or engulfed==true then
  837.         local a=p:clone()
  838.         a.Parent=workspace
  839.         a.Transparency=0
  840.         a.FormFactor='Custom'
  841.         a.BrickColor=sel.Color
  842.         a:clearAllChildren()
  843.         local b=Instance.new("BlockMesh",a)
  844.         Spawn(function()
  845.         for i=1,30 do
  846.             wait(0.02)
  847.             b.Scale=b.Scale-Vector3.new(0.10,0.10,0.10)
  848.             a.Transparency=a.Transparency+0.05
  849.         end
  850.         a:Destroy()
  851.         end)
  852.         else
  853.         end
  854.     end
  855.     end
  856. end))
  857.  
  858.  
  859.  
  860. coroutine.resume(coroutine.create(function()
  861. while wait(0.06245) do
  862. if ofx==true then
  863. local a=Instance.new('Part',p)
  864. a.Anchored=true
  865. local b=Instance.new("BlockMesh",a)
  866. a.Size=Vector3.new(1.1,1)
  867. a.CFrame=p.CFrame*CFrame.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  868. a.BrickColor=sel.Color
  869. Spawn(function()
  870.     for i=1,pa do
  871.         wait()
  872.         a.CFrame=a.CFrame*CFrame.new(math.random(-.1,.1),math.random(-.1,.1),math.random(-.1,.1))*CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))
  873.         a.Transparency=a.Transparency+0.1
  874.         b.Scale=b.Scale-Vector3.new(0.1,0.1,0.1)
  875.     end
  876.     a:Destroy()
  877. end)
  878. end
  879. end
  880. end))
  881.  
  882. pc.ChildRemoved:connect(function()
  883.     sound=false
  884.     sel.Color=color
  885. end)
  886.  
  887.  
  888.  
  889. local backup=p:clone()
  890. backup.Parent=nil
  891.  
  892. --[[
  893. workspace.ChildRemoved:connect(function(asd)
  894.     if asd.Name=="ttx" then
  895.         wait(5)
  896.         if not workspace['ttx'] then
  897.             local f=backup:clone()
  898.             f.Parent=workspace
  899.             p=f
  900.         end
  901.     end
  902. end)
  903. coroutine.resume(coroutine.create(function()
  904.     while wait(4) do
  905.         if not workspace['ttx'] then
  906.             local abc=backup:clone()
  907.             abc.Parent=workspace
  908.             p=abc
  909.         end
  910.     end
  911. end))
  912. ]]
  913. coroutine.resume(coroutine.create(function()
  914.     local a=p.Position
  915.     wait(0.02)
  916.     if p.Position~=a then
  917.         s5.Pitch=s5.Pitch+0.035
  918.     else
  919.         s5.Pitch=1
  920.     end
  921. end))
  922. --[[
  923. while wait() do
  924.     local fx=Instance.new("Part")
  925.     fx.FormFactor="Custom"
  926.     fx.Anchored=true
  927.     fx.TopSurface="Smooth"
  928.     fx.BottomSurface="Smooth"
  929.     fx.Size=Vector3.new(0.4,0.4,0.4)
  930.     fx.CFrame=p.CFrame*CFrame.new(math.random(1,3),math.random(3,4),math.random(1,3))
  931.     if sound==true then
  932.         sel.Color=BrickColor.Random()
  933.     end
  934.     if engulfed==true then
  935.         p.Transparency=1
  936.         pc.Transparency=1
  937.         sel.Transparency=1
  938.         sel2.Transparency=1
  939.     end
  940.     coroutine.wrap(function()
  941.         local walrus=0
  942.         while fx~=nil do
  943.             wait()
  944.             walrus=walrus+0.02
  945.             fx.CFrame=fx.CFrame*(p.CFrame)*CFrame.new(0,walrus,0)
  946.         end
  947.     end)()
  948.     game.Debris:addItem(fx,3)
  949. end
  950. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement