Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- hi TposeTShirtTSeries uwu
- -- made by @Memo1332 for Roblox
- Part0 = Instance.new("Part")
- SurfaceGui1 = Instance.new("SurfaceGui")
- ScrollingFrame2 = Instance.new("ScrollingFrame")
- TextLabel3 = Instance.new("TextLabel")
- TextButton4 = Instance.new("TextButton")
- Part0.Parent = script
- Part0.CFrame = CFrame.new(3.06085205, 4, 19.5075073, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Size = Vector3.new(14, 8, 1)
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.Anchored = true
- SurfaceGui1.Parent = Part0
- SurfaceGui1.LightInfluence = 0
- SurfaceGui1.ClipsDescendants = true
- SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
- SurfaceGui1.CanvasSize = Vector2.new(1080, 720)
- SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ScrollingFrame2.Parent = SurfaceGui1
- ScrollingFrame2.Size = UDim2.new(1, 0, 1, 0)
- ScrollingFrame2.Active = true
- ScrollingFrame2.BackgroundColor3 = Color3.new(0, 0, 0)
- ScrollingFrame2.CanvasSize = UDim2.new(0, 0, 0, 0)
- ScrollingFrame2.ElasticBehavior = Enum.ElasticBehavior.Always
- ScrollingFrame2.ScrollBarThickness = 10
- ScrollingFrame2.AutomaticCanvasSize = Enum.AutomaticSize.Y
- TextLabel3.Name = "Sample"
- TextLabel3.Parent = ScrollingFrame2
- TextLabel3.Position = UDim2.new(0, 10, 0, 0)
- TextLabel3.Size = UDim2.new(1, 0, 0, 45)
- TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel3.BackgroundTransparency = 1
- TextLabel3.Font = Enum.Font.Arcade
- TextLabel3.FontSize = Enum.FontSize.Size28
- TextLabel3.Text = "> What do you want to do?"
- TextLabel3.TextColor = BrickColor.new("Institutional white")
- TextLabel3.TextColor3 = Color3.new(1, 1, 1)
- TextLabel3.TextSize = 28
- TextLabel3.TextWrap = true
- TextLabel3.TextWrapped = true
- TextLabel3.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel3.TextYAlignment = Enum.TextYAlignment.Top
- TextButton4.Parent = SurfaceGui1
- TextButton4.Size = UDim2.new(1, 0, 1, 0)
- TextButton4.BackgroundColor3 = Color3.new(1, 1, 1)
- TextButton4.BackgroundTransparency = 1
- TextButton4.ZIndex = 2
- TextButton4.Font = Enum.Font.SourceSans
- TextButton4.FontSize = Enum.FontSize.Size14
- TextButton4.Text = ""
- TextButton4.TextColor = BrickColor.new("Really black")
- TextButton4.TextColor3 = Color3.new(0, 0, 0)
- TextButton4.TextSize = 14
- --local owner:Player = game.Players:WaitForChild("Memo1332")
- local remote = owner:FindFirstChild("remememfordingypingy")
- local part = Part0 -- temporary
- local screen = part.SurfaceGui -- maybe temporary
- local clon = screen.ScrollingFrame.Sample
- local enter = Instance.new("BindableEvent")
- if remote == nil then
- remote = Instance.new("RemoteEvent",owner)
- remote.Name = "remememfordingypingy"
- end
- clon.Parent = nil
- local currenty = 0
- local cursorblinktime = 0.5 -- seconds
- local currenttick = tick()
- local cursortime = tick() + cursorblinktime
- local cursor = true
- local currentgui = nil
- local currentinput = ""
- local shift = false
- local inputtimer = tick()
- local chattyping = false
- local vsbmode = false -- ENABLE IF RAN ON VOIDACITY SCRIPT BUILDER
- local blinkcharacter = "_"
- local cache = {}
- -- BUILT IN FUNCTIONS
- local function println(str)
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- screen.ScrollingFrame.Visible = false
- if vsbmode then
- screen.Parent = nil
- end
- local clone = clon:Clone()
- clone.Parent = screen.ScrollingFrame
- screen.ScrollingFrame.Visible = true
- screen.Parent = part
- clone.Text = str
- clone.Position = UDim2.new(0,10,0,currenty)
- clone.Size = UDim2.new(1,0,0,400)
- currenty = currenty + clone.TextBounds.Y+10
- clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+10)
- if vsbmode then
- wait()
- end
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- end
- 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 getInput(str)
- println(str)
- currentinput = ""
- screen.ScrollingFrame.Visible = false
- if vsbmode then
- screen.Parent = nil
- end
- local clone = clon:Clone()
- clone.Parent = screen.ScrollingFrame
- screen.Parent = part
- screen.ScrollingFrame.Visible = true
- clone.Text = " "
- clone.Position = UDim2.new(0,10,0,currenty)
- clone.Size = UDim2.new(1,0,0,58)
- currentgui = clone
- wait()
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- local use = nil
- local ev = enter.Event:Connect(function(us)
- use = us
- end)
- repeat wait() until use ~= nil
- ev:Disconnect()
- currentgui = nil
- clone.Text = currentinput
- currenty = currenty + clone.TextBounds.Y+10
- clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+20)
- return currentinput,use
- end
- local function getUserInput(str,user)
- println(str)
- currentinput = ""
- screen.ScrollingFrame.Visible = false
- if vsbmode then
- screen.Parent = nil
- end
- local clone = clon:Clone()
- clone.Parent = screen.ScrollingFrame
- screen.Parent = part
- screen.ScrollingFrame.Visible = true
- clone.Text = " "
- clone.Position = UDim2.new(0,10,0,currenty)
- clone.Size = UDim2.new(1,0,0,58)
- currentgui = clone
- wait()
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- local use = nil
- local ev = enter.Event:Connect(function(us)
- use = us
- end)
- repeat wait() until use ~= nil and use.name == user.name
- ev:Disconnect()
- currentgui = nil
- clone.Text = currentinput
- currenty = currenty + clone.TextBounds.Y+10
- clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+20)
- return currentinput,use
- end
- local function errorln(str)
- println("β "..str)
- end
- local function warningln(str)
- println("β οΈ "..str)
- end
- -- END OF BUILT IN FUNCTIONS
- -- SERVICE FUNCTIONS
- local usercache = {}
- function getNameFromUserId(userId)
- -- First, check if the cache contains 'userId'
- local nameFromCache = usercache[userId]
- if nameFromCache then
- -- if a value was stored in the cache at key 'userId', then this 'nameFromCache'
- -- is the correct Name and we can return it.
- return nameFromCache
- end
- -- If here, 'userId' was not previously looked up and does not exist in the
- -- cache. Now we need to use GetNameFromUserIdAsync() to look up the name
- local name
- local success, _ = pcall(function()
- name = game:GetService("Players"):GetNameFromUserIdAsync(userId)
- end)
- if success then
- -- if 'success' is true, GetNameFromUserIdAsync() successfully found the
- -- name. Store this name in the cache using 'userId' as the key so we
- -- never have to look this name up in the future. Then return name.
- usercache[userId] = name
- return name
- end
- -- If here, 'success' was false, meaning GetNameFromUserIdAsync()
- -- was unable to find the 'name' for the 'userId' provided. Warn the user
- -- this happened and then return nothing, or nil.
- warn("Unable to find Name for UserId:", userId)
- return nil
- end
- local function getPlayer(str)
- local name = ""
- if string.sub(str,1,1) == "@" then
- name = string.sub(str,2)
- for i,v in pairs(game.Players:GetPlayers()) do
- if string.lower(string.sub(v.Name,1,#name)) == string.lower(name) then
- return v
- end
- end
- else
- name = str
- for i,v in pairs(game.Players:GetPlayers()) do
- if string.lower(string.sub(v.Name,1,#name)) == string.lower(name) then
- return v
- end
- end
- end
- end
- -- END OF SERVICE FUNCTIONS
- local accountdatastore = game:GetService("DataStoreService"):GetDataStore("terminaldingy1107")
- local accounts = accountdatastore:GetAsync("accounts")
- if accounts == nil then
- accounts = { -- dictionary housing all players who are allowed to use the terminal + rank
- [tostring(owner.UserId)] = {
- name = tostring(owner.UserId),
- rank = 2, -- 0 no perms, 1 normal perms, 2 admin perms
- balance = 0
- }
- }
- end
- local function getUser(plr)
- return accounts[tostring(plr.UserId)]
- end
- local function saveData()
- accountdatastore:SetAsync("accounts",accounts)
- end
- local function addMoney(num,userid)
- local account = accounts[tostring(userid)]
- account.balance = account.balance + num
- end
- local commands = nil
- commands = { -- dictionary housing all commands including "cmds"
- bring = {
- name = "bring",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local plr = game:GetService("Players"):GetPlayerByUserId(tonumber(user.name))
- part.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,2,-4) * CFrame.Angles(0,math.rad(180),0)
- end,
- },
- balance = {
- name = "balance",
- rank = 1,
- cooldown = 0,
- func = function(str,user)
- println("Your balance is: $"..tostring(user.balance))
- end,
- },
- clear = {
- name = "clear",
- rank = 1,
- cooldown = 0,
- func = function(str,user)
- currenty = 0
- part.SurfaceGui.ScrollingFrame:ClearAllChildren()
- println("Cleared terminal")
- end,
- },
- addaccount = {
- name = "addaccount",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local inputted = false
- while not inputted do
- local plrs = game:GetService("Players"):GetPlayers()
- local plrspart2 = {}
- for i,v in pairs(plrs) do
- table.insert(plrspart2,v.Name)
- end
- local str = getUserInput("Select a player to add:\n"..table.concat(plrspart2,", "),user)
- for i,v in pairs(plrs) do
- if string.lower(string.sub(v.Name,1,#str)) == string.lower(str) then
- local exists = false
- for i,vv in pairs(accounts) do
- if tostring(vv.name) == tostring(v.UserId) then
- exists = true
- break
- end
- end
- if exists then
- inputted = true
- errorln("This player already has an account.")
- else
- while not inputted do
- local str = getUserInput("Give this player administrator permissions?\nYes, No",user)
- if string.lower(str) == "yes" then
- accounts[tostring(v.UserId)] = {
- name = tostring(v.UserId),
- rank = 2,
- balance = 0
- }
- saveData()
- inputted = true
- elseif string.lower(str) == "no" then
- accounts[tostring(v.UserId)] = {
- name = tostring(v.UserId),
- rank = 1,
- balance = 0
- }
- saveData()
- inputted = true
- else
- errorln("Not a valid selection; Yes, No")
- end
- end
- end
- end
- end
- if not inputted then
- local plrs = game:GetService("Players"):GetPlayers()
- errorln("Not a valid selection;")
- end
- end
- end,
- },
- search = {
- name = "search",
- rank = 1,
- cooldown = 30,
- func = function(str,user)
- local searchplaces = { -- name, troublechance, min, max, nothingchance,
- {"the garage","garage",10,15,20,30,{"under a box", "in the toolshed", "on the ceiling", "on the floor"}},
- {"your room","room",0,2,10,50,{"under your bed", "in the closet", "in your shoe"}},
- {"your parents' room","parents",30,20,80,50,{"under the bed","in the closet","in a drawer"}},
- {"the bathroom","bathroom",5,10,30,40,{"in the toilet","on the counter","in the shower","on the floor","underneath a mat"}},
- {"the bank","bank",50,90,200,0,{"in the vault"}},
- {"the store","store",50,50,150,20,{"on the body of the guy you just murdered","from the wallet of the cashier you just robbed","on one of the shelves","in the footage of the security cameras"}},
- {"the kitchen","kitchen",10,5,30,40,{"under the fridge","in the cabinet","in the fridge","in the sink","in the dishwasher"}},
- {"the livingroom","livingroom",10,10,40,0,{"under the couch","in the couch","under the rug","taped to the ceiling"}},
- {"some random guy","guy",40,50,400,0,{"in their heart","mashed deep into their skull", "in their blood-soaked pockets", "inside their eyeball", "inside of one of their shattered bones"}},
- {"the wilderness","wilderness",20,40,120,40,{"after completing a quest","in a chest","by collecting the bounty of a monster you killed","by selling the gold you came back with","by leveling up"}},
- {"mcdonalds","mcdonalds",10,1,3,0,{"in a burger","on the floor","under a desk","from thin air"}},
- {"the internet","internet",40,20,200,30,{"in a man's bank account","in a woman's bank account","in an unidentifiable gender's bank account"}},
- {"outer space","space",20,20,100,25,{"in the international space station","inside the helmet of an astronaut in orbit","in your house after coming back with nothing","inside the skull of a crewmate"}},
- {"the air","air",0,500,1000,85,{"out of thin air","by pure chance","some how","??? what??"}},
- {"the ground","ground",25,25,175,30,{"by digging straight down","after selling the diamonds you mined","in the nether"}},
- {"roblox","roblox",10,5,50,40,{"by selling the orphan you adopted in adopt me","by coding in some free robux","after making a successful simulator game"}}
- --{"","",10,1,20,0,{"",""}}
- }
- local can = true
- if can then
- local places = {}
- for i=1,3 do
- local place = nil
- while place == nil do
- place = searchplaces[math.random(1,#searchplaces)]
- for i,v in pairs(places) do
- if place ~= nil and v[2] == place[2] then
- place = nil
- end
- end
- end
- table.insert(places,place)
- end
- println("π Choose a place to search:")
- local i = nil
- while i == nil do
- i = getInput(places[1][2]..", "..places[2][2]..", or "..places[3][2])
- if string.lower(i) ~= string.lower(places[1][2]) and string.lower(i) ~= string.lower(places[2][2]) and string.lower(i) ~= string.lower(places[3][2]) then
- println("β οΈ That's not a valid choice.")
- i = nil
- else
- if string.lower(i) == string.lower(places[1][2]) then
- i = places[1]
- elseif string.lower(i) == string.lower(places[2][2]) then
- i = places[2]
- elseif string.lower(i) == string.lower(places[3][2]) then
- i = places[3]
- end
- end
- end
- local trouble = math.random(1,100)
- if trouble < i[3] then
- println("β You were caught and fined $"..tostring(i[5]))
- addMoney(i[5]*-1,user.name)
- else
- local nothing = math.random(1,100)
- if nothing < i[6] then
- println("π You searched "..i[1].." and found nothing of value.")
- else
- local mone = math.random(i[4],i[5])
- local text = i[7][math.random(1,#i[7])]
- println("π΅ You searched "..i[1].." and found $"..tostring(mone).." "..text)
- addMoney(mone,user.name)
- end
- end
- end
- end,
- },
- work = {
- name = "work",
- rank = 1,
- cooldown = 30,
- func = function(str,user)
- local can = true
- if can then
- local jobs = {"scramble","typ","math"}
- local job = jobs[math.random(1,#jobs)]
- local data = {
- scramble = {
- "trophy",
- "discord",
- "love",
- "memo",
- "donut",
- "roblox",
- "minecraft",
- "bottle",
- "racecar",
- "apple",
- "jelly",
- "bean",
- "coffee",
- "ouch",
- "steve",
- "alex",
- "pickaxe",
- "shovel",
- "scramble",
- "lotion",
- "pink",
- "red",
- "magenta",
- "blue",
- "rock",
- "roll",
- "barrel",
- "gold",
- "silver",
- "potato",
- "carrot",
- "book"
- },
- typ = {
- "Imagine having to type this through chat, lol that would really suck",
- "These sentences do not contain periods because some games literally interfere with the terminal's period button",
- "Who knew a terminal bot could be so addicting to develop and play with",
- "This terminal was made as a recreation to a bot I made on replit (website to make software with)",
- "Memo1332 was the first account to be added to the terminal",
- "The only difference between admins and normal users is that admins can delete and modify accounts",
- "silly billy you can't be silly!!"
- }
- }
- if job == "scramble" then
- local word = ""
- local tab = {}
- local c = data[job][math.random(1,#data[job])]
- for i=1,#c do
- table.insert(tab,string.sub(c,i,i))
- end
- while #tab > 0 do
- local t = math.random(1,#tab)
- word = word..tab[t]
- table.remove(tab,t)
- end
- local timbegin = os.time()
- local ans = getInput("π€ Unscramble this word as quickly as possible: "..word)
- local timend = os.time()
- if string.lower(ans) == string.lower(c) then
- --((10-os.clock())*3)+20
- local bonus = math.floor((10-(timend-timbegin))*3)
- if bonus > 0 then
- println("π΅ You got it! You earned $20 and another $"..tostring(bonus).." for your efficiency!")
- addMoney(20 + bonus,user.name)
- else
- println("π΅ You got it! You earned $20")
- addMoney(20,user.name)
- end
- else
- println("β You failed your job, the correct answer was: "..c..".")
- end
- elseif job == "typ" then
- local c = data[job][math.random(1,#data[job])]
- local timebegin = os.time()
- local ans = getInput("π€ Type this phrase as quickly as possible:\n"..c)
- local timeend = os.time()
- local money = 0
- if ans == c then
- local bonus = math.floor((20-(timeend-timebegin))*2)
- if bonus > 0 then
- println("π΅ You got it! You earned $40 and another $"..tostring(bonus).." for your efficiency!")
- money = money + 40 + bonus
- else
- println("π΅ You got it! You earned $40!")
- money = money + 40
- end
- addMoney(money,user.name)
- elseif string.lower(ans) == string.lower(c) then
- println("π΅ You got it, but you made a mistake on your capitilization. So you only earned $20.")
- money = money + 20
- addMoney(money,user.name)
- else
- -- find the error
- local erro
- local nerro
- local berro
- for i=1,#c do
- if string.lower(string.sub(c,i,i)) ~= string.lower(string.sub(ans,i,i)) and erro == nil then
- for ii=1,i do
- if string.sub(ans,i-ii+1,i-ii+1) == " " or ii == i then
- erro = i-ii+1
- if string.sub(ans,i-ii+1,i-ii+1) == " " then
- erro = erro + 1
- end
- break
- end
- end
- elseif (string.sub(ans,i,i) == " " or i == #c) and erro ~= nil then
- if i ~= #c then
- nerro = i-1
- else
- nerro = i
- end
- for ii=erro,#c do
- if string.sub(c,ii,ii) == " " or ii == #c then
- berro = ii
- if ii ~= #c then
- berro = berro - 1
- end
- break
- end
- end
- break
- end
- end
- println("β You failed your job because you made a mistake, '"..string.sub(ans,erro,nerro).."' should of been '"..string.sub(c,erro,berro).."'.")
- end
- elseif job == "math" then
- local h = {"*","/","+","-"}
- local h = h[math.random(1,#h)]
- local bonus
- local expect
- local ans
- if h == "/" then
- local num2 = math.random(1,12)
- local num1a = math.random(1,3)
- local num1 = num2*num1a
- expect = num1/num2
- local timbegin = os.time()
- ans = getInput("π€ What is "..tostring(num1).." divided by "..tostring(num2).."?")
- local timend = os.time()
- bonus = math.floor((20-(timend-timbegin))*2)
- elseif h == "*" then
- local num1 = math.random(-30,30)
- local num2 = math.random(-20,20)
- expect = num1*num2
- local timbegin = os.time()
- ans = getInput("π€ What is "..tostring(num1).." times "..tostring(num2).."?")
- local timend = os.time()
- bonus = math.floor((15-(timend-timbegin))*2.33333333)
- elseif h == "+" then
- local num1 = math.random(-30,30)
- local num2 = math.random(-30,30)
- expect = num1+num2
- local timbegin = os.time()
- ans = getInput("π€ What is "..tostring(num1).." plus "..tostring(num2).."?")
- local timend = os.time()
- bonus = math.floor((10-(timend-timbegin))*4)
- elseif h == "-" then
- local num1 = math.random(-30,30)
- local num2 = math.random(-30,30)
- expect = num1-num2
- local timbegin = os.time()
- ans = getInput("π€ What is "..tostring(num1).." minus "..tostring(num2).."?")
- local timend = os.time()
- bonus = math.floor((10-(timend-timbegin))*4)
- end
- if tonumber(ans) == nil then
- println("β You failed your job because you didn't even provide a number, and as a result you have lost -$1 for being dumb.")
- addMoney(-1,user.name)
- elseif tonumber(ans) ~= expect then
- println("β You failed your job because you didnt not give the right answer, which was: "..tostring(expect))
- elseif bonus > 0 then
- println("π΅ You got it! You earned $40".." and another $"..tostring(bonus).." for your efficiency!")
- addMoney(40 + bonus,user.name)
- else
- println("π΅ You got it! You earned $40!")
- addMoney(40,user.name)
- end
- end
- end
- end,
- },
- gamble = {
- name = "gamble",
- rank = 1,
- cooldown = 10,
- func = function(str,user)
- local num = tonumber(str)
- while num == nil do
- num = getInput("How much are you willing to gamble?")
- num = tonumber(num)
- if num == nil then
- println("β οΈ That is not a number.")
- elseif num <= 0 then
- println("β οΈ Grow a brain and try again.")
- num = nil
- elseif num > user.balance then
- println("β οΈ You only have $"..tostring(user.balance))
- num = nil
- end
- end
- if num ~= nil and num <= user.balance and num > 0 then
- local yourroll = math.random(1,12)
- local botroll = math.random(1,12)
- local percent = math.random(50,150)
- local winnings = math.floor(num*(percent/100))
- local money = 0
- if yourroll > botroll then
- println("π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅\n You gambled: $"..tostring(num).."\n You rolled: "..tostring(yourroll).."\n Bot rolled: "..tostring(botroll).."\n Percentage won: "..tostring(percent).."%\n You won: $"..tostring(winnings).."\nπ΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅")
- money = money + winnings
- else
- println("π» π» π» π» π» π» π» π» π» π» π» π» π» π»\n You gambled: $"..tostring(num).."\n You rolled: "..tostring(yourroll).."\n Bot rolled: "..tostring(botroll).."\n You lost: $"..tostring(num).."\nπ» π» π» π» π» π» π» π» π» π» π» π» π» π»")
- money = money - num
- end
- addMoney(money,user.name)
- elseif num == nil then
- println("β οΈ Enter a real number, dummy.")
- elseif num > user.balance then
- println("β οΈ You don't even have that amount of cash lol.")
- elseif num < 0 then
- println("β οΈ Money doesn't work like that.")
- end
- end,
- },
- cup = {
- name = "cup",
- rank = 1,
- cooldown = 30,
- func = function(str,user)
- local ans = tonumber(str)
- if ans == nil or ans > user.balance or ans < 0 then ans = nil end
- while ans == nil do
- ans = getInput("How much are you willing to bet?")
- ans = tonumber(ans)
- if ans == nil then
- println("β οΈ That is not a number.")
- elseif ans <= 0 then
- println("β οΈ Grow a brain and try again.")
- ans = nil
- elseif ans > user.balance then
- println("β οΈ You only have $"..tostring(user.balance))
- ans = nil
- end
- end
- local amount = math.random(2,5)
- local cups = math.random(3,4)
- local roll = math.random(1,cups)
- local ans2 = nil
- while ans2 == nil do
- ans2 = getInput("In front of you are "..tostring(cups).." cups, one of them contains a ball. If you guess the cup with the ball you earn "..tostring(amount).."x your bet. Choose a number between 1 and "..tostring(cups)..".")
- ans2 = tonumber(ans2)
- if ans2 == nil then
- println("β οΈ That's not even a number you dumb.")
- elseif ans2 <= 0 then
- println("β οΈ That answer is simpily stupid.")
- ans = nil
- elseif ans2 > cups then
- println("β οΈ I said "..tostring(cups).." cups not whatever '"..tostring(ans2).."' is.")
- ans = nil
- else
- if ans2 == roll then
- println("π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅\nYou lift up cup #"..ans2.." and find the ball underneath it.\nYou won: $"..tostring((ans*amount)-ans).."\nπ΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅")
- addMoney((ans*amount)-ans,user.name)
- else
- println("π» π» π» π» π» π» π» π» π» π» π» π» π» π»\nYou lift up cup #"..ans2.." and find nothing but air underneath it.\nWinning cup: "..tostring(roll).."\nYou lost: $"..tostring(ans).."\nπ» π» π» π» π» π» π» π» π» π» π» π» π» π»")
- addMoney(ans*-1,user.name)
- end
- end
- end
- end,
- },
- modifyaccount = {
- name = "modifyaccount",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local tab = {}
- local p = game:GetService("Players")
- for i,v in pairs(accounts) do
- table.insert(tab,getNameFromUserId(tonumber(v.name)))
- end
- local inputted = false
- while not inputted do
- local str = getUserInput("Which account do you wish to modify?\n"..table.concat(tab,", "),user)
- for i,v in pairs(tab) do
- if string.lower(string.sub(v,1,#str)) == string.lower(str) then
- while not inputted do
- local str2 = getUserInput("What would you like to do?\nChange rank, Delete account",user)
- if string.lower(str2) == "change rank" then
- local userid = tostring(p:GetUserIdFromNameAsync(v))
- local account = accounts[userid]
- if user.name ~= account.name then
- if account.name ~= tostring(owner.UserId) then
- println("Current player rank: "..tostring(account.rank))
- while not inputted do
- local str3 = getUserInput("What should be their new rank?",user)
- if tonumber(str3) == nil then
- errorln("Invalid input recieved; expected a number")
- else
- account.rank = tonumber(str3)
- println("β Successfully their rank to: "..tostring(account.rank))
- saveData()
- inputted = true
- end
- end
- else
- errorln("That account's rank is higher than yours.")
- inputted = true
- end
- else
- errorln("You cannot change your own account's rank.")
- inputted = true
- end
- elseif string.lower(str2) == "delete account" then
- local userid = tostring(p:GetUserIdFromNameAsync(v))
- if tostring(userid) ~= user.name then
- if userid ~= owner.UserId then
- accounts[userid] = nil
- saveData()
- println("β Successfully deleted account")
- else
- errorln("That account's rank is higher than yours.")
- inputted = true
- end
- else
- errorln("You cannot delete your own account.")
- inputted = true
- end
- inputted = true
- else
- errorln("Invalid selection")
- end
- end
- end
- end
- if not inputted then
- errorln("Invalid selection")
- end
- end
- end,
- },
- leaderboard = {
- name = "leaderboard",
- rank = 1,
- cooldown = 0,
- func = function(str,user)
- local p = game:GetService("Players")
- local acs = {}
- local p = game:GetService("Players")
- local function len(t)
- local n = 0
- for _ in pairs(t) do
- n = n + 1
- end
- return n
- end
- local function hasBalance(num)
- for i,v in pairs(acs) do
- if v == num then
- return true
- end
- end
- return false
- end
- local count = 0
- while len(acs) ~= len(accounts) do
- count = count + 1
- if count == 11 then
- break
- end
- local maxnum = math.huge*-1
- local remember = 0
- for i,v in pairs(accounts) do
- if v.balance > maxnum and not hasBalance(v.name) then
- maxnum = v.balance
- remember = v.name
- end
- end
- local account = accounts[remember]
- if account ~= nil then
- if account.balance == nil then
- account.balance = 0
- end
- table.insert(acs,account.name)
- local symb = " @"
- if #acs == 1 then
- symb = "π₯@"
- elseif #acs == 2 then
- symb = "π₯@"
- elseif #acs == 3 then
- symb = "π₯@"
- end
- println(symb..getNameFromUserId(tonumber(account.name))..": $"..tostring(account.balance))
- end
- end
- end,
- },
- listaccounts = {
- name = "listaccounts",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local tab = {}
- local p = game:GetService("Players")
- for i,v in pairs(accounts) do
- table.insert(tab,getNameFromUserId(tonumber(v.name)))
- end
- println(table.concat(tab,", "))
- end,
- },
- sudo = {
- name = "sudo",
- rank = 2,
- cooldown = 0,
- func = function(str2,user)
- local tab = {}
- local str = {}
- str2 = string.split(str2," ")
- for i,v in pairs(str2) do
- if v ~= "" and v ~= " " then
- table.insert(str,v)
- end
- end
- print(#str)
- local p = game:GetService("Players")
- for i,v in pairs(accounts) do
- table.insert(tab,getNameFromUserId(tonumber(v.name)))
- end
- local account = nil
- local inputted = false
- local input = "kjlnbsedfkbhjsedfgkbjhnlsdgfkbhjsdfgkbjhdfsgkbjhdfgskjbhfdgbjkhfdgs"
- if #str < 1 then
- input = getUserInput("Which account balance do you wish to sudo?\n"..table.concat(tab,", "),user)
- else
- input = str[1]
- end
- while not inputted do
- for i,v in pairs(tab) do
- if string.lower(string.sub(v,1,#input)) == string.lower(input) then
- account = accounts[tostring(p:GetUserIdFromNameAsync(v))]
- inputted = true
- end
- end
- if not inputted then
- input = getUserInput("Invalid selection; choose between: \n"..table.concat(tab,", "),user)
- end
- end
- local input2 = nil
- local command = ""
- if #str < 2 then
- command = getUserInput("> What command do you want this user to run?",user)
- else
- table.remove(str,1)
- command = table.concat(str," ")
- end
- local spl = string.split(command," ")
- local command = commands[spl[1]]
- local user = account
- if command ~= nil then
- if user.rank > 0 then
- if user.rank >= command.rank then
- if command.cooldown > 0 then
- local can = true
- for i,v in pairs(cache) do
- if v[1] == user.name and v[2] > os.time() and v[3] == command.name then
- can = false
- warningln("οΈοΈYou must wait "..tostring(v[2]-os.time()).." seconds before using this command again!")
- elseif v[1] == user.name and v[2] <= os.time() and v[3] == command.name then
- table.remove(cache,i)
- end
- end
- if can then
- table.remove(spl,1)
- local success = command.func(table.concat(spl," "),user)
- if success ~= false then
- table.insert(cache,{user.name,os.time()+command.cooldown,command.name})
- end
- end
- else
- table.remove(spl,1)
- command.func(table.concat(spl," "),user)
- end
- else
- errorln("Invalid permissions")
- end
- end
- else
- errorln("No such command: \""..command.."\"")
- end
- end,
- },
- fixaccounts = {
- name = "fixaccounts",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local tab = {}
- local p = game:GetService("Players")
- local count = 0
- local d = {}
- for i,v in pairs(accounts) do
- if v == nil or v.balance == nil or v.rank == nil or v.name == nil then
- count = count + 1
- if v.name ~= nil then
- v.balance = v.balance or 0
- v.rank = v.rank or 1
- table.insert(d,v.name)
- else
- accounts[i] = nil
- println("ACCOUNT DELETED")
- end
- end
- end
- println(tostring(count).." accounts fixed:")
- for i,v in pairs(d) do
- table.insert(tab,getNameFromUserId(tonumber(v)))
- end
- println(table.concat(tab,", "))
- end,
- },
- ["8ball"] = {
- name = "8ball",
- rank = 1,
- cooldown = 0,
- func = function(str,user)
- local responces = {
- "As I see it, yes.",
- "Ask again later.",
- "Better not tell you now.",
- "Cannot predict now.",
- "Concentrate and ask again.",
- "Donβt count on it.",
- "It is certain.",
- "It is decidedly so.",
- "Most likely.",
- "My reply is no.",
- "My sources say no.",
- "Outlook not so good.",
- "Outlook good.",
- "Reply hazy, try again.",
- "Signs point to yes.",
- "Very doubtful.",
- "Without a doubt.",
- "Yes.",
- "Yes β definitely.",
- "You may rely on it."
- }
- println("π± "..responces[math.random(1,#responces)])
- end,
- },
- rps = {
- name = "rps",
- rank = 1,
- cooldown = 10,
- func = function(str,user)
- local rps = {
- "rock",
- "paper",
- "scissors"
- }
- local symbols = {
- "πΏ",
- "π",
- "βοΈ"
- }
- if not table.find(rps,string.lower(str)) then
- errorln("Invalid selection; choose between: \n"..table.concat(rps,", "))
- return false
- else
- local roll = rps[math.random(1,#rps)] -- bot roll
- local proll = string.lower(str)
- local userid = user.name
- local moneygain = 0
- local message = ""
- if proll == "rock" then
- if roll == "rock" then
- message = "You tied"
- elseif roll == "paper" then
- moneygain = -7
- message = "Robot won! (-$7)"
- elseif roll == "scissors" then
- moneygain = 15
- message = "You won! (+$15)"
- end
- elseif proll == "paper" then
- if roll == "paper" then
- message = "You tied"
- elseif roll == "scissors" then
- moneygain = -7
- message = "Robot won! (-$7)"
- elseif roll == "rock" then
- moneygain = 15
- message = "You won! (+$15)"
- end
- elseif proll == "scissors" then
- if roll == "scissors" then
- message = "You tied"
- elseif roll == "rock" then
- moneygain = -7
- message = "Robot won! (-$7)"
- elseif roll == "paper" then
- moneygain = 15
- message = "You won! (+$15)"
- end
- end
- addMoney(moneygain,userid)
- if moneygain > 0 then
- println("π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅\n"..symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message.."\nπ΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅ π΅")
- elseif moneygain < 0 then
- println("π» π» π» π» π» π» π» π» π» π» π» π» π» π»\n"..symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message.."\nπ» π» π» π» π» π» π» π» π» π» π» π» π» π»")
- else
- println(symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message)
- end
- end
- end
- },
- setbalance = {
- name = "setbalance",
- rank = 2,
- cooldown = 0,
- func = function(str,user)
- local inputted = false
- while not inputted do
- local str = getUserInput("Do you want to set your own balance?\nYes, No",user)
- if string.lower(str) == "yes" or string.lower(str) == "no" then
- if string.lower(str) == "yes" then
- while not inputted do
- local str2 = getUserInput("What do you want to set your balance to?",user)
- if tonumber(str2) == nil then
- errorln("Invalid input recieved; expected a number")
- else
- accounts[user.name].balance = tonumber(str2)
- println("β Successfully set your balance to: $"..tostring(accounts[user.name].balance))
- saveData()
- inputted = true
- end
- end
- else
- local tab = {}
- local p = game:GetService("Players")
- for i,v in pairs(accounts) do
- table.insert(tab,getNameFromUserId(tonumber(v.name)))
- end
- while not inputted do
- local str = getUserInput("Which account balance do you wish to change?\n"..table.concat(tab,", "),user)
- for i,v in pairs(tab) do
- if string.lower(string.sub(v,1,#str)) == string.lower(str) then
- while not inputted do
- local str2 = getUserInput("What do you want to set your balance to?",user)
- if tonumber(str2) == nil then
- errorln("Invalid input recieved; expected a number")
- else
- local account = accounts[tostring(p:GetUserIdFromNameAsync(v))]
- account.balance = tonumber(str2)
- println("β Successfully set their balance to: $"..tostring(account.balance))
- saveData()
- inputted = true
- end
- end
- end
- end
- if not inputted then
- errorln("Invalid selection; choose between: \n"..table.concat(tab,", "))
- end
- end
- end
- else
- errorln("Invalid input recieved; expected either \"yes\" or \"no\"")
- end
- end
- end,
- },
- cmds = {
- name = "cmds",
- rank = 1,
- cooldown = 0,
- func = function(str,user)
- println("Your Commands:\n----------")
- for i,v in pairs(commands) do
- if user.rank >= v.rank then
- println(v.name)
- end
- end
- println("----------")
- end,
- }
- }
- coroutine.resume(coroutine.create(function()
- while true do -- screen render basically
- wait(0.1)
- if currentgui ~= nil then
- if tick() >= cursortime then
- cursortime = tick() + cursorblinktime
- cursor = not cursor
- end
- if cursor then
- currentgui.Text = currentinput..blinkcharacter
- else
- currentgui.Text = currentinput
- end
- end
- end
- end))
- coroutine.resume(coroutine.create(function()
- while true do
- wait(30)
- saveData()
- end
- end))
- local function shiftify(str)
- local bab = {
- ["1"] = "!",
- ["2"] = "@",
- ["3"] = "#",
- ["4"] = "$",
- ["5"] = "%",
- ["6"] = "^",
- ["7"] = "&",
- ["8"] = "*",
- ["9"] = "(",
- ["0"] = ")",
- ["-"] = "_",
- ["="] = "+",
- ["["] = "{",
- ["]"] = "}",
- ["\\"] = "|",
- [";"] = ":",
- ["'"] = '"',
- [","] = "<",
- ["."] = ">",
- ["/"] = "?",
- ["`"] = "~"
- }
- if bab[str] ~= nil then
- return bab[str]
- else
- return string.upper(str)
- end
- end
- remote.OnServerEvent:Connect(function(plr,typ,data)
- if plr == owner then
- if typ == "ready" then
- remote:FireClient(owner,"ready",{part})
- elseif typ == "Shift" then
- shift = data[1]
- inputtimer = tick() + 5
- elseif typ == "Enter" then
- enter:Fire(getUser(plr))
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- inputtimer = tick() + 5
- elseif typ == "KeyType" then
- if shift then
- currentinput = currentinput..shiftify(data[1])
- else
- currentinput = currentinput..string.lower(data[1])
- end
- if currentgui ~= nil then
- if cursor ~= nil then
- currentgui.Text = currentinput..blinkcharacter
- else
- currentgui.Text = currentinput
- end
- currentgui.Size = UDim2.new(1,0,0,currentgui.TextBounds.Y+38)
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- end
- inputtimer = tick() + 5
- elseif typ == "Backspace" then
- currentinput = string.sub(currentinput,1,#currentinput-1)
- inputtimer = tick() + 5
- end
- end
- end)
- local function inputChat(str,plr)
- local account = accounts[tostring(plr.UserId)]
- if account ~= nil and tick() > inputtimer and currentgui ~= nil and not chattyping then
- chattyping = true
- currentinput = ""
- for i=1,#str do
- currentinput = currentinput..string.sub(str,i,i)
- if cursor ~= nil then
- currentgui.Text = currentinput..blinkcharacter
- else
- currentgui.Text = currentinput
- end
- currentgui.Size = UDim2.new(1,0,0,currentgui.TextBounds.Y+38)
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- AccurateWait(0.025)
- end
- wait()
- enter:Fire(account)
- chattyping = false
- end
- end
- for i,plr in pairs(game:GetService("Players"):GetPlayers()) do
- plr.Chatted:Connect(function(msg)
- if string.sub(msg,1,1) == ">" then
- inputChat(string.sub(msg,2),plr)
- end
- end)
- end
- game:GetService("Players").PlayerAdded:Connect(function(plr)
- plr.Chatted:Connect(function(msg)
- if string.sub(msg,1,1) == ">" then
- inputChat(string.sub(msg,2),plr)
- end
- end)
- end)
- local gui = Instance.new("ScreenGui",owner.PlayerGui)
- gui.ResetOnSpawn = false
- NLS([[local remote = owner:WaitForChild("remememfordingypingy")
- local uis = game:GetService("UserInputService")
- local ts = game:GetService("TweenService")
- local part = nil
- local active = false
- local camcf = CFrame.new(0,0,0)
- remote:FireServer("ready")
- remote.OnClientEvent:Connect(function(typ,data)
- if typ == "ready" then
- part = data[1]
- end
- end)
- repeat wait() until part ~= nil
- local keycodes = {
- Enum.KeyCode.LeftAlt,
- Enum.KeyCode.RightAlt,
- Enum.KeyCode.LeftControl,
- Enum.KeyCode.LeftSuper,
- Enum.KeyCode.Left,
- Enum.KeyCode.Up,
- Enum.KeyCode.Right,
- Enum.KeyCode.Down,
- Enum.KeyCode.Tab,
- Enum.KeyCode.F1,
- Enum.KeyCode.F2,
- Enum.KeyCode.F3,
- Enum.KeyCode.F4,
- Enum.KeyCode.F5,
- Enum.KeyCode.F6,
- Enum.KeyCode.F7,
- Enum.KeyCode.F8,
- Enum.KeyCode.F9,
- Enum.KeyCode.F10,
- Enum.KeyCode.F11,
- Enum.KeyCode.F12,
- Enum.KeyCode.Insert,
- Enum.KeyCode.Delete,
- Enum.KeyCode.Home,
- Enum.KeyCode.PageUp,
- Enum.KeyCode.PageDown,
- Enum.KeyCode.Print,
- Enum.KeyCode.ScrollLock,
- Enum.KeyCode.CapsLock,
- Enum.KeyCode.Pause,
- Enum.KeyCode.NumLock,
- Enum.KeyCode.RightSuper,
- Enum.KeyCode.Menu
- }
- local function notKeycoders(keycode)
- for _,v in pairs(keycodes) do
- if v == keycode then
- return false
- end
- end
- return true
- end
- uis.InputBegan:Connect(function(input,gameprocessed)
- if input.UserInputType == Enum.UserInputType.Keyboard and not gameprocessed and active then
- if input.KeyCode == Enum.KeyCode.End then
- active = false
- local twen = ts:Create(workspace.CurrentCamera,TweenInfo.new(0.75,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{CFrame = camcf})
- twen:Play()
- wait(0.75)
- workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
- local hum = owner.Character:FindFirstChildOfClass("Humanoid")
- if hum ~= nil then
- hum.WalkSpeed = 16
- hum.UseJumpPower = true
- hum.JumpPower = 50
- end
- elseif input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
- remote:FireServer("Shift",{true})
- elseif input.KeyCode == Enum.KeyCode.Return then
- remote:FireServer("Enter")
- elseif input.KeyCode == Enum.KeyCode.Backspace then
- remote:FireServer("Backspace")
- elseif notKeycoders(input.KeyCode) then
- remote:FireServer("KeyType",{uis:GetStringForKeyCode(input.KeyCode)})
- end
- end
- end)
- uis.InputEnded:Connect(function(input,gameprocessed)
- if input.UserInputType == Enum.UserInputType.Keyboard and not gameprocessed and active then
- if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
- remote:FireServer("Shift",{false})
- end
- end
- end)
- local but = part.SurfaceGui.TextButton
- but.Parent = nil
- local but2 = but:Clone()
- but2.Parent = part.SurfaceGui
- but2.MouseButton1Click:Connect(function()
- if not active then
- workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
- camcf = workspace.CurrentCamera.CFrame
- local twen = ts:Create(workspace.CurrentCamera,TweenInfo.new(0.75,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{CFrame = part.CFrame * CFrame.new(0,0,-8) * CFrame.Angles(0,math.rad(180),0)})
- twen:Play()
- active = true
- local hum = owner.Character:FindFirstChildOfClass("Humanoid")
- if hum ~= nil then
- hum.WalkSpeed = 0
- hum.UseJumpPower = true
- hum.JumpPower = 0
- end
- end
- end)]],gui)
- while true do
- local ans,user = getInput("> What do you want to do?")
- wait()
- screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
- local spl = string.split(ans," ")
- local command = commands[spl[1]]
- if command ~= nil then
- if user.rank > 0 then
- if user.rank >= command.rank then
- if command.cooldown > 0 then
- local can = true
- for i,v in pairs(cache) do
- if v[1] == user.name and v[2] > os.time() and v[3] == command.name then
- can = false
- warningln("οΈοΈYou must wait "..tostring(v[2]-os.time()).." seconds before using this command again!")
- elseif v[1] == user.name and v[2] <= os.time() and v[3] == command.name then
- table.remove(cache,i)
- end
- end
- if can then
- table.remove(spl,1)
- local success = command.func(table.concat(spl," "),user)
- if success ~= false then
- table.insert(cache,{user.name,os.time()+command.cooldown,command.name})
- end
- end
- else
- table.remove(spl,1)
- command.func(table.concat(spl," "),user)
- end
- else
- errorln("Invalid permissions")
- end
- end
- else
- errorln("No such command: \""..ans.."\"")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement