Advertisement
zqozr

hidden devs application

Aug 16th, 2023
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.18 KB | Source Code | 0 0
  1. --[[
  2. this script is one of the source code of a script in zq's sansbox. Please do not redistribute.
  3. This is a solo project I was working on and thought I could post this to the applications.
  4. - zqozr_II
  5. ]]
  6. local phases = {
  7.     first = {
  8.         start = 2; -- starts attacking after x seconds
  9.         firstspeech = [[Your life.. may end up in a high place]];
  10.         secondspeech = [[ ____]];
  11.         thirdspeech = [[Show me your resolve.]];
  12.         fourthspeech = [[This is just the beginning____ it might not look too good for you won't it now?.]];
  13.         fifthspeech = [[I was sure I made that decently fast._ ]];
  14.     };
  15.     second = {
  16.         firstspeech = [[I slacked around too much, it's time to end.. this ]];
  17.         secondspeech = [[Do you feel your demise!?____]];
  18.         thirdspeech = [[Could it get worse?]];
  19.         fourthspeech = [[Struggling? I still have 200 moves left.]];
  20.         fifthspeech = [[I haven't started combining my attacks yet.]];
  21.         sixthspeech = [[Can you really survive this one?]];
  22.         seventhspeech = [[That was alright. But my strongest attacks would be nothing compared to that.]]
  23.         -- the next speeches will be manually inputed for now
  24.     };
  25.     third = {
  26.  
  27.     };
  28.     fourth = {
  29.  
  30.     };
  31.     fifth = {
  32.  
  33.     };
  34. }
  35. local maxhealth = 100
  36. local bosshealth = 100
  37. for _, v in pairs(script.Parent:GetChildren()) do
  38.     if string.match(v.Name:lower(), 'template') then
  39.         v.Visible = false
  40.     end
  41. end
  42.  
  43. local timestopped = false
  44. local tick = os.time
  45. local tweens = {}
  46. local realtweenservice = game:GetService('TweenService')
  47. local start = tick()
  48. local plr = game:GetService('Players').LocalPlayer
  49. local leaderstats = plr:WaitForChild('leaderstats')
  50. local deaths = leaderstats:WaitForChild('deaths')
  51. local rs = game:GetService('ReplicatedStorage')
  52. local collisionservice = require(rs:WaitForChild('GuiCollisionService'))
  53. local dragservice = require(rs:WaitForChild('DraggableObject'))
  54. local mouse = plr:GetMouse()
  55. local tweenservice = game:GetService('TweenService')
  56. local tweenservice = {}
  57. function tweenservice:Create(...) -- by simply tampering with tweenservice functions we can record them too
  58.     local tween = realtweenservice:Create(...)
  59.     local insert = {}
  60.     insert.tween = tween
  61.     insert.waspaused = false
  62.     table.insert(tweens, insert)
  63.     tween.Completed:Once(function() -- could this parameter be expensive?
  64.         local find = table.find(tweens, insert)
  65.         if find then
  66.             table.remove(tweens, find)
  67.         end
  68.     end)
  69.     return tween
  70. end
  71. local uis = game:GetService('UserInputService')
  72. local remote = rs:WaitForChild('all')
  73. local isStudio = game:GetService('RunService'):IsStudio()
  74.  
  75. local background = script.Parent.Background
  76. local border = script.Parent.Border
  77. local cursor = script.Parent.cursor
  78. local bordervisual = script.Parent.BorderVisual
  79. local dialogue = script.Parent.Dialogue
  80. local phase = script.Parent.Phase
  81.  
  82. local rswait = function(x: 'wait time')
  83.     local z = tick()
  84.     repeat game:GetService('RunService').RenderStepped:Wait() until tick()>=z+x
  85. end
  86.  
  87. local group = collisionservice.createCollisionGroup()
  88. local godmode = false
  89. local ultrainstinct = false
  90.  
  91. group:setZIndexHierarchy(true)
  92. group:addCollider(border, true)
  93. group:addCollider(cursor, true)
  94. uis.MouseIconEnabled = false
  95.  
  96. local lastposition = nil
  97. local lastpositions = {}
  98. local v2 = Vector2.new
  99. local abs = math.abs
  100. local oldmouseaxis = v2(0, 0)
  101. local cursorcanmove = true
  102.  
  103. local function randomletter(amount)
  104.     local str = ''
  105.     for i = 1, amount, 1 do
  106.         str = str.. string.char(97+math.random(0,25))
  107.     end
  108.     return str
  109. end
  110. local function randomnumber(digits)
  111.     local num = ''
  112.     for i = 1, digits, 1 do
  113.         num = num .. math.random(1, 10)
  114.     end
  115.     return num
  116. end
  117.  
  118. local function writeText(text, charname)
  119.     local basetext = charname or '???: ' -- if charname then charname else '???:'
  120.     for i = 1, string.len(text), 1 do
  121.  
  122.         local letter = string.sub(text, i, i)
  123.         if letter~='_' then
  124.             basetext = basetext.. letter
  125.             local soundclone = workspace:WaitForChild('sanstalk'):Clone()
  126.             soundclone.Parent = workspace
  127.             soundclone:Play()
  128.             game:GetService('Debris'):AddItem(soundclone, 1.1)
  129.             dialogue.Text = basetext
  130.         end
  131.         if letter == '.' or letter == '_' then
  132.             for z = 1,15,1 do
  133.                 game:GetService('RunService').RenderStepped:Wait()
  134.             end
  135.         else
  136.             game:GetService('RunService').RenderStepped:Wait()
  137.             game:GetService('RunService').RenderStepped:Wait()
  138.             game:GetService('RunService').RenderStepped:Wait()
  139.         end
  140.     end
  141. end
  142.  
  143. local function simulatehit(position, targethit) -- check if the cursor will still collide in this position
  144.     local viewport = workspace.CurrentCamera.ViewportSize
  145.     local check = cursor:Clone()
  146.     check.Name='CURSORCHECK'
  147.     check.Transparency = 1
  148.     check.Position = UDim2.new(position.X/viewport.X-(check.Size.X.Scale/2), 0, position.Y/viewport.Y+(check.Size.Y.Scale/2), 0)
  149.     check.Parent = script.Parent
  150.  
  151.     local boolvalue = collisionservice.isColliding(check, targethit) or collisionservice.isInCore(targethit, check)
  152.     check:Destroy()
  153.     return boolvalue
  154.     --[[
  155.     local index = group:addCollider(check, true)
  156.     local boolvalue = collisionservice.isc
  157.     task.delay(0.1, function()
  158.         group:removeCollider(index)
  159.         check:Destroy()
  160.     end)
  161.     ]]
  162. end
  163. local function cursordistancefrommouse()
  164.     local viewport = workspace.CurrentCamera.ViewportSize
  165.     local vector2distance = v2(abs(cursor.Position.X.Scale-mouse.X/viewport.X), abs(cursor.Position.Y.Scale-mouse.Y/viewport.Y))
  166.  
  167.     return vector2distance, vector2distance.Magnitude
  168. end
  169.  
  170. local function shakecursor(shakes)
  171.     cursorcanmove = false
  172.     local cursorposition = cursor.Position
  173.     local oldcolor = cursor.BackgroundColor3
  174.     cursor.BackgroundColor3 = Color3.fromRGB(138, 0, 10)
  175.     for i = 1, shakes*2, 1 do
  176.         local random = Random.new()
  177.         cursor.Position = cursorposition + UDim2.new(random:NextNumber(-0.05, 0.05), 0, random:NextNumber(-0.065, 0.065), 0)
  178.         if i%2 == 0 then -- even number
  179.             cursor.Rotation = 10
  180.         else -- odd number
  181.             cursor.Rotation = -10
  182.         end
  183.         game:GetService('RunService').RenderStepped:Wait()
  184.     end
  185.     cursor.BackgroundColor3 = oldcolor
  186.     cursor.Rotation = 0
  187.     cursorcanmove = true
  188. end
  189.  
  190.  
  191. local rendersteppedconnect;rendersteppedconnect = game:GetService('RunService').RenderStepped:Connect(function()
  192.     local viewport = workspace.CurrentCamera.ViewportSize
  193.     local targetposition = UDim2.new(mouse.X/viewport.X-(cursor.Size.X.Scale/2), 0, mouse.Y/viewport.Y+(cursor.Size.Y.Scale/2), 0)
  194.     if not lastposition then
  195.         lastposition = targetposition
  196.         oldmouseaxis = v2(mouse.X, mouse.Y)
  197.     end
  198.     local function borderadjust()
  199.         -- repeat cursor.Position = cursor.Position - UDim2.new(0, 0, 0.01, 0) until cursor.Position.Y.Scale<=border.Position.Y.Scale-border.Size.Y.Scale/2
  200.         if not simulatehit(Vector2.new(mouse.X, mouse.Y), border) then
  201.             local vector2, distance = cursordistancefrommouse()
  202.             --[[
  203.             if targetposition.Y.Scale<=border.Position.Y.Scale+border.Size.Y.Scale/2 then
  204.                 cursor.Position = lastposition
  205.                 return
  206.             else
  207.                 cursor.Position = targetposition
  208.             warn('free')
  209.             end
  210.             ]]
  211.             cursor.Position = targetposition
  212.         else
  213.             cursor.Position = UDim2.new(targetposition.X.Scale, 0, bordervisual.Position.Y.Scale+bordervisual.Size.Y.Scale/1.05, 0)
  214.             return true
  215.         end
  216.     end
  217.     if godmode == false then
  218.         for i, v in pairs(script.Parent:GetChildren()) do
  219.             if v.Name == 'dangerframe' then
  220.                 if collisionservice.isColliding(cursor, v) then
  221.                     if ultrainstinct == true then
  222.                         local random = math.random(1,3) -- left, right and back
  223.                         if random == 1 then
  224.                             cursor.Position = v.Position + UDim2.new(v.Size.X.Scale, 0, 0, 0)
  225.                         elseif random == 2 then
  226.                             cursor.Position = v.Position + UDim2.new(-v.Size.X.Scale, 0, 0, 0)
  227.                         else
  228.                             cursor.Position = v.Position + UDim2.new(0, 0, v.Size.Y.Scale, 0)
  229.                             -- cursor.Position = lastpositions[1]
  230.                         end
  231.                         return
  232.                     else
  233.                         game:GetService('StarterGui'):SetCore('SendNotification', {
  234.                             Title = ':(';
  235.                             Text = "You died. Automatically respawned";
  236.                         })
  237.                         rendersteppedconnect:Disconnect()
  238.                         remote:FireServer('dead')
  239.                         _G.restart()
  240.                         return
  241.                     end
  242.                 end
  243.             end
  244.         end
  245.     end
  246.     if collisionservice.isColliding(cursor, border) or collisionservice.isInCore(border, cursor) then
  247.         local a = borderadjust()
  248.         if a then return end
  249.     else
  250.         if cursorcanmove == true then
  251.             local a = borderadjust()
  252.             if a then return end
  253.  
  254.             if not collisionservice.isInCore(border, cursor) then
  255.                 cursor.Position = targetposition
  256.             end
  257.         end
  258.  
  259.     end
  260.  
  261.     lastposition = targetposition
  262.     oldmouseaxis = v2(mouse.X, mouse.Y)
  263.     table.insert(lastpositions, lastposition)
  264.     if #lastpositions>9 then
  265.         table.remove(lastpositions, 1)
  266.     end
  267. end)
  268. local function createdangerblock(debristime)
  269.     local dangerframe = script.Parent.dangerframeblocktemplate:Clone()
  270.     dangerframe.Parent = script.Parent
  271.     dangerframe.Position = UDim2.new(2,0,2,0)
  272.     dangerframe.Visible = true
  273.     dangerframe.Name = 'dangerframe'
  274.     game:GetService('Debris'):AddItem(dangerframe, debristime)
  275.     return dangerframe
  276. end
  277. local function dealdamage(damage)
  278.     bosshealth-=damage
  279.     tweenservice:Create(bordervisual.Fill, TweenInfo.new(0.3, Enum.EasingStyle.Linear), {
  280.         Size = UDim2.new(bosshealth/maxhealth, 0, 1, 0)
  281.     }):Play()
  282.  
  283. end
  284. local function tallLeftpillar(settingsarray)
  285.     local offset = -0.2 -- -0.2 is leftside of the screen, 1.1 is righjtside
  286.     local endingpoint = 1.1
  287.     local random = Random.new()
  288.     local highpillar = createdangerblock(6)
  289.     local lowpillar = createdangerblock(6)
  290.     local hole = random:NextNumber(0.12+border.Size.Y.Scale, 0.9)
  291.     local gap = random:NextNumber(0.2, 0.3)
  292.     local speed = 1.8
  293.     if settingsarray then
  294.         speed = settingsarray.speed or speed
  295.         gap = settingsarray.gap or gap
  296.         hole = settingsarray.hole or hole
  297.     end
  298.     highpillar.Size = UDim2.new(0.07, 0, 1, 0)
  299.     lowpillar.Size = UDim2.new(0.07, 0, 1, 0)
  300.     highpillar.Position = UDim2.new(offset, 0, hole - (highpillar.Size.Y.Scale+gap/2), 0)
  301.     lowpillar.Position = UDim2.new(offset, 0, highpillar.Position.Y.Scale + (lowpillar.Size.Y.Scale+gap/2), 0)
  302.     tweenservice:Create(highpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  303.         Position = UDim2.new(endingpoint, 0, highpillar.Position.Y.Scale, 0)
  304.     }):Play()
  305.     local a = tweenservice:Create(lowpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  306.         Position = UDim2.new(endingpoint, 0, lowpillar.Position.Y.Scale, 0)
  307.     })
  308.     a:Play()
  309. end
  310. local function tallRightpillar(settingsarray)
  311.     local offset = 1.1 -- -0.2 is leftside of the screen, 1.1 is righjtside
  312.     local endingpoint = -0.2
  313.     local random = Random.new()
  314.     local highpillar = createdangerblock(6)
  315.     local lowpillar = createdangerblock(6)
  316.     local hole = random:NextNumber(0.12+border.Size.Y.Scale, 0.9)
  317.     local gap = random:NextNumber(0.2, 0.3)
  318.     local speed = 1.8
  319.     if settingsarray then
  320.         speed = settingsarray.speed or speed
  321.         gap = settingsarray.gap or gap
  322.         hole = settingsarray.hole or hole
  323.     end
  324.     highpillar.Size = UDim2.new(0.07, 0, 1, 0)
  325.     lowpillar.Size = UDim2.new(0.07, 0, 1, 0)
  326.     highpillar.Position = UDim2.new(offset, 0, hole - (highpillar.Size.Y.Scale+gap/2), 0)
  327.     lowpillar.Position = UDim2.new(offset, 0, highpillar.Position.Y.Scale + (lowpillar.Size.Y.Scale+gap/2), 0)
  328.     tweenservice:Create(highpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  329.         Position = UDim2.new(endingpoint, 0, highpillar.Position.Y.Scale, 0)
  330.     }):Play()
  331.     local a = tweenservice:Create(lowpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  332.         Position = UDim2.new(endingpoint, 0, lowpillar.Position.Y.Scale, 0)
  333.     })
  334.     a:Play()
  335. end
  336. local function tallCeilingpillar(settingsarray)
  337.     local random = Random.new()
  338.     local leftpillar = createdangerblock(6)
  339.     local rightpillar = createdangerblock(6)
  340.     local hole = random:NextNumber(0.1, 0.9)
  341.     local gap = random:NextNumber(0.18, 0.25)
  342.     local speed = 1.8
  343.     if settingsarray then
  344.         speed = settingsarray.speed or speed
  345.         gap = settingsarray.gap or gap
  346.         hole = settingsarray.hole or hole
  347.     end
  348.     leftpillar.Size = UDim2.new(1, 0, 0.1, 0)
  349.     rightpillar.Size = UDim2.new(1, 0, 0.1, 0)
  350.     leftpillar.Position = UDim2.new(hole - (leftpillar.Size.X.Scale + gap/2), 0, -1.1, 0)
  351.     rightpillar.Position = UDim2.new(leftpillar.Position.X.Scale + (rightpillar.Size.X.Scale+gap/2), 0, -1.1, 0)
  352.     tweenservice:Create(leftpillar, TweenInfo.new(speed, Enum.EasingStyle.Linear), {
  353.         Position = UDim2.new(leftpillar.Position.X.Scale, 0, 1.1, 0)
  354.     }):Play()
  355.     local a = tweenservice:Create(rightpillar, TweenInfo.new(speed, Enum.EasingStyle.Linear), {
  356.         Position = UDim2.new(rightpillar.Position.X.Scale, 0, 1.1, 0)
  357.     })
  358.     a:Play()
  359. end
  360.  
  361. local defaultcolor = cursor.ImageColor3
  362. local timestopcon = nil
  363. uis.InputBegan:Connect(function(inp, gps)
  364.     if gps then return end
  365.     if plr.UserId == game.CreatorId or isStudio then
  366.         if inp.KeyCode == Enum.KeyCode.C then
  367.             godmode = not godmode
  368.             if godmode == true then
  369.                 cursor.ImageColor3 = Color3.fromRGB(117, 255, 30)
  370.             else
  371.                 cursor.ImageColor3 = defaultcolor
  372.             end
  373.         elseif inp.KeyCode == Enum.KeyCode.V then
  374.             ultrainstinct = not ultrainstinct
  375.         elseif inp.KeyCode == Enum.KeyCode.B then
  376.             timestopped = not timestopped
  377.             if timestopped == true then
  378.                 timestopcon = game:GetService('RunService').Heartbeat:Connect(function()
  379.                     for i, v in pairs(tweens) do
  380.                         if v.waspaused == false then
  381.                             v.waspaused = true
  382.                             v.tween:Pause()
  383.                         end
  384.                     end
  385.                 end)
  386.             else
  387.                 if timestopcon then
  388.                     timestopcon:Disconnect()
  389.                     for i, v in pairs(tweens) do
  390.                         if v.waspaused==true then
  391.                             v.waspaused = false
  392.                             v.tween:Play()
  393.                         end
  394.                     end
  395.                 end
  396.                
  397.             end
  398.         end
  399.        
  400.     end
  401. end)
  402.  
  403. task.spawn(function()
  404.     repeat game:GetService('RunService').RenderStepped:Wait() until (tick()-_G.z)>=phases.first.start
  405.     --
  406.     local firstphase = tick()
  407.     warn('first phase')
  408.     local zds = math.random(1,2)
  409.     if zds == 1 then
  410.         for i = 0.3, 0.5, 0.1 do
  411.             tallCeilingpillar({
  412.                 gap = 0.5;
  413.                 hole = i;
  414.                 speed = 1;
  415.             })
  416.             task.wait(0.08)
  417.         end
  418.         for i = 0.5, 0.3, -0.1 do
  419.             tallCeilingpillar({
  420.                 gap = 0.5;
  421.                 hole = i;
  422.                 speed = 1;
  423.             })
  424.             task.wait(0.08)
  425.         end
  426.     else
  427.         for i = 0.5, 0.3, -0.1 do
  428.             tallCeilingpillar({
  429.                 gap = 0.5;
  430.                 hole = i;
  431.                 speed = 1;
  432.             })
  433.             task.wait(0.08)
  434.         end
  435.         for i = 0.3, 0.5, 0.1 do
  436.             tallCeilingpillar({
  437.                 gap = 0.5;
  438.                 hole = i;
  439.                 speed = 1;
  440.             })
  441.             task.wait(0.08)
  442.         end
  443.     end
  444.     writeText(phases.first.firstspeech)
  445.     task.wait(0.5)
  446.     writeText(phases.first.thirdspeech)
  447.     for i = 1, 8, 1 do
  448.         local random = Random.new()
  449.         local dangerblock = createdangerblock(3)
  450.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  451.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  452.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1.5), Enum.EasingStyle.Linear), {
  453.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.2 - dangerblock.Size.Y.Scale, 0)
  454.         }):Play()
  455.         game:GetService('RunService').RenderStepped:Wait()
  456.     end
  457.     task.wait(1.2)
  458.     for i = 1, 10, 1 do
  459.         local random = Random.new()
  460.         local dangerblock = createdangerblock(3)
  461.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  462.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  463.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1.35), Enum.EasingStyle.Linear), {
  464.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.05 - dangerblock.Size.Y.Scale, 0)
  465.         }):Play()
  466.         game:GetService('RunService').RenderStepped:Wait()
  467.     end
  468.  
  469.     task.wait(1.2)
  470.     for i = 1, 10, 1 do
  471.         local random = Random.new()
  472.         local dangerblock = createdangerblock(3)
  473.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  474.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  475.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1), Enum.EasingStyle.Linear), {
  476.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.05 - dangerblock.Size.Y.Scale, 0)
  477.         }):Play()
  478.         task.wait(0.1)
  479.     end
  480.  
  481.     task.wait(1.5)
  482.     writeText(phases.first.fourthspeech)
  483.     for i = 1, 12, 1 do
  484.         local random = Random.new()
  485.         local dangerblock = createdangerblock(3)
  486.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0, -0.2, 0)
  487.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  488.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.6, 1.1), Enum.EasingStyle.Linear), {
  489.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, 1.1, 0)
  490.         }):Play()
  491.         game:GetService('RunService').RenderStepped:Wait()
  492.     end
  493.     task.wait(1.7)
  494.     writeText(phases.first.fifthspeech)
  495.     for i = 1, 60, 1 do
  496.         game:GetService('RunService').RenderStepped:Wait()
  497.         task.spawn(function()
  498.             phase.Text = 'Phase: '.. randomnumber(2)
  499.             writeText(randomletter(4), randomletter(3).. ': ')
  500.         end)
  501.     end
  502.     dealdamage(3)
  503.     dialogue.TextColor3 = Color3.fromRGB(239, 182, 19)
  504.     dialogue.TextStrokeTransparency = 1
  505.     writeText(phases.second.firstspeech)
  506.     phase.Text = 'Phase: 2'
  507.     phase.TextColor3 = Color3.fromRGB(239, 182, 19)
  508.     task.wait(0.5)
  509.     dialogue.TextColor3 = Color3.fromRGB(232, 56, 22)
  510.     phase.TextColor3 = Color3.fromRGB(232, 56, 22)
  511.     dialogue.Font = Enum.Font.Creepster
  512.  
  513.     task.spawn(function()
  514.         shakecursor(50)
  515.     end)
  516.     writeText(phases.second.secondspeech)
  517.     task.wait(2)
  518.     writeText(phases.second.thirdspeech)
  519.     for i = 1, 30, 1 do
  520.         local random = Random.new()
  521.         local dangerblock = createdangerblock(4)
  522.         dangerblock.Position = UDim2.new(cursor.Position.X,0, -0.2, 0)
  523.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.8, 1.2), Enum.EasingStyle.Linear), {
  524.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, 1.1, 0)
  525.         }):Play()
  526.  
  527.         task.wait(0.1)
  528.     end
  529.  
  530.     --
  531.     task.wait(0.3)
  532.     for i = 1, 15, 1 do
  533.         local random = Random.new()
  534.         local dangerblock = createdangerblock(3)
  535.         local number = if math.random(1,2)==1 then -1 else 1
  536.         dangerblock.Position = UDim2.new(number,0, cursor.Position.Y.Scale,0)
  537.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9,1.1), Enum.EasingStyle.Linear), {
  538.             Position = UDim2.new(if number==1 then -1 else 1, 0, dangerblock.Position.Y.Scale, 0)
  539.         }):Play()
  540.  
  541.         task.wait(0.1)
  542.     end
  543.  
  544.     task.wait(0.6)
  545.     -- create a pillar with a hole in the middle --
  546.  
  547.     writeText(phases.second.fourthspeech)
  548.    
  549.     for i = 1, 10, 1 do
  550.         tallCeilingpillar()
  551.         task.wait(1.1)
  552.     end
  553.     task.wait(0.5)
  554.  
  555.     for i = 1, 10, 1 do
  556.         tallLeftpillar()
  557.         task.wait(0.8)
  558.     end
  559.     for i = 1, 10, 1 do
  560.         tallRightpillar()
  561.         task.wait(0.8)
  562.     end
  563.     --
  564.     writeText(phases.second.fifthspeech)
  565.    
  566.     task.spawn(function()
  567.        
  568.         tallCeilingpillar({
  569.             gap = 0.35;
  570.             hole = 0.8;
  571.         })
  572.         task.wait(1)
  573.         tallLeftpillar()
  574.         task.wait(1.3)
  575.         tallCeilingpillar({
  576.             gap = 0.35;
  577.             hole = 0.2;
  578.         })
  579.         tallRightpillar()
  580.         task.wait(1.5)
  581.         for i = 1, 3, 1 do
  582.             tallCeilingpillar({
  583.                 speed = 1.05; -- top pillar is x times faster
  584.                 hole = 0.5;
  585.                 gap = 0.4;
  586.             })
  587.             task.wait(1.5)
  588.             tallLeftpillar()
  589.             task.wait(0.9)
  590.             tallRightpillar()
  591.             task.wait(1.5)
  592.         end
  593.         --
  594.         writeText(phases.second.sixthspeech)
  595.         for i = 0.3, 1, 0.1 do
  596.             tallRightpillar({
  597.                 gap = 0.6;
  598.                 hole = i;
  599.             })
  600.             task.wait(0.1)
  601.         end
  602.         for i = 1, 0.3, -0.1 do
  603.             tallRightpillar({
  604.                 gap = 0.6;
  605.                 hole = i;
  606.             })
  607.             task.wait(0.1)
  608.         end
  609.         for i = 0.3, 1, 0.1 do
  610.             tallRightpillar({
  611.                 gap = 0.6;
  612.                 hole = i;
  613.             })
  614.             task.wait(0.1)
  615.         end
  616.        
  617.         writeText(phases.second.seventhspeech)
  618.         local bigblock = createdangerblock(8)
  619.         bigblock.Size = UDim2.new(0.3, 0, 1.1, 0)
  620.         bigblock.Position = UDim2.new(1 + bigblock.Size.X.Scale, 0, 0, 0)
  621.        
  622.         local bigblocktween = tweenservice:Create(bigblock, TweenInfo.new(1, Enum.EasingStyle.Linear), {
  623.             Position = UDim2.new(0.1, 0, 0, 0)
  624.         })
  625.         bigblocktween:Play()
  626.         bigblocktween.Completed:Wait()
  627.         task.wait(1)
  628.         bigblocktween = tweenservice:Create(bigblock, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  629.             Position = UDim2.new(1+bigblock.Size.X.Scale, 0, 0, 0)
  630.         })
  631.         bigblocktween:Play()
  632.         bigblocktween.Completed:Wait()
  633.         if deaths.Value>=75 then
  634.             writeText(`With {deaths.Value} deaths I guess its reasonable you got pass phase 2__ `)
  635.         else
  636.             writeText('Seriously? Are you human? ')
  637.         end
  638.        
  639.     end)
  640.     --[[
  641.     repeat game:GetService('RunService').RenderStepped:Wait()
  642.         -- perform actions
  643.        
  644.     until (tick()-firstphase)>=phases.first.duration
  645.     ]]
  646.  
  647.  
  648. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement