Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gui = NP("AAAAAAAAAAAAA",true,1400,800)
- local maxboxes = 100
- local spawnrate = 5
- local frame = Instance.new("Frame",gui.OuterFrame)
- local tex = Instance.new("TextBox",gui.OuterFrame)
- tex.Size = UDim2.new(0,40,0,40)
- tex.TextScaled = true
- tex.BackgroundTransparency = 1
- tex.Text = "0"
- tex.ZIndex = gui.ZIndex
- gui.ClipsDescendants = true
- gui.Position = gui.Position - UDim2.new(0,0,0,130)
- frame.Size = UDim2.new(0,10,0,10)
- frame.AnchorPoint = Vector2.new(0.5,0.5)
- local ground = gui.OuterFrame.AbsoluteSize.Y-5
- local cei = 0 + 5
- frame.Position = UDim2.new(0,5,0,ground)
- frame.ZIndex = gui.ZIndex
- frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
- frame.BorderSizePixel = 0
- gui.OuterFrame.ClipsDescendants = true
- Instance.new("BoolValue",gui.OuterFrame).Name = "Button"
- Instance.new("BoolValue",gui.OuterFrame).Name = "ButtonDouble"
- local speed = 0
- local points = 0
- local RunService = game:GetService("RunService")
- local function AccurateWait(seconds)
- if not seconds then
- seconds = 0
- end
- local last = tick()
- local secondsPassed = 0
- local connection = RunService.Heartbeat:Connect(function(dt)
- secondsPassed = secondsPassed + dt
- end)
- repeat
- RunService.Heartbeat:Wait()
- until secondsPassed >= seconds
- connection:Disconnect()
- end
- local function jump()
- if speed > 0 then speed = speed + 10 else speed = 5 end
- end
- gui.OuterFrame.Button.Changed:Connect(function(change)
- if change == true then
- jump()
- gui.OuterFrame.Button.Value = false
- end
- end)
- gui.OuterFrame.ButtonDouble.Changed:Connect(function(change)
- if change == true then
- jump()
- gui.OuterFrame.ButtonDouble.Value = false
- end
- end)
- local fat = true
- local d = false
- local function inframe(gui)
- local xp = gui.AbsolutePosition.X
- local yp = gui.AbsolutePosition.Y
- local xs = gui.AbsoluteSize.X
- local ys = gui.AbsoluteSize.Y
- local sumx = xp+xs
- local sumy = yp+ys
- if (frame.AbsolutePosition.X + 5) >= xp and (frame.AbsolutePosition.Y + 5) >= yp and (frame.AbsolutePosition.X + 5) <= sumx and (frame.AbsolutePosition.Y + 5) <= sumy then
- return true
- else
- return false
- end
- end
- local amount = 0
- local fold = Instance.new("Folder",gui.OuterFrame)
- local count = 0
- local function pew()
- amount = amount + 1
- local cou = count
- coroutine.resume(coroutine.create(function()
- local fr = Instance.new("Frame",gui:FindFirstChild("OuterFrame"))
- if gui ~= nil and fr ~= nil then
- fr.Parent = fold
- fr.Size = UDim2.new(0,40,0,40)
- local mathh = math.random(gui.OuterFrame.AbsoluteSize.X-40)
- fr.Position = UDim2.new(0,math.floor(mathh),0,-30)
- fr.BackgroundColor3 = Color3.fromRGB(255,0,0)
- fr.ZIndex = gui.ZIndex
- fr.BorderSizePixel = 0
- fr:TweenPosition(UDim2.new(0,math.floor(mathh),0,gui.OuterFrame.AbsoluteSize.Y+1),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,3.5)
- wait(3.5)
- if fr ~= nil and cou == count then
- fr:Destroy()
- amount = amount - 1
- points = points + 1
- tex.Text = tostring(points)
- end
- end
- end))
- end
- coroutine.resume(coroutine.create(function()
- while gui ~= nil and gui.Parent ~= nil do
- wait()
- for i,fr in pairs(fold:GetChildren()) do
- if inframe(fr) then
- count = count + 1
- frame.Visible = false
- fr:Destroy()
- amount = amount - 1
- end
- if frame.Visible == false then
- fr:Destroy()
- amount = amount -1
- end
- end
- end
- end))
- pew()
- local cred = Instance.new("TextBox",gui.OuterFrame)
- cred.ZIndex = gui.ZIndex
- cred.AnchorPoint = Vector2.new(0,1)
- cred.Position = UDim2.new(0,0,1,0)
- cred.Size = UDim2.new(1,0,0,20)
- cred.BackgroundTransparency = 1
- cred.TextTransparency = 0.5
- cred.Text = "By Memo1332"
- cred.TextSize = 16
- while (gui ~= nil and gui.Parent ~= nil) do
- AccurateWait(0.01)
- if frame.Visible then
- local pos = frame.Position.Y.Offset
- if cei > pos then
- frame.Position = UDim2.new(0,frame.Position.X.Offset,0,cei+5)
- speed = -math.abs(speed)/1.5
- elseif pos <= ground and speed ~= 0 then
- if d then d = not d end
- speed = speed - 0.6
- frame.Position = UDim2.new(0,frame.Position.X.Offset,0,pos-speed)
- elseif pos > ground and speed <= 0 then
- speed = math.abs(speed)/1.5
- if speed <= 0.6 then
- speed = 0
- end
- frame.Position = UDim2.new(0,frame.Position.X.Offset,0,ground)
- elseif ground < pos and speed > 0 then
- speed = math.abs(speed)/1.5
- if speed <= 0.6 then
- speed = 0
- end
- end
- if #fold:GetChildren() < maxboxes then
- local mat = math.random(1,spawnrate)
- if mat == 1 then
- pew()
- end
- end
- if fat then
- frame.Position = UDim2.new(0,frame.Position.X.Offset+4,0,frame.Position.Y.Offset)
- if frame.Position.X.Offset > gui.OuterFrame.AbsoluteSize.X-5 then
- frame.Position = UDim2.new(0,frame.Position.X.Offset-4,0,frame.Position.Y.Offset)
- fat = not fat
- end
- else
- frame.Position = UDim2.new(0,frame.Position.X.Offset-4,0,frame.Position.Y.Offset)
- if frame.Position.X.Offset < 5 then
- frame.Position = UDim2.new(0,frame.Position.X.Offset+4,0,frame.Position.Y.Offset)
- fat = not fat
- end
- end
- else
- local TweenService = game:GetService("TweenService")
- local fr = Instance.new("Frame",gui.OuterFrame)
- fr.ZIndex = gui.ZIndex
- fr.Size = UDim2.new(1,0,1,0)
- fr.BackgroundColor3 = Color3.fromRGB(255,0,0)
- fr.BackgroundTransparency = 1
- fr.BorderSizePixel = 0
- local goal = {}
- goal.BackgroundTransparency = 0
- local goal2 = {}
- goal2.BackgroundTransparency = 1
- local tweenInfo = TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
- local tween1 = TweenService:Create(fr,tweenInfo,goal)
- local tween2 = TweenService:Create(fr,tweenInfo,goal2)
- tween1:Play()
- wait(1.5)
- tween2:Play()
- points = 0
- tex.Text = tostring(points)
- frame.Position = UDim2.new(0,5,0,ground)
- speed = 0
- frame.Visible = true
- pew()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement