Advertisement
zqozr

hidden devs application 2

Aug 18th, 2023
966
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.58 KB | None | 0 0
  1.  
  2.  
  3. --[[
  4. ok man look, you people who approve applications of programming told me to give you a minimum of 200 lines script. Then told me to add more comments, okay so ill add comments for this script until line 300, happy? This is one of the source codes for the game "zq's sansbox"(im changing it to untitled sansbox in the future) as you can see from the previous applications i posted this same script, and this script has more lines than the previous one so this should show i worked on the script.
  5.  
  6.  
  7. this script is one of the source code of a script in zq's sansbox. Please do not redistribute.
  8. This is a solo project I was working on and thought I could post this to the applications.
  9. - zqozr_II
  10. ]]
  11. local phases = { -- phases and details for phrases for what'll the boss say. (later on i just did it manually so ill deprecate this soon)
  12.     first = {
  13.         start = 2; -- starts attacking after x seconds
  14.         firstspeech = [[Your life.. may end up in a high place]];
  15.         secondspeech = [[ ____]];
  16.         thirdspeech = [[Show me your resolve.]];
  17.         fourthspeech = [[This is just the beginning____ it might not look too good for you won't it now?.]];
  18.         fifthspeech = [[I was sure I made that decently fast._ ]];
  19.     };
  20.     second = {
  21.         firstspeech = [[I slacked around too much, it's time to end.. this ]];
  22.         secondspeech = [[Do you feel your demise!?____]];
  23.         thirdspeech = [[Could it get worse?]];
  24.         fourthspeech = [[Struggling? I still have 200 moves left.]];
  25.         fifthspeech = [[I haven't started combining my attacks yet.]];
  26.         sixthspeech = [[Can you really survive this one?]];
  27.         seventhspeech = [[That was alright. But my strongest attacks would be nothing compared to that.]]
  28.         -- the next speeches will be manually inputed for now
  29.     };
  30.     third = {
  31.  
  32.     };
  33.     fourth = {
  34.  
  35.     };
  36.     fifth = {
  37.  
  38.     };
  39. }
  40. local maxhealth = 100
  41. local bosshealth = 100
  42. for _, v in pairs(script.Parent:GetChildren()) do -- i placed templates for the attacks, since I want them to be visible in studio I have to set their visibility in game.
  43.     if string.match(v.Name:lower(), 'template') then
  44.         v.Visible = false
  45.     end
  46. end
  47.  
  48. local timestopped = false -- a lot of variables will start from this line, yes I worked on misc abilities instead of giving the boss more phases
  49. local fpsunlockerDisabled = true
  50. local infinity = false -- an anime ability from gojo satoru "infinity" from the anime 'jujutsu kaisen'.
  51. local spectateenabled = true
  52. local rawtick = tick
  53. local tick = os.time
  54. local tweens = {}
  55. local realtweenservice = game:GetService('TweenService')
  56. local start = tick()
  57. local plr = game:GetService('Players').LocalPlayer
  58. local leaderstats = plr:WaitForChild('leaderstats')
  59. local deaths = leaderstats:WaitForChild('deaths')
  60. local rs = game:GetService('ReplicatedStorage')
  61. local collisionservice = require(rs:WaitForChild('GuiCollisionService'))
  62. local dragservice = require(rs:WaitForChild('DraggableObject'))
  63. local mouse = plr:GetMouse()
  64. local tweenservice = game:GetService('TweenService')
  65. local tweenservice = {}
  66. function tweenservice:Create(...) -- by simply tampering with tweenservice functions we can record them, and easily tampering with tweenservice functions without having to change the other 800 lines of the script. This helps with the "infinity" ability and the "timestop" ability.
  67.     local tween = realtweenservice:Create(...)
  68.     local insert = {}
  69.     local object = ({...})[1]
  70.     local tweeninfo = ({...})[2]
  71.     local propertytable = ({...})[3]
  72.    
  73.     insert.tween = tween
  74.     insert.waspaused = false
  75.     insert.frame = object
  76.     insert.tweeninfo = tweeninfo
  77.     insert.propertytable = propertytable
  78.     insert.tweencreatedon = tick()
  79.    
  80.     table.insert(tweens, insert)
  81.     tween.Completed:Once(function() -- could this parameter be expensive?
  82.         local find = table.find(tweens, insert)
  83.         if find then
  84.             table.remove(tweens, find)
  85.         end
  86.     end)
  87.     return tween
  88. end
  89. local uis = game:GetService('UserInputService')
  90. local remote = rs:WaitForChild('all')
  91. local isStudio = game:GetService('RunService'):IsStudio() -- made this variable so that if we're in studio then enable all admin abilities for everyone
  92.  
  93. local background = script.Parent.Background
  94. local border = script.Parent.Border
  95. local cursor = script.Parent.cursor
  96. local bordervisual = script.Parent.BorderVisual
  97. local dialogue = script.Parent.Dialogue
  98. local phase = script.Parent.Phase
  99. local infinityhitbox = script.Parent.infinityhitbox
  100.  
  101. local rswait = function(x: 'wait time', stoppable: 'this can yield if time is stopped?') -- helps with timestop, and is almost as efficient as task.wait
  102.     if x>0 then
  103.         --[[
  104.     local z = rawtick()
  105.     repeat game:GetService('RunService').RenderStepped:Wait() until rawtick()>=z+x
  106.     ]]
  107.         local delta = 0
  108.         repeat if stoppable and timestopped==true then
  109.                 game:GetService('RunService').RenderStepped:Wait()
  110.             else
  111.                 delta+=game:GetService('RunService').RenderStepped:Wait()
  112.             end
  113.         until delta>=x
  114.     else
  115.         if stoppable and timestopped then
  116.             repeat game:GetService('RunService').RenderStepped:Wait() until timestopped == false
  117.            
  118.         else
  119.             game:GetService('RunService').RenderStepped:Wait()
  120.         end
  121.     end
  122. end
  123.  
  124. local group = collisionservice.createCollisionGroup()
  125. local godmode = false
  126. local ultrainstinct = false
  127.  
  128. group:setZIndexHierarchy(true)
  129. group:addCollider(border, true)
  130. group:addCollider(cursor, true)
  131. uis.MouseIconEnabled = false
  132.  
  133. local lastposition = nil
  134. local lastpositions = {}
  135. local v2 = Vector2.new
  136. local abs = math.abs
  137. local oldmouseaxis = v2(0, 0)
  138. local cursorcanmove = true
  139.  
  140. local function randomletter(amount)
  141.     local str = ''
  142.     for i = 1, amount, 1 do
  143.         str = str.. string.char(97+math.random(0,25))
  144.     end
  145.     return str
  146. end
  147. local function randomnumber(digits)
  148.     local num = ''
  149.     for i = 1, digits, 1 do
  150.         num = num .. math.random(1, 10)
  151.     end
  152.     return num
  153. end
  154.  
  155. local function writeText(text, charname)
  156.     local basetext = charname or '???: ' -- if charname then charname else '???:'
  157.     for i = 1, string.len(text), 1 do
  158.  
  159.         local letter = string.sub(text, i, i)
  160.         if letter~='_' then
  161.             basetext = basetext.. letter
  162.             local soundclone = workspace:WaitForChild('sanstalk'):Clone()
  163.             soundclone.Parent = workspace
  164.             soundclone:Play()
  165.             game:GetService('Debris'):AddItem(soundclone, 1.1)
  166.             dialogue.Text = basetext
  167.         end
  168.         if letter == '.' or letter == '_' then
  169.             --[[
  170.             for z = 1,15,1 do
  171.                 game:GetService('RunService').RenderStepped:Wait()
  172.             end
  173.             ]]
  174.             rswait(0.23)
  175.         else
  176.             --[[
  177.             for i = 1, 3, 1 do
  178.                 game:GetService('RunService').RenderStepped:Wait()
  179.                 game:GetService('RunService').RenderStepped:Wait()
  180.                 game:GetService('RunService').RenderStepped:Wait()
  181.             end
  182.             ]]
  183.             rswait(0.06)
  184.         end
  185.     end
  186. end
  187.  
  188. local function simulatehit(position, targethit) -- check if the cursor will still collide in this position
  189.     local viewport = workspace.CurrentCamera.ViewportSize
  190.     local check = cursor:Clone()
  191.     check.Name='CURSORCHECK'
  192.     check.Transparency = 1
  193.     check.Position = UDim2.new(position.X/viewport.X-(check.Size.X.Scale/2), 0, position.Y/viewport.Y+(check.Size.Y.Scale/2), 0)
  194.     check.Parent = script.Parent
  195.  
  196.     local boolvalue = collisionservice.isColliding(check, targethit) or (collisionservice.isInCore(targethit, check) or collisionservice.isInCore(check, targethit))
  197.     check:Destroy()
  198.     return boolvalue
  199.     --[[
  200.     local index = group:addCollider(check, true)
  201.     local boolvalue = collisionservice.isc
  202.     task.delay(0.1, function()
  203.         group:removeCollider(index)
  204.         check:Destroy()
  205.     end)
  206.     ]]
  207. end
  208. local function cursordistancefrommouse() -- i made this function so that in the future I can make the cursor heart ui to tween position to my mouse. Since the cursor gui follows the mouse it can teleport if the mouse suddenly travels a large distance by exiting the roblox window and placing your mouse elsewhere
  209.     local viewport = workspace.CurrentCamera.ViewportSize
  210.     local vector2distance = v2(abs(cursor.Position.X.Scale-mouse.X/viewport.X), abs(cursor.Position.Y.Scale-mouse.Y/viewport.Y))
  211.  
  212.     return vector2distance, vector2distance.Magnitude
  213. end
  214.  
  215. local function shakecursor(shakes)
  216.     cursorcanmove = false
  217.     local cursorposition = cursor.Position
  218.     local oldcolor = cursor.BackgroundColor3
  219.     cursor.BackgroundColor3 = Color3.fromRGB(138, 0, 10)
  220.     for i = 1, shakes*2, 1 do
  221.         local random = Random.new()
  222.         cursor.Position = cursorposition + UDim2.new(random:NextNumber(-0.05, 0.05), 0, random:NextNumber(-0.065, 0.065), 0)
  223.         if i%2 == 0 then -- even number
  224.             cursor.Rotation = 10
  225.         else -- odd number
  226.             cursor.Rotation = -10
  227.         end
  228.         game:GetService('RunService').RenderStepped:Wait()
  229.     end
  230.     cursor.BackgroundColor3 = oldcolor
  231.     cursor.Rotation = 0
  232.     cursorcanmove = true
  233. end
  234.  
  235. local function checkframerate() -- my simple, fast & easy way of checking framerate. It'll show how much times renderstepped got fired in just 1 second, average is 60 frames per second and they're using fps unlocker if it goes above 65.
  236.     local x = tick()
  237.     local x2 = 0
  238.     repeat x2+=1 game:GetService('RunService').RenderStepped:Wait() until (tick()-x)>=1
  239.     return x2
  240. end
  241. local rendersteppedconnect
  242. local function death()
  243.     game:GetService('StarterGui'):SetCore('SendNotification', {
  244.         Title = ':(';
  245.         Text = "You died. Automatically respawned";
  246.     })
  247.     rendersteppedconnect:Disconnect()
  248.     remote:FireServer('dead')
  249.     _G.restart()
  250. end
  251. local previous60frames = {} -- i was planning to use this for optimizing the spectating feature but ehhh nevermind, it was still the same since client fireservers a table with like a fifty to hundred kilobytes every second? I'm disappointed roblox struggles with sending that much oh well
  252. rendersteppedconnect = game:GetService('RunService').RenderStepped:Connect(function()
  253.     local viewport = workspace.CurrentCamera.ViewportSize
  254.     local targetposition = UDim2.new(mouse.X/viewport.X-(cursor.Size.X.Scale/2), 0, mouse.Y/viewport.Y+(cursor.Size.Y.Scale/2), 0)
  255.     if not lastposition then
  256.         lastposition = targetposition
  257.         oldmouseaxis = v2(mouse.X, mouse.Y)
  258.     end
  259.     local function borderadjust() -- this is just to prevent the cursor ui from following to mouse through the border.
  260.         -- 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
  261.         if not simulatehit(Vector2.new(mouse.X, mouse.Y), border) then
  262.             local vector2, distance = cursordistancefrommouse()
  263.             --[[
  264.             if targetposition.Y.Scale<=border.Position.Y.Scale+border.Size.Y.Scale/2 then
  265.                 cursor.Position = lastposition
  266.                 return
  267.             else
  268.                 cursor.Position = targetposition
  269.             warn('free')
  270.             end
  271.             ]]
  272.             cursor.Position = targetposition
  273.         else
  274.             cursor.Position = UDim2.new(targetposition.X.Scale, 0, bordervisual.Position.Y.Scale+bordervisual.Size.Y.Scale/1.05, 0)
  275.            
  276.             return true
  277.         end
  278.     end
  279.     if spectateenabled == true then
  280.         if rs.hosts:FindFirstChild(plr.Name) then
  281.             local input = {}
  282.             local function class(name, pos, size)
  283.                 local new = {}
  284.                 new[1] = name
  285.                 new[2] = pos
  286.                 new[3] = size or Vector3.new(0,0,0)
  287.                 table.insert(input, new)
  288.             end
  289.             for i, v in pairs(script.Parent:GetChildren()) do
  290.                 if v.Name == 'dangerframe' then
  291.                     class('dangerframe', v.Position, v.Size)
  292.                 elseif v.Name == 'cursor' then
  293.                     class('cursor', v.Position, v.Size)
  294.                 end
  295.             end
  296.             rs.hosts[plr.Name]:FireServer('spectateinfo', input) -- rs.hosts[plr.Name]:FireServer('spectateinfo', unpack(input)) -- simple spectate feature, i didn't optimize it and lazily placed everything in 1 go, the lag isn't that bad tho and since this is a local script lag won't affect your gameplay.
  297.         end
  298.     end
  299.     if godmode == false then
  300.         if infinity == true then
  301.             local collisions = {}
  302.             local noncollide = {}
  303.             for i, v in pairs(tweens) do
  304.                 if collisionservice.isColliding(infinityhitbox, v.frame) or collisionservice.isInCore(infinityhitbox, v.frame) then -- if the uis touch the hitbox of infinity and infinity is on, they are forced to stop.
  305.                     table.insert(collisions, v)
  306.                     if collisionservice.isColliding(cursor, v.frame) then
  307.                         death()
  308.                         return
  309.                     end
  310.                 else
  311.                     table.insert(noncollide, v)
  312.                 end
  313.             end
  314.             for i, v in pairs(noncollide) do
  315.                 if timestopped == false then
  316.                     if v.waspaused == true then
  317.                         v.waspaused = false
  318.                         v.tween:Play()
  319.                     end
  320.                 end
  321.             end
  322.             for i, v in pairs(collisions) do
  323.                 if timestopped == false then
  324.                     if v.waspaused == false then
  325.                         v.waspaused = true
  326.                         v.tween:Pause()
  327.                     end
  328.                 end
  329.             end
  330.            
  331.         else
  332.             for i, v in pairs(script.Parent:GetChildren()) do
  333.                 if v.Name == 'dangerframe' then
  334.                     if collisionservice.isColliding(cursor, v) then -- basically just teleport the cursor ui to some side of a ui so that it looks like it dodges it when ultrainstinct is activated
  335.                         if ultrainstinct == true then
  336.                             local random = math.random(1,3) -- left, right and back
  337.                             if random == 1 then
  338.                                 cursor.Position = v.Position + UDim2.new(v.Size.X.Scale, 0, 0, 0)
  339.                             elseif random == 2 then
  340.                                 cursor.Position = v.Position + UDim2.new(-v.Size.X.Scale, 0, 0, 0)
  341.                             else
  342.                                 cursor.Position = v.Position + UDim2.new(0, 0, v.Size.Y.Scale, 0)
  343.                                 -- cursor.Position = lastpositions[1]
  344.                             end
  345.                             return
  346.                         else
  347.                             death() -- we simply restart since we touched the 'dangerframe' that kills you when you touch it
  348.                             return
  349.                         end
  350.                     end
  351.                 end
  352.             end
  353.            
  354.         end
  355.        
  356.     end
  357.     if collisionservice.isColliding(cursor, border) or collisionservice.isInCore(border, cursor) then
  358.         local a = borderadjust()
  359.         if a then return end
  360.     else
  361.         if cursorcanmove == true then
  362.             local a = borderadjust()
  363.             if a then return end
  364.  
  365.             if not collisionservice.isInCore(border, cursor) then
  366.                 cursor.Position = targetposition
  367.             end
  368.         end
  369.  
  370.     end
  371.     --infinityhitbox.Position = cursor.Position + UDim2.new(infinityhitbox.Size.X.Scale/2, 0, infinityhitbox.Size.Y.Scale/2, 0)
  372.     lastposition = targetposition
  373.     oldmouseaxis = v2(mouse.X, mouse.Y)
  374.     table.insert(lastpositions, lastposition)
  375.     if #lastpositions>9 then
  376.         table.remove(lastpositions, 1)
  377.     end
  378. end)
  379. cursor:GetPropertyChangedSignal('Position'):Connect(function() -- make sure infinity hitbox will follow cursor ui everywhere
  380.     infinityhitbox.Position = cursor.Position - UDim2.new(infinityhitbox.Size.X.Scale/2, 0, infinityhitbox.Size.Y.Scale/2, 0)
  381. end)
  382. local function createdangerblock(debristime)
  383.     local dangerframe = script.Parent.dangerframeblocktemplate:Clone()
  384.     dangerframe.Parent = script.Parent
  385.     dangerframe.Position = UDim2.new(2,0,2,0)
  386.     dangerframe.Visible = true
  387.     dangerframe.Name = 'dangerframe'
  388.     game:GetService('Debris'):AddItem(dangerframe, debristime)
  389.     return dangerframe
  390. end
  391. local function dealdamage(damage)
  392.     bosshealth-=damage
  393.     tweenservice:Create(bordervisual.Fill, TweenInfo.new(0.3, Enum.EasingStyle.Linear), {
  394.         Size = UDim2.new(bosshealth/maxhealth, 0, 1, 0)
  395.     }):Play()
  396.  
  397. end
  398. local function tallLeftpillar(settingsarray)
  399.     local offset = -0.2 -- -0.2 is leftside of the screen, 1.1 is righjtside
  400.     local endingpoint = 1.1
  401.     local random = Random.new()
  402.     local highpillar = createdangerblock(6)
  403.     local lowpillar = createdangerblock(6)
  404.     local hole = random:NextNumber(0.12+border.Size.Y.Scale, 0.9)
  405.     local gap = random:NextNumber(0.2, 0.3)
  406.     local speed = 1.8
  407.     if settingsarray then
  408.         speed = settingsarray.speed or speed
  409.         gap = settingsarray.gap or gap
  410.         hole = settingsarray.hole or hole
  411.     end
  412.     highpillar.Size = UDim2.new(0.07, 0, 1, 0)
  413.     lowpillar.Size = UDim2.new(0.07, 0, 1, 0)
  414.     highpillar.Position = UDim2.new(offset, 0, hole - (highpillar.Size.Y.Scale+gap/2), 0)
  415.     lowpillar.Position = UDim2.new(offset, 0, highpillar.Position.Y.Scale + (lowpillar.Size.Y.Scale+gap/2), 0)
  416.     tweenservice:Create(highpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  417.         Position = UDim2.new(endingpoint, 0, highpillar.Position.Y.Scale, 0)
  418.     }):Play()
  419.     local a = tweenservice:Create(lowpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  420.         Position = UDim2.new(endingpoint, 0, lowpillar.Position.Y.Scale, 0)
  421.     })
  422.     a:Play()
  423. end
  424. local function tallRightpillar(settingsarray)
  425.     local offset = 1.1 -- -0.2 is leftside of the screen, 1.1 is righjtside
  426.     local endingpoint = -0.2
  427.     local random = Random.new()
  428.     local highpillar = createdangerblock(6)
  429.     local lowpillar = createdangerblock(6)
  430.     local hole = random:NextNumber(0.12+border.Size.Y.Scale, 0.9)
  431.     local gap = random:NextNumber(0.2, 0.3)
  432.     local speed = 1.8
  433.     if settingsarray then
  434.         speed = settingsarray.speed or speed
  435.         gap = settingsarray.gap or gap
  436.         hole = settingsarray.hole or hole
  437.     end
  438.     highpillar.Size = UDim2.new(0.07, 0, 1, 0)
  439.     lowpillar.Size = UDim2.new(0.07, 0, 1, 0)
  440.     highpillar.Position = UDim2.new(offset, 0, hole - (highpillar.Size.Y.Scale+gap/2), 0)
  441.     lowpillar.Position = UDim2.new(offset, 0, highpillar.Position.Y.Scale + (lowpillar.Size.Y.Scale+gap/2), 0)
  442.     tweenservice:Create(highpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  443.         Position = UDim2.new(endingpoint, 0, highpillar.Position.Y.Scale, 0)
  444.     }):Play()
  445.     local a = tweenservice:Create(lowpillar, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  446.         Position = UDim2.new(endingpoint, 0, lowpillar.Position.Y.Scale, 0)
  447.     })
  448.     a:Play()
  449. end
  450. local function tallCeilingpillar(settingsarray)
  451.     local random = Random.new()
  452.     local leftpillar = createdangerblock(6)
  453.     local rightpillar = createdangerblock(6)
  454.     local hole = random:NextNumber(0.1, 0.9)
  455.     local gap = random:NextNumber(0.18, 0.25)
  456.     local speed = 1.8
  457.     if settingsarray then
  458.         speed = settingsarray.speed or speed
  459.         gap = settingsarray.gap or gap
  460.         hole = settingsarray.hole or hole
  461.     end
  462.     leftpillar.Size = UDim2.new(1, 0, 0.1, 0)
  463.     rightpillar.Size = UDim2.new(1, 0, 0.1, 0)
  464.     leftpillar.Position = UDim2.new(hole - (leftpillar.Size.X.Scale + gap/2), 0, -1.1, 0)
  465.     rightpillar.Position = UDim2.new(leftpillar.Position.X.Scale + (rightpillar.Size.X.Scale+gap/2), 0, -1.1, 0)
  466.     tweenservice:Create(leftpillar, TweenInfo.new(speed, Enum.EasingStyle.Linear), {
  467.         Position = UDim2.new(leftpillar.Position.X.Scale, 0, 1.1, 0)
  468.     }):Play()
  469.     local a = tweenservice:Create(rightpillar, TweenInfo.new(speed, Enum.EasingStyle.Linear), {
  470.         Position = UDim2.new(rightpillar.Position.X.Scale, 0, 1.1, 0)
  471.     })
  472.     a:Play()
  473. end
  474.  
  475. local defaultcolor = cursor.ImageColor3
  476. local timestopcon = nil
  477. local function toggleinfinity()
  478.     infinity = not infinity
  479.     if infinity == false then
  480.         if timestopped == false then
  481.             for i, v in pairs(tweens) do
  482.                 if v.waspaused == true then
  483.                     v.waspaused = false
  484.                     v.tween:Play()
  485.                 end
  486.             end
  487.         end
  488.     end
  489. end
  490. uis.InputBegan:Connect(function(inp, gps)
  491.     if gps then return end
  492.     if inp.KeyCode == Enum.KeyCode.G and plr.i.Value == true then
  493.         toggleinfinity()
  494.         return
  495.     end
  496.     if plr.UserId == game.CreatorId or isStudio then
  497.         if inp.KeyCode == Enum.KeyCode.C then
  498.             godmode = not godmode
  499.             if godmode == true then
  500.                 cursor.ImageColor3 = Color3.fromRGB(117, 255, 30)
  501.             else
  502.                 cursor.ImageColor3 = defaultcolor
  503.             end
  504.         elseif inp.KeyCode == Enum.KeyCode.V then
  505.             ultrainstinct = not ultrainstinct
  506.         elseif inp.KeyCode == Enum.KeyCode.B then
  507.             timestopped = not timestopped
  508.             if timestopped == true then
  509.                 timestopcon = game:GetService('RunService').Heartbeat:Connect(function()
  510.                     for i, v in pairs(tweens) do
  511.                         if v.waspaused == false then
  512.                             v.waspaused = true
  513.                             v.tween:Pause()
  514.                         end
  515.                     end
  516.                 end)
  517.             else
  518.                 if timestopcon then
  519.                     timestopcon:Disconnect()
  520.                     for i, v in pairs(tweens) do
  521.                         if v.waspaused==true then
  522.                             v.waspaused = false
  523.                             v.tween:Play()
  524.                         end
  525.                     end
  526.                 end
  527.                
  528.             end
  529.         elseif inp.KeyCode == Enum.KeyCode.G then
  530.             toggleinfinity()
  531.         end
  532.        
  533.     end
  534.    
  535. end)
  536. if fpsunlockerDisabled == true then
  537.     task.spawn(function()
  538.         while task.wait(1) do
  539.             if checkframerate()>=65 then
  540.                 plr:Kick('FPS Unlockers are currently not supported.')
  541.             end
  542.         end
  543.     end)
  544. end
  545. task.spawn(function()
  546.     repeat game:GetService('RunService').RenderStepped:Wait() until (tick()-_G.z)>=phases.first.start
  547.     --
  548.     local firstphase = tick()
  549.     warn('first phase')
  550.     local zds = math.random(1,2)
  551.     if zds == 1 then
  552.         for i = 0.3, 0.5, 0.1 do
  553.             tallCeilingpillar({
  554.                 gap = 0.5;
  555.                 hole = i;
  556.                 speed = 1;
  557.             })
  558.             rswait(0.08, true)
  559.         end
  560.         for i = 0.5, 0.3, -0.1 do
  561.             tallCeilingpillar({
  562.                 gap = 0.5;
  563.                 hole = i;
  564.                 speed = 1;
  565.             })
  566.             rswait(0.08, true)
  567.         end
  568.     else
  569.         for i = 0.5, 0.3, -0.1 do
  570.             tallCeilingpillar({
  571.                 gap = 0.5;
  572.                 hole = i;
  573.                 speed = 1;
  574.             })
  575.             rswait(0.08, true)
  576.         end
  577.         for i = 0.3, 0.5, 0.1 do
  578.             tallCeilingpillar({
  579.                 gap = 0.5;
  580.                 hole = i;
  581.                 speed = 1;
  582.             })
  583.             rswait(0.08, true)
  584.         end
  585.     end
  586.     writeText(phases.first.firstspeech)
  587.     rswait(0.5, true)
  588.     writeText(phases.first.thirdspeech)
  589.     for i = 1, 8, 1 do
  590.         local random = Random.new()
  591.         local dangerblock = createdangerblock(3)
  592.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  593.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  594.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1.5), Enum.EasingStyle.Linear), {
  595.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.2 - dangerblock.Size.Y.Scale, 0)
  596.         }):Play()
  597.         rswait(0, true) -- game:GetService('RunService').RenderStepped:Wait()
  598.     end
  599.     rswait(1.2, true)
  600.     for i = 1, 10, 1 do
  601.         local random = Random.new()
  602.         local dangerblock = createdangerblock(3)
  603.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  604.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  605.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1.35), Enum.EasingStyle.Linear), {
  606.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.05 - dangerblock.Size.Y.Scale, 0)
  607.         }):Play()
  608.         rswait(0, true) -- game:GetService('RunService').RenderStepped:Wait()
  609.     end
  610.  
  611.     rswait(1.2, true)
  612.     for i = 1, 10, 1 do
  613.         local random = Random.new()
  614.         local dangerblock = createdangerblock(3)
  615.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0,1.1, 0)
  616.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  617.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9, 1), Enum.EasingStyle.Linear), {
  618.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, -0.05 - dangerblock.Size.Y.Scale, 0)
  619.         }):Play()
  620.         rswait(0.1, true)
  621.     end
  622.  
  623.     rswait(1.5, true)
  624.     writeText(phases.first.fourthspeech)
  625.     for i = 1, 12, 1 do
  626.         local random = Random.new()
  627.         local dangerblock = createdangerblock(3)
  628.         dangerblock.Position = UDim2.new(random:NextNumber(0, 0.97),0, -0.2, 0)
  629.         dangerblock.Size = dangerblock.Size + UDim2.new(0, 0, random:NextNumber(0.01, 0.2), 0)
  630.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.6, 1.1), Enum.EasingStyle.Linear), {
  631.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, 1.1, 0)
  632.         }):Play()
  633.         rswait(0, true) -- game:GetService('RunService').RenderStepped:Wait()
  634.     end
  635.     rswait(1.7, true)
  636.     writeText(phases.first.fifthspeech)
  637.     for i = 1, 60, 1 do
  638.         rswait(0, true)-- game:GetService('RunService').RenderStepped:Wait()
  639.         task.spawn(function()
  640.             phase.Text = 'Phase: '.. randomnumber(2)
  641.             writeText(randomletter(4), randomletter(3).. ': ')
  642.         end)
  643.     end
  644.     dealdamage(3)
  645.     dialogue.TextColor3 = Color3.fromRGB(239, 182, 19)
  646.     dialogue.TextStrokeTransparency = 1
  647.     writeText(phases.second.firstspeech)
  648.     phase.Text = 'Phase: 2'
  649.     phase.TextColor3 = Color3.fromRGB(239, 182, 19)
  650.     rswait(0.5, true)
  651.     dialogue.TextColor3 = Color3.fromRGB(232, 56, 22)
  652.     phase.TextColor3 = Color3.fromRGB(232, 56, 22)
  653.     dialogue.Font = Enum.Font.Creepster
  654.  
  655.     task.spawn(function()
  656.         shakecursor(50)
  657.     end)
  658.     writeText(phases.second.secondspeech)
  659.     rswait(2)
  660.     writeText(phases.second.thirdspeech)
  661.     for i = 1, 30, 1 do
  662.         local random = Random.new()
  663.         local dangerblock = createdangerblock(4)
  664.         dangerblock.Position = UDim2.new(cursor.Position.X,0, -0.2, 0)
  665.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.8, 1.2), Enum.EasingStyle.Linear), {
  666.             Position = UDim2.new(dangerblock.Position.X.Scale, 0, 1.1, 0)
  667.         }):Play()
  668.  
  669.         rswait(0.1, true)
  670.     end
  671.  
  672.     --
  673.     rswait(0.3, true)
  674.     for i = 1, 15, 1 do
  675.         local random = Random.new()
  676.         local dangerblock = createdangerblock(3)
  677.         local number = if math.random(1,2)==1 then -1 else 1
  678.         dangerblock.Position = UDim2.new(number,0, cursor.Position.Y.Scale,0)
  679.         tweenservice:Create(dangerblock, TweenInfo.new(random:NextNumber(0.9,1.1), Enum.EasingStyle.Linear), {
  680.             Position = UDim2.new(if number==1 then -1 else 1, 0, dangerblock.Position.Y.Scale, 0)
  681.         }):Play()
  682.  
  683.         rswait(0.1, true)
  684.     end
  685.  
  686.     rswait(0.6)
  687.     -- create a pillar with a hole in the middle --
  688.  
  689.     writeText(phases.second.fourthspeech)
  690.    
  691.     for i = 1, 10, 1 do
  692.         tallCeilingpillar()
  693.         rswait(1.1, true)
  694.     end
  695.     rswait(0.5, true)
  696.  
  697.     for i = 1, 10, 1 do
  698.         tallLeftpillar()
  699.         rswait(0.8, true)
  700.     end
  701.     for i = 1, 10, 1 do
  702.         tallRightpillar()
  703.         rswait(0.8, true)
  704.     end
  705.     --
  706.     writeText(phases.second.fifthspeech)
  707.    
  708.     task.spawn(function()
  709.        
  710.         tallCeilingpillar({
  711.             gap = 0.35;
  712.             hole = 0.8;
  713.         })
  714.         rswait(1, true)
  715.         tallLeftpillar()
  716.         rswait(1.3, true)
  717.         tallCeilingpillar({
  718.             gap = 0.35;
  719.             hole = 0.2;
  720.         })
  721.         tallRightpillar()
  722.         rswait(1.5, true)
  723.         for i = 1, 3, 1 do
  724.             tallCeilingpillar({
  725.                 speed = 1.05; -- top pillar is x times faster
  726.                 hole = 0.5;
  727.                 gap = 0.4;
  728.             })
  729.             rswait(1.5, true)
  730.             tallLeftpillar()
  731.             rswait(0.9, true)
  732.             tallRightpillar()
  733.             rswait(1.5, true)
  734.         end
  735.         --
  736.         writeText(phases.second.sixthspeech)
  737.         for i = 0.3, 1, 0.1 do
  738.             tallRightpillar({
  739.                 gap = 0.6;
  740.                 hole = i;
  741.             })
  742.             rswait(0.1, true)
  743.         end
  744.         for i = 1, 0.3, -0.1 do
  745.             tallRightpillar({
  746.                 gap = 0.6;
  747.                 hole = i;
  748.             })
  749.             rswait(0.1, true)
  750.         end
  751.         for i = 0.3, 1, 0.1 do
  752.             tallRightpillar({
  753.                 gap = 0.6;
  754.                 hole = i;
  755.             })
  756.             rswait(0.1, true)
  757.         end
  758.        
  759.         writeText(phases.second.seventhspeech)
  760.         local bigblock = createdangerblock(8)
  761.         bigblock.Size = UDim2.new(0.3, 0, 1.1, 0)
  762.         bigblock.Position = UDim2.new(1 + bigblock.Size.X.Scale, 0, 0, 0)
  763.        
  764.         local bigblocktween = tweenservice:Create(bigblock, TweenInfo.new(1, Enum.EasingStyle.Linear), {
  765.             Position = UDim2.new(0.1, 0, 0, 0)
  766.         })
  767.         bigblocktween:Play()
  768.         bigblocktween.Completed:Wait()
  769.         rswait(1, true)
  770.         bigblocktween = tweenservice:Create(bigblock, TweenInfo.new(2, Enum.EasingStyle.Linear), {
  771.             Position = UDim2.new(1+bigblock.Size.X.Scale, 0, 0, 0)
  772.         })
  773.         bigblocktween:Play()
  774.         bigblocktween.Completed:Wait()
  775.         if deaths.Value>=75 then
  776.             writeText(`With {deaths.Value} deaths I guess its reasonable you got pass phase 2__ `)
  777.             rswait(1.5, true)
  778.             _G.restart()
  779.         else
  780.             writeText('Seriously? Are you human? ')
  781.         end
  782.        
  783.     end)
  784.     --[[
  785.     repeat game:GetService('RunService').RenderStepped:Wait()
  786.         -- perform actions
  787.        
  788.     until (tick()-firstphase)>=phases.first.duration
  789.     ]]
  790.  
  791.  
  792. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement