Advertisement
BobMe

terminal

Feb 12th, 2023 (edited)
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.43 KB | None | 0 0
  1. -- hi TposeTShirtTSeries uwu
  2. -- made by @Memo1332 for Roblox
  3. Part0 = Instance.new("Part")
  4. SurfaceGui1 = Instance.new("SurfaceGui")
  5. ScrollingFrame2 = Instance.new("ScrollingFrame")
  6. TextLabel3 = Instance.new("TextLabel")
  7. TextButton4 = Instance.new("TextButton")
  8. Part0.Parent = script
  9. Part0.CFrame = CFrame.new(3.06085205, 4, 19.5075073, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  10. Part0.Size = Vector3.new(14, 8, 1)
  11. Part0.BottomSurface = Enum.SurfaceType.Smooth
  12. Part0.TopSurface = Enum.SurfaceType.Smooth
  13. Part0.Anchored = true
  14. SurfaceGui1.Parent = Part0
  15. SurfaceGui1.LightInfluence = 0
  16. SurfaceGui1.ClipsDescendants = true
  17. SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
  18. SurfaceGui1.CanvasSize = Vector2.new(1080, 720)
  19. SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  20. ScrollingFrame2.Parent = SurfaceGui1
  21. ScrollingFrame2.Size = UDim2.new(1, 0, 1, 0)
  22. ScrollingFrame2.Active = true
  23. ScrollingFrame2.BackgroundColor3 = Color3.new(0, 0, 0)
  24. ScrollingFrame2.CanvasSize = UDim2.new(0, 0, 0, 0)
  25. ScrollingFrame2.ElasticBehavior = Enum.ElasticBehavior.Always
  26. ScrollingFrame2.ScrollBarThickness = 10
  27. ScrollingFrame2.AutomaticCanvasSize = Enum.AutomaticSize.Y
  28. TextLabel3.Name = "Sample"
  29. TextLabel3.Parent = ScrollingFrame2
  30. TextLabel3.Position = UDim2.new(0, 10, 0, 0)
  31. TextLabel3.Size = UDim2.new(1, 0, 0, 45)
  32. TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
  33. TextLabel3.BackgroundTransparency = 1
  34. TextLabel3.Font = Enum.Font.Arcade
  35. TextLabel3.FontSize = Enum.FontSize.Size28
  36. TextLabel3.Text = "> What do you want to do?"
  37. TextLabel3.TextColor = BrickColor.new("Institutional white")
  38. TextLabel3.TextColor3 = Color3.new(1, 1, 1)
  39. TextLabel3.TextSize = 28
  40. TextLabel3.TextWrap = true
  41. TextLabel3.TextWrapped = true
  42. TextLabel3.TextXAlignment = Enum.TextXAlignment.Left
  43. TextLabel3.TextYAlignment = Enum.TextYAlignment.Top
  44. TextButton4.Parent = SurfaceGui1
  45. TextButton4.Size = UDim2.new(1, 0, 1, 0)
  46. TextButton4.BackgroundColor3 = Color3.new(1, 1, 1)
  47. TextButton4.BackgroundTransparency = 1
  48. TextButton4.ZIndex = 2
  49. TextButton4.Font = Enum.Font.SourceSans
  50. TextButton4.FontSize = Enum.FontSize.Size14
  51. TextButton4.Text = ""
  52. TextButton4.TextColor = BrickColor.new("Really black")
  53. TextButton4.TextColor3 = Color3.new(0, 0, 0)
  54. TextButton4.TextSize = 14
  55.  
  56. --local owner:Player = game.Players:WaitForChild("Memo1332")
  57. local remote = owner:FindFirstChild("remememfordingypingy")
  58. local part = Part0 -- temporary
  59. local screen = part.SurfaceGui -- maybe temporary
  60. local clon = screen.ScrollingFrame.Sample
  61. local enter = Instance.new("BindableEvent")
  62. if remote == nil then
  63. remote = Instance.new("RemoteEvent",owner)
  64. remote.Name = "remememfordingypingy"
  65. end
  66. clon.Parent = nil
  67.  
  68. local currenty = 0
  69. local cursorblinktime = 0.5 -- seconds
  70. local currenttick = tick()
  71. local cursortime = tick() + cursorblinktime
  72. local cursor = true
  73. local currentgui = nil
  74. local currentinput = ""
  75. local shift = false
  76. local inputtimer = tick()
  77. local chattyping = false
  78. local vsbmode = false -- ENABLE IF RAN ON VOIDACITY SCRIPT BUILDER
  79. local blinkcharacter = "_"
  80. local cache = {}
  81.  
  82. -- BUILT IN FUNCTIONS
  83. local function println(str)
  84. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  85. screen.ScrollingFrame.Visible = false
  86. if vsbmode then
  87. screen.Parent = nil
  88. end
  89. local clone = clon:Clone()
  90. clone.Parent = screen.ScrollingFrame
  91. screen.ScrollingFrame.Visible = true
  92. screen.Parent = part
  93. clone.Text = str
  94. clone.Position = UDim2.new(0,10,0,currenty)
  95. clone.Size = UDim2.new(1,0,0,400)
  96. currenty = currenty + clone.TextBounds.Y+10
  97. clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+10)
  98. if vsbmode then
  99. wait()
  100. end
  101. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  102. end
  103.  
  104. local RunService = game:GetService("RunService")
  105. local function AccurateWait(seconds)
  106. if not seconds then
  107. seconds = 0
  108. end
  109. local last = tick()
  110. local secondsPassed = 0
  111. local connection = RunService.Heartbeat:Connect(function(dt)
  112. secondsPassed = secondsPassed + dt
  113. end)
  114. repeat
  115. RunService.Heartbeat:Wait()
  116. until secondsPassed >= seconds
  117. connection:Disconnect()
  118. end
  119.  
  120. local function getInput(str)
  121. println(str)
  122. currentinput = ""
  123. screen.ScrollingFrame.Visible = false
  124. if vsbmode then
  125. screen.Parent = nil
  126. end
  127. local clone = clon:Clone()
  128. clone.Parent = screen.ScrollingFrame
  129. screen.Parent = part
  130. screen.ScrollingFrame.Visible = true
  131. clone.Text = " "
  132. clone.Position = UDim2.new(0,10,0,currenty)
  133. clone.Size = UDim2.new(1,0,0,58)
  134. currentgui = clone
  135. wait()
  136. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  137. local use = nil
  138. local ev = enter.Event:Connect(function(us)
  139. use = us
  140. end)
  141. repeat wait() until use ~= nil
  142. ev:Disconnect()
  143. currentgui = nil
  144. clone.Text = currentinput
  145. currenty = currenty + clone.TextBounds.Y+10
  146. clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+20)
  147. return currentinput,use
  148. end
  149.  
  150. local function getUserInput(str,user)
  151. println(str)
  152. currentinput = ""
  153. screen.ScrollingFrame.Visible = false
  154. if vsbmode then
  155. screen.Parent = nil
  156. end
  157. local clone = clon:Clone()
  158. clone.Parent = screen.ScrollingFrame
  159. screen.Parent = part
  160. screen.ScrollingFrame.Visible = true
  161. clone.Text = " "
  162. clone.Position = UDim2.new(0,10,0,currenty)
  163. clone.Size = UDim2.new(1,0,0,58)
  164. currentgui = clone
  165. wait()
  166. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  167. local use = nil
  168. local ev = enter.Event:Connect(function(us)
  169. use = us
  170. end)
  171. repeat wait() until use ~= nil and use.name == user.name
  172. ev:Disconnect()
  173. currentgui = nil
  174. clone.Text = currentinput
  175. currenty = currenty + clone.TextBounds.Y+10
  176. clone.Size = UDim2.new(1,0,0,clone.TextBounds.Y+20)
  177. return currentinput,use
  178. end
  179.  
  180. local function errorln(str)
  181. println("❌ "..str)
  182. end
  183.  
  184. local function warningln(str)
  185. println("⚠️ "..str)
  186. end
  187.  
  188. -- END OF BUILT IN FUNCTIONS
  189.  
  190. -- SERVICE FUNCTIONS
  191. local usercache = {}
  192.  
  193. function getNameFromUserId(userId)
  194. -- First, check if the cache contains 'userId'
  195. local nameFromCache = usercache[userId]
  196. if nameFromCache then
  197. -- if a value was stored in the cache at key 'userId', then this 'nameFromCache'
  198. -- is the correct Name and we can return it.
  199. return nameFromCache
  200. end
  201.  
  202. -- If here, 'userId' was not previously looked up and does not exist in the
  203. -- cache. Now we need to use GetNameFromUserIdAsync() to look up the name
  204. local name
  205. local success, _ = pcall(function()
  206. name = game:GetService("Players"):GetNameFromUserIdAsync(userId)
  207. end)
  208. if success then
  209. -- if 'success' is true, GetNameFromUserIdAsync() successfully found the
  210. -- name. Store this name in the cache using 'userId' as the key so we
  211. -- never have to look this name up in the future. Then return name.
  212. usercache[userId] = name
  213. return name
  214. end
  215. -- If here, 'success' was false, meaning GetNameFromUserIdAsync()
  216. -- was unable to find the 'name' for the 'userId' provided. Warn the user
  217. -- this happened and then return nothing, or nil.
  218. warn("Unable to find Name for UserId:", userId)
  219. return nil
  220. end
  221. local function getPlayer(str)
  222. local name = ""
  223. if string.sub(str,1,1) == "@" then
  224. name = string.sub(str,2)
  225. for i,v in pairs(game.Players:GetPlayers()) do
  226. if string.lower(string.sub(v.Name,1,#name)) == string.lower(name) then
  227. return v
  228. end
  229. end
  230. else
  231. name = str
  232. for i,v in pairs(game.Players:GetPlayers()) do
  233. if string.lower(string.sub(v.Name,1,#name)) == string.lower(name) then
  234. return v
  235. end
  236. end
  237. end
  238. end
  239. -- END OF SERVICE FUNCTIONS
  240.  
  241. local accountdatastore = game:GetService("DataStoreService"):GetDataStore("terminaldingy1107")
  242. local accounts = accountdatastore:GetAsync("accounts")
  243. if accounts == nil then
  244. accounts = { -- dictionary housing all players who are allowed to use the terminal + rank
  245. [tostring(owner.UserId)] = {
  246. name = tostring(owner.UserId),
  247. rank = 2, -- 0 no perms, 1 normal perms, 2 admin perms
  248. balance = 0
  249. }
  250. }
  251. end
  252.  
  253. local function getUser(plr)
  254. return accounts[tostring(plr.UserId)]
  255. end
  256.  
  257. local function saveData()
  258. accountdatastore:SetAsync("accounts",accounts)
  259. end
  260.  
  261. local function addMoney(num,userid)
  262. local account = accounts[tostring(userid)]
  263. account.balance = account.balance + num
  264. end
  265.  
  266.  
  267. local commands = nil
  268. commands = { -- dictionary housing all commands including "cmds"
  269. bring = {
  270. name = "bring",
  271. rank = 2,
  272. cooldown = 0,
  273. func = function(str,user)
  274. local plr = game:GetService("Players"):GetPlayerByUserId(tonumber(user.name))
  275. part.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,2,-4) * CFrame.Angles(0,math.rad(180),0)
  276. end,
  277. },
  278. balance = {
  279. name = "balance",
  280. rank = 1,
  281. cooldown = 0,
  282. func = function(str,user)
  283. println("Your balance is: $"..tostring(user.balance))
  284. end,
  285. },
  286. clear = {
  287. name = "clear",
  288. rank = 1,
  289. cooldown = 0,
  290. func = function(str,user)
  291. currenty = 0
  292. part.SurfaceGui.ScrollingFrame:ClearAllChildren()
  293. println("Cleared terminal")
  294. end,
  295. },
  296. addaccount = {
  297. name = "addaccount",
  298. rank = 2,
  299. cooldown = 0,
  300. func = function(str,user)
  301. local inputted = false
  302. while not inputted do
  303. local plrs = game:GetService("Players"):GetPlayers()
  304. local plrspart2 = {}
  305. for i,v in pairs(plrs) do
  306. table.insert(plrspart2,v.Name)
  307. end
  308. local str = getUserInput("Select a player to add:\n"..table.concat(plrspart2,", "),user)
  309. for i,v in pairs(plrs) do
  310. if string.lower(string.sub(v.Name,1,#str)) == string.lower(str) then
  311. local exists = false
  312. for i,vv in pairs(accounts) do
  313. if tostring(vv.name) == tostring(v.UserId) then
  314. exists = true
  315. break
  316. end
  317. end
  318. if exists then
  319. inputted = true
  320. errorln("This player already has an account.")
  321. else
  322. while not inputted do
  323. local str = getUserInput("Give this player administrator permissions?\nYes, No",user)
  324. if string.lower(str) == "yes" then
  325. accounts[tostring(v.UserId)] = {
  326. name = tostring(v.UserId),
  327. rank = 2,
  328. balance = 0
  329. }
  330. saveData()
  331. inputted = true
  332. elseif string.lower(str) == "no" then
  333. accounts[tostring(v.UserId)] = {
  334. name = tostring(v.UserId),
  335. rank = 1,
  336. balance = 0
  337. }
  338. saveData()
  339. inputted = true
  340. else
  341. errorln("Not a valid selection; Yes, No")
  342. end
  343. end
  344. end
  345. end
  346. end
  347. if not inputted then
  348. local plrs = game:GetService("Players"):GetPlayers()
  349. errorln("Not a valid selection;")
  350. end
  351. end
  352. end,
  353. },
  354. search = {
  355. name = "search",
  356. rank = 1,
  357. cooldown = 30,
  358. func = function(str,user)
  359. local searchplaces = { -- name, troublechance, min, max, nothingchance,
  360. {"the garage","garage",10,15,20,30,{"under a box", "in the toolshed", "on the ceiling", "on the floor"}},
  361. {"your room","room",0,2,10,50,{"under your bed", "in the closet", "in your shoe"}},
  362. {"your parents' room","parents",30,20,80,50,{"under the bed","in the closet","in a drawer"}},
  363. {"the bathroom","bathroom",5,10,30,40,{"in the toilet","on the counter","in the shower","on the floor","underneath a mat"}},
  364. {"the bank","bank",50,90,200,0,{"in the vault"}},
  365. {"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"}},
  366. {"the kitchen","kitchen",10,5,30,40,{"under the fridge","in the cabinet","in the fridge","in the sink","in the dishwasher"}},
  367. {"the livingroom","livingroom",10,10,40,0,{"under the couch","in the couch","under the rug","taped to the ceiling"}},
  368. {"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"}},
  369. {"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"}},
  370. {"mcdonalds","mcdonalds",10,1,3,0,{"in a burger","on the floor","under a desk","from thin air"}},
  371. {"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"}},
  372. {"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"}},
  373. {"the air","air",0,500,1000,85,{"out of thin air","by pure chance","some how","??? what??"}},
  374. {"the ground","ground",25,25,175,30,{"by digging straight down","after selling the diamonds you mined","in the nether"}},
  375. {"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"}}
  376.  
  377. --{"","",10,1,20,0,{"",""}}
  378. }
  379. local can = true
  380. if can then
  381. local places = {}
  382. for i=1,3 do
  383. local place = nil
  384. while place == nil do
  385. place = searchplaces[math.random(1,#searchplaces)]
  386. for i,v in pairs(places) do
  387. if place ~= nil and v[2] == place[2] then
  388. place = nil
  389. end
  390. end
  391. end
  392. table.insert(places,place)
  393. end
  394. println("πŸ” Choose a place to search:")
  395. local i = nil
  396. while i == nil do
  397. i = getInput(places[1][2]..", "..places[2][2]..", or "..places[3][2])
  398. 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
  399. println("⚠️ That's not a valid choice.")
  400. i = nil
  401. else
  402. if string.lower(i) == string.lower(places[1][2]) then
  403. i = places[1]
  404. elseif string.lower(i) == string.lower(places[2][2]) then
  405. i = places[2]
  406. elseif string.lower(i) == string.lower(places[3][2]) then
  407. i = places[3]
  408. end
  409. end
  410. end
  411. local trouble = math.random(1,100)
  412. if trouble < i[3] then
  413. println("❗ You were caught and fined $"..tostring(i[5]))
  414. addMoney(i[5]*-1,user.name)
  415. else
  416. local nothing = math.random(1,100)
  417. if nothing < i[6] then
  418. println("πŸ—‘ You searched "..i[1].." and found nothing of value.")
  419. else
  420. local mone = math.random(i[4],i[5])
  421. local text = i[7][math.random(1,#i[7])]
  422. println("πŸ’΅ You searched "..i[1].." and found $"..tostring(mone).." "..text)
  423. addMoney(mone,user.name)
  424. end
  425. end
  426. end
  427. end,
  428. },
  429. work = {
  430. name = "work",
  431. rank = 1,
  432. cooldown = 30,
  433. func = function(str,user)
  434. local can = true
  435. if can then
  436. local jobs = {"scramble","typ","math"}
  437. local job = jobs[math.random(1,#jobs)]
  438. local data = {
  439. scramble = {
  440. "trophy",
  441. "discord",
  442. "love",
  443. "memo",
  444. "donut",
  445. "roblox",
  446. "minecraft",
  447. "bottle",
  448. "racecar",
  449. "apple",
  450. "jelly",
  451. "bean",
  452. "coffee",
  453. "ouch",
  454. "steve",
  455. "alex",
  456. "pickaxe",
  457. "shovel",
  458. "scramble",
  459. "lotion",
  460. "pink",
  461. "red",
  462. "magenta",
  463. "blue",
  464. "rock",
  465. "roll",
  466. "barrel",
  467. "gold",
  468. "silver",
  469. "potato",
  470. "carrot",
  471. "book"
  472. },
  473. typ = {
  474. "Imagine having to type this through chat, lol that would really suck",
  475. "These sentences do not contain periods because some games literally interfere with the terminal's period button",
  476. "Who knew a terminal bot could be so addicting to develop and play with",
  477. "This terminal was made as a recreation to a bot I made on replit (website to make software with)",
  478. "Memo1332 was the first account to be added to the terminal",
  479. "The only difference between admins and normal users is that admins can delete and modify accounts",
  480. "silly billy you can't be silly!!"
  481. }
  482. }
  483. if job == "scramble" then
  484. local word = ""
  485. local tab = {}
  486. local c = data[job][math.random(1,#data[job])]
  487. for i=1,#c do
  488. table.insert(tab,string.sub(c,i,i))
  489. end
  490. while #tab > 0 do
  491. local t = math.random(1,#tab)
  492. word = word..tab[t]
  493. table.remove(tab,t)
  494. end
  495. local timbegin = os.time()
  496. local ans = getInput("πŸ€” Unscramble this word as quickly as possible: "..word)
  497. local timend = os.time()
  498. if string.lower(ans) == string.lower(c) then
  499. --((10-os.clock())*3)+20
  500. local bonus = math.floor((10-(timend-timbegin))*3)
  501. if bonus > 0 then
  502. println("πŸ’΅ You got it! You earned $20 and another $"..tostring(bonus).." for your efficiency!")
  503. addMoney(20 + bonus,user.name)
  504. else
  505. println("πŸ’΅ You got it! You earned $20")
  506. addMoney(20,user.name)
  507. end
  508. else
  509. println("❌ You failed your job, the correct answer was: "..c..".")
  510. end
  511. elseif job == "typ" then
  512. local c = data[job][math.random(1,#data[job])]
  513. local timebegin = os.time()
  514. local ans = getInput("πŸ€” Type this phrase as quickly as possible:\n"..c)
  515. local timeend = os.time()
  516. local money = 0
  517. if ans == c then
  518. local bonus = math.floor((20-(timeend-timebegin))*2)
  519. if bonus > 0 then
  520. println("πŸ’΅ You got it! You earned $40 and another $"..tostring(bonus).." for your efficiency!")
  521. money = money + 40 + bonus
  522. else
  523. println("πŸ’΅ You got it! You earned $40!")
  524. money = money + 40
  525. end
  526. addMoney(money,user.name)
  527. elseif string.lower(ans) == string.lower(c) then
  528. println("πŸ’΅ You got it, but you made a mistake on your capitilization. So you only earned $20.")
  529. money = money + 20
  530. addMoney(money,user.name)
  531. else
  532. -- find the error
  533. local erro
  534. local nerro
  535. local berro
  536. for i=1,#c do
  537. if string.lower(string.sub(c,i,i)) ~= string.lower(string.sub(ans,i,i)) and erro == nil then
  538. for ii=1,i do
  539. if string.sub(ans,i-ii+1,i-ii+1) == " " or ii == i then
  540. erro = i-ii+1
  541. if string.sub(ans,i-ii+1,i-ii+1) == " " then
  542. erro = erro + 1
  543. end
  544. break
  545. end
  546. end
  547. elseif (string.sub(ans,i,i) == " " or i == #c) and erro ~= nil then
  548. if i ~= #c then
  549. nerro = i-1
  550. else
  551. nerro = i
  552. end
  553. for ii=erro,#c do
  554. if string.sub(c,ii,ii) == " " or ii == #c then
  555. berro = ii
  556. if ii ~= #c then
  557. berro = berro - 1
  558. end
  559. break
  560. end
  561. end
  562. break
  563. end
  564. end
  565. println("❌ You failed your job because you made a mistake, '"..string.sub(ans,erro,nerro).."' should of been '"..string.sub(c,erro,berro).."'.")
  566. end
  567. elseif job == "math" then
  568. local h = {"*","/","+","-"}
  569. local h = h[math.random(1,#h)]
  570. local bonus
  571. local expect
  572. local ans
  573. if h == "/" then
  574. local num2 = math.random(1,12)
  575. local num1a = math.random(1,3)
  576. local num1 = num2*num1a
  577. expect = num1/num2
  578. local timbegin = os.time()
  579. ans = getInput("πŸ€” What is "..tostring(num1).." divided by "..tostring(num2).."?")
  580. local timend = os.time()
  581. bonus = math.floor((20-(timend-timbegin))*2)
  582. elseif h == "*" then
  583. local num1 = math.random(-30,30)
  584. local num2 = math.random(-20,20)
  585. expect = num1*num2
  586. local timbegin = os.time()
  587. ans = getInput("πŸ€” What is "..tostring(num1).." times "..tostring(num2).."?")
  588. local timend = os.time()
  589. bonus = math.floor((15-(timend-timbegin))*2.33333333)
  590. elseif h == "+" then
  591. local num1 = math.random(-30,30)
  592. local num2 = math.random(-30,30)
  593. expect = num1+num2
  594. local timbegin = os.time()
  595. ans = getInput("πŸ€” What is "..tostring(num1).." plus "..tostring(num2).."?")
  596. local timend = os.time()
  597. bonus = math.floor((10-(timend-timbegin))*4)
  598. elseif h == "-" then
  599. local num1 = math.random(-30,30)
  600. local num2 = math.random(-30,30)
  601. expect = num1-num2
  602. local timbegin = os.time()
  603. ans = getInput("πŸ€” What is "..tostring(num1).." minus "..tostring(num2).."?")
  604. local timend = os.time()
  605. bonus = math.floor((10-(timend-timbegin))*4)
  606. end
  607. if tonumber(ans) == nil then
  608. println("❌ You failed your job because you didn't even provide a number, and as a result you have lost -$1 for being dumb.")
  609. addMoney(-1,user.name)
  610. elseif tonumber(ans) ~= expect then
  611. println("❌ You failed your job because you didnt not give the right answer, which was: "..tostring(expect))
  612. elseif bonus > 0 then
  613. println("πŸ’΅ You got it! You earned $40".." and another $"..tostring(bonus).." for your efficiency!")
  614. addMoney(40 + bonus,user.name)
  615. else
  616. println("πŸ’΅ You got it! You earned $40!")
  617. addMoney(40,user.name)
  618. end
  619. end
  620. end
  621. end,
  622. },
  623. gamble = {
  624. name = "gamble",
  625. rank = 1,
  626. cooldown = 10,
  627. func = function(str,user)
  628. local num = tonumber(str)
  629. while num == nil do
  630. num = getInput("How much are you willing to gamble?")
  631. num = tonumber(num)
  632. if num == nil then
  633. println("⚠️ That is not a number.")
  634. elseif num <= 0 then
  635. println("⚠️ Grow a brain and try again.")
  636. num = nil
  637. elseif num > user.balance then
  638. println("⚠️ You only have $"..tostring(user.balance))
  639. num = nil
  640. end
  641. end
  642. if num ~= nil and num <= user.balance and num > 0 then
  643. local yourroll = math.random(1,12)
  644. local botroll = math.random(1,12)
  645. local percent = math.random(50,150)
  646. local winnings = math.floor(num*(percent/100))
  647. local money = 0
  648. if yourroll > botroll then
  649. 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πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅")
  650. money = money + winnings
  651. else
  652. println("πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»\n You gambled: $"..tostring(num).."\n You rolled: "..tostring(yourroll).."\n Bot rolled: "..tostring(botroll).."\n You lost: $"..tostring(num).."\nπŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»")
  653. money = money - num
  654. end
  655. addMoney(money,user.name)
  656. elseif num == nil then
  657. println("⚠️ Enter a real number, dummy.")
  658. elseif num > user.balance then
  659. println("⚠️ You don't even have that amount of cash lol.")
  660. elseif num < 0 then
  661. println("⚠️ Money doesn't work like that.")
  662. end
  663. end,
  664. },
  665. cup = {
  666. name = "cup",
  667. rank = 1,
  668. cooldown = 30,
  669. func = function(str,user)
  670. local ans = tonumber(str)
  671. if ans == nil or ans > user.balance or ans < 0 then ans = nil end
  672. while ans == nil do
  673. ans = getInput("How much are you willing to bet?")
  674. ans = tonumber(ans)
  675. if ans == nil then
  676. println("⚠️ That is not a number.")
  677. elseif ans <= 0 then
  678. println("⚠️ Grow a brain and try again.")
  679. ans = nil
  680. elseif ans > user.balance then
  681. println("⚠️ You only have $"..tostring(user.balance))
  682. ans = nil
  683. end
  684. end
  685. local amount = math.random(2,5)
  686. local cups = math.random(3,4)
  687. local roll = math.random(1,cups)
  688. local ans2 = nil
  689. while ans2 == nil do
  690. 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)..".")
  691. ans2 = tonumber(ans2)
  692. if ans2 == nil then
  693. println("⚠️ That's not even a number you dumb.")
  694. elseif ans2 <= 0 then
  695. println("⚠️ That answer is simpily stupid.")
  696. ans = nil
  697. elseif ans2 > cups then
  698. println("⚠️ I said "..tostring(cups).." cups not whatever '"..tostring(ans2).."' is.")
  699. ans = nil
  700. else
  701. if ans2 == roll then
  702. println("πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅\nYou lift up cup #"..ans2.." and find the ball underneath it.\nYou won: $"..tostring((ans*amount)-ans).."\nπŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅")
  703. addMoney((ans*amount)-ans,user.name)
  704. else
  705. println("πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»\nYou lift up cup #"..ans2.." and find nothing but air underneath it.\nWinning cup: "..tostring(roll).."\nYou lost: $"..tostring(ans).."\nπŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»")
  706. addMoney(ans*-1,user.name)
  707. end
  708. end
  709. end
  710. end,
  711. },
  712. modifyaccount = {
  713. name = "modifyaccount",
  714. rank = 2,
  715. cooldown = 0,
  716. func = function(str,user)
  717. local tab = {}
  718. local p = game:GetService("Players")
  719. for i,v in pairs(accounts) do
  720. table.insert(tab,getNameFromUserId(tonumber(v.name)))
  721. end
  722. local inputted = false
  723. while not inputted do
  724. local str = getUserInput("Which account do you wish to modify?\n"..table.concat(tab,", "),user)
  725. for i,v in pairs(tab) do
  726. if string.lower(string.sub(v,1,#str)) == string.lower(str) then
  727. while not inputted do
  728. local str2 = getUserInput("What would you like to do?\nChange rank, Delete account",user)
  729. if string.lower(str2) == "change rank" then
  730. local userid = tostring(p:GetUserIdFromNameAsync(v))
  731. local account = accounts[userid]
  732. if user.name ~= account.name then
  733. if account.name ~= tostring(owner.UserId) then
  734. println("Current player rank: "..tostring(account.rank))
  735. while not inputted do
  736. local str3 = getUserInput("What should be their new rank?",user)
  737. if tonumber(str3) == nil then
  738. errorln("Invalid input recieved; expected a number")
  739. else
  740. account.rank = tonumber(str3)
  741. println("βœ… Successfully their rank to: "..tostring(account.rank))
  742. saveData()
  743. inputted = true
  744. end
  745. end
  746. else
  747. errorln("That account's rank is higher than yours.")
  748. inputted = true
  749. end
  750. else
  751. errorln("You cannot change your own account's rank.")
  752. inputted = true
  753. end
  754. elseif string.lower(str2) == "delete account" then
  755. local userid = tostring(p:GetUserIdFromNameAsync(v))
  756. if tostring(userid) ~= user.name then
  757. if userid ~= owner.UserId then
  758. accounts[userid] = nil
  759. saveData()
  760. println("βœ… Successfully deleted account")
  761. else
  762. errorln("That account's rank is higher than yours.")
  763. inputted = true
  764. end
  765. else
  766. errorln("You cannot delete your own account.")
  767. inputted = true
  768. end
  769. inputted = true
  770. else
  771. errorln("Invalid selection")
  772. end
  773. end
  774. end
  775. end
  776. if not inputted then
  777. errorln("Invalid selection")
  778. end
  779. end
  780. end,
  781. },
  782. leaderboard = {
  783. name = "leaderboard",
  784. rank = 1,
  785. cooldown = 0,
  786. func = function(str,user)
  787. local p = game:GetService("Players")
  788. local acs = {}
  789. local p = game:GetService("Players")
  790. local function len(t)
  791. local n = 0
  792.  
  793. for _ in pairs(t) do
  794. n = n + 1
  795. end
  796. return n
  797. end
  798. local function hasBalance(num)
  799. for i,v in pairs(acs) do
  800. if v == num then
  801. return true
  802. end
  803. end
  804. return false
  805. end
  806. local count = 0
  807.  
  808. while len(acs) ~= len(accounts) do
  809. count = count + 1
  810. if count == 11 then
  811. break
  812. end
  813. local maxnum = math.huge*-1
  814. local remember = 0
  815. for i,v in pairs(accounts) do
  816. if v.balance > maxnum and not hasBalance(v.name) then
  817. maxnum = v.balance
  818. remember = v.name
  819. end
  820. end
  821. local account = accounts[remember]
  822. if account ~= nil then
  823. if account.balance == nil then
  824. account.balance = 0
  825. end
  826. table.insert(acs,account.name)
  827. local symb = " @"
  828. if #acs == 1 then
  829. symb = "πŸ₯‡@"
  830. elseif #acs == 2 then
  831. symb = "πŸ₯ˆ@"
  832. elseif #acs == 3 then
  833. symb = "πŸ₯‰@"
  834. end
  835. println(symb..getNameFromUserId(tonumber(account.name))..": $"..tostring(account.balance))
  836. end
  837. end
  838. end,
  839. },
  840. listaccounts = {
  841. name = "listaccounts",
  842. rank = 2,
  843. cooldown = 0,
  844. func = function(str,user)
  845. local tab = {}
  846. local p = game:GetService("Players")
  847. for i,v in pairs(accounts) do
  848. table.insert(tab,getNameFromUserId(tonumber(v.name)))
  849. end
  850. println(table.concat(tab,", "))
  851. end,
  852. },
  853. sudo = {
  854. name = "sudo",
  855. rank = 2,
  856. cooldown = 0,
  857. func = function(str2,user)
  858. local tab = {}
  859. local str = {}
  860. str2 = string.split(str2," ")
  861. for i,v in pairs(str2) do
  862. if v ~= "" and v ~= " " then
  863. table.insert(str,v)
  864. end
  865. end
  866. print(#str)
  867. local p = game:GetService("Players")
  868. for i,v in pairs(accounts) do
  869. table.insert(tab,getNameFromUserId(tonumber(v.name)))
  870. end
  871. local account = nil
  872. local inputted = false
  873. local input = "kjlnbsedfkbhjsedfgkbjhnlsdgfkbhjsdfgkbjhdfsgkbjhdfgskjbhfdgbjkhfdgs"
  874. if #str < 1 then
  875. input = getUserInput("Which account balance do you wish to sudo?\n"..table.concat(tab,", "),user)
  876. else
  877. input = str[1]
  878. end
  879. while not inputted do
  880. for i,v in pairs(tab) do
  881. if string.lower(string.sub(v,1,#input)) == string.lower(input) then
  882. account = accounts[tostring(p:GetUserIdFromNameAsync(v))]
  883. inputted = true
  884. end
  885. end
  886. if not inputted then
  887. input = getUserInput("Invalid selection; choose between: \n"..table.concat(tab,", "),user)
  888. end
  889. end
  890. local input2 = nil
  891. local command = ""
  892. if #str < 2 then
  893. command = getUserInput("> What command do you want this user to run?",user)
  894. else
  895. table.remove(str,1)
  896. command = table.concat(str," ")
  897. end
  898. local spl = string.split(command," ")
  899. local command = commands[spl[1]]
  900. local user = account
  901. if command ~= nil then
  902. if user.rank > 0 then
  903. if user.rank >= command.rank then
  904. if command.cooldown > 0 then
  905. local can = true
  906. for i,v in pairs(cache) do
  907. if v[1] == user.name and v[2] > os.time() and v[3] == command.name then
  908. can = false
  909. warningln("️️You must wait "..tostring(v[2]-os.time()).." seconds before using this command again!")
  910. elseif v[1] == user.name and v[2] <= os.time() and v[3] == command.name then
  911. table.remove(cache,i)
  912. end
  913. end
  914. if can then
  915. table.remove(spl,1)
  916. local success = command.func(table.concat(spl," "),user)
  917. if success ~= false then
  918. table.insert(cache,{user.name,os.time()+command.cooldown,command.name})
  919. end
  920. end
  921. else
  922. table.remove(spl,1)
  923. command.func(table.concat(spl," "),user)
  924. end
  925. else
  926. errorln("Invalid permissions")
  927. end
  928. end
  929. else
  930. errorln("No such command: \""..command.."\"")
  931. end
  932. end,
  933. },
  934. fixaccounts = {
  935. name = "fixaccounts",
  936. rank = 2,
  937. cooldown = 0,
  938. func = function(str,user)
  939. local tab = {}
  940. local p = game:GetService("Players")
  941. local count = 0
  942. local d = {}
  943. for i,v in pairs(accounts) do
  944. if v == nil or v.balance == nil or v.rank == nil or v.name == nil then
  945. count = count + 1
  946. if v.name ~= nil then
  947. v.balance = v.balance or 0
  948. v.rank = v.rank or 1
  949. table.insert(d,v.name)
  950. else
  951. accounts[i] = nil
  952. println("ACCOUNT DELETED")
  953. end
  954. end
  955. end
  956. println(tostring(count).." accounts fixed:")
  957. for i,v in pairs(d) do
  958. table.insert(tab,getNameFromUserId(tonumber(v)))
  959. end
  960. println(table.concat(tab,", "))
  961. end,
  962. },
  963. ["8ball"] = {
  964. name = "8ball",
  965. rank = 1,
  966. cooldown = 0,
  967. func = function(str,user)
  968. local responces = {
  969. "As I see it, yes.",
  970. "Ask again later.",
  971. "Better not tell you now.",
  972. "Cannot predict now.",
  973. "Concentrate and ask again.",
  974. "Don’t count on it.",
  975. "It is certain.",
  976. "It is decidedly so.",
  977. "Most likely.",
  978. "My reply is no.",
  979. "My sources say no.",
  980. "Outlook not so good.",
  981. "Outlook good.",
  982. "Reply hazy, try again.",
  983. "Signs point to yes.",
  984. "Very doubtful.",
  985. "Without a doubt.",
  986. "Yes.",
  987. "Yes – definitely.",
  988. "You may rely on it."
  989. }
  990. println("🎱 "..responces[math.random(1,#responces)])
  991. end,
  992. },
  993. rps = {
  994. name = "rps",
  995. rank = 1,
  996. cooldown = 10,
  997. func = function(str,user)
  998. local rps = {
  999. "rock",
  1000. "paper",
  1001. "scissors"
  1002. }
  1003. local symbols = {
  1004. "πŸ—Ώ",
  1005. "πŸ“ƒ",
  1006. "βœ‚οΈ"
  1007. }
  1008. if not table.find(rps,string.lower(str)) then
  1009. errorln("Invalid selection; choose between: \n"..table.concat(rps,", "))
  1010. return false
  1011. else
  1012. local roll = rps[math.random(1,#rps)] -- bot roll
  1013. local proll = string.lower(str)
  1014. local userid = user.name
  1015. local moneygain = 0
  1016. local message = ""
  1017. if proll == "rock" then
  1018. if roll == "rock" then
  1019. message = "You tied"
  1020. elseif roll == "paper" then
  1021. moneygain = -7
  1022. message = "Robot won! (-$7)"
  1023. elseif roll == "scissors" then
  1024. moneygain = 15
  1025. message = "You won! (+$15)"
  1026. end
  1027. elseif proll == "paper" then
  1028. if roll == "paper" then
  1029. message = "You tied"
  1030. elseif roll == "scissors" then
  1031. moneygain = -7
  1032. message = "Robot won! (-$7)"
  1033. elseif roll == "rock" then
  1034. moneygain = 15
  1035. message = "You won! (+$15)"
  1036. end
  1037. elseif proll == "scissors" then
  1038. if roll == "scissors" then
  1039. message = "You tied"
  1040. elseif roll == "rock" then
  1041. moneygain = -7
  1042. message = "Robot won! (-$7)"
  1043. elseif roll == "paper" then
  1044. moneygain = 15
  1045. message = "You won! (+$15)"
  1046. end
  1047. end
  1048. addMoney(moneygain,userid)
  1049. if moneygain > 0 then
  1050. println("πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅\n"..symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message.."\nπŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅ πŸ’΅")
  1051. elseif moneygain < 0 then
  1052. println("πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»\n"..symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message.."\nπŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”» πŸ”»")
  1053. else
  1054. println(symbols[table.find(rps,proll)].." You chose: "..proll.." | Robot chose: "..roll.." "..symbols[table.find(rps,roll)].."\n"..message)
  1055. end
  1056. end
  1057. end
  1058. },
  1059. setbalance = {
  1060. name = "setbalance",
  1061. rank = 2,
  1062. cooldown = 0,
  1063. func = function(str,user)
  1064. local inputted = false
  1065. while not inputted do
  1066. local str = getUserInput("Do you want to set your own balance?\nYes, No",user)
  1067. if string.lower(str) == "yes" or string.lower(str) == "no" then
  1068. if string.lower(str) == "yes" then
  1069. while not inputted do
  1070. local str2 = getUserInput("What do you want to set your balance to?",user)
  1071. if tonumber(str2) == nil then
  1072. errorln("Invalid input recieved; expected a number")
  1073. else
  1074. accounts[user.name].balance = tonumber(str2)
  1075. println("βœ… Successfully set your balance to: $"..tostring(accounts[user.name].balance))
  1076. saveData()
  1077. inputted = true
  1078. end
  1079. end
  1080. else
  1081. local tab = {}
  1082. local p = game:GetService("Players")
  1083. for i,v in pairs(accounts) do
  1084. table.insert(tab,getNameFromUserId(tonumber(v.name)))
  1085. end
  1086. while not inputted do
  1087. local str = getUserInput("Which account balance do you wish to change?\n"..table.concat(tab,", "),user)
  1088. for i,v in pairs(tab) do
  1089. if string.lower(string.sub(v,1,#str)) == string.lower(str) then
  1090. while not inputted do
  1091. local str2 = getUserInput("What do you want to set your balance to?",user)
  1092. if tonumber(str2) == nil then
  1093. errorln("Invalid input recieved; expected a number")
  1094. else
  1095. local account = accounts[tostring(p:GetUserIdFromNameAsync(v))]
  1096. account.balance = tonumber(str2)
  1097. println("βœ… Successfully set their balance to: $"..tostring(account.balance))
  1098. saveData()
  1099. inputted = true
  1100. end
  1101. end
  1102. end
  1103. end
  1104. if not inputted then
  1105. errorln("Invalid selection; choose between: \n"..table.concat(tab,", "))
  1106. end
  1107. end
  1108. end
  1109. else
  1110. errorln("Invalid input recieved; expected either \"yes\" or \"no\"")
  1111. end
  1112. end
  1113. end,
  1114. },
  1115. cmds = {
  1116. name = "cmds",
  1117. rank = 1,
  1118. cooldown = 0,
  1119. func = function(str,user)
  1120. println("Your Commands:\n----------")
  1121. for i,v in pairs(commands) do
  1122. if user.rank >= v.rank then
  1123. println(v.name)
  1124. end
  1125. end
  1126. println("----------")
  1127. end,
  1128. }
  1129. }
  1130.  
  1131. coroutine.resume(coroutine.create(function()
  1132. while true do -- screen render basically
  1133. wait(0.1)
  1134. if currentgui ~= nil then
  1135. if tick() >= cursortime then
  1136. cursortime = tick() + cursorblinktime
  1137. cursor = not cursor
  1138. end
  1139. if cursor then
  1140. currentgui.Text = currentinput..blinkcharacter
  1141. else
  1142. currentgui.Text = currentinput
  1143. end
  1144. end
  1145. end
  1146. end))
  1147.  
  1148. coroutine.resume(coroutine.create(function()
  1149. while true do
  1150. wait(30)
  1151. saveData()
  1152. end
  1153. end))
  1154.  
  1155.  
  1156. local function shiftify(str)
  1157. local bab = {
  1158. ["1"] = "!",
  1159. ["2"] = "@",
  1160. ["3"] = "#",
  1161. ["4"] = "$",
  1162. ["5"] = "%",
  1163. ["6"] = "^",
  1164. ["7"] = "&",
  1165. ["8"] = "*",
  1166. ["9"] = "(",
  1167. ["0"] = ")",
  1168. ["-"] = "_",
  1169. ["="] = "+",
  1170. ["["] = "{",
  1171. ["]"] = "}",
  1172. ["\\"] = "|",
  1173. [";"] = ":",
  1174. ["'"] = '"',
  1175. [","] = "<",
  1176. ["."] = ">",
  1177. ["/"] = "?",
  1178. ["`"] = "~"
  1179. }
  1180. if bab[str] ~= nil then
  1181. return bab[str]
  1182. else
  1183. return string.upper(str)
  1184. end
  1185. end
  1186.  
  1187. remote.OnServerEvent:Connect(function(plr,typ,data)
  1188. if plr == owner then
  1189. if typ == "ready" then
  1190. remote:FireClient(owner,"ready",{part})
  1191. elseif typ == "Shift" then
  1192. shift = data[1]
  1193. inputtimer = tick() + 5
  1194. elseif typ == "Enter" then
  1195. enter:Fire(getUser(plr))
  1196. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  1197. inputtimer = tick() + 5
  1198. elseif typ == "KeyType" then
  1199. if shift then
  1200. currentinput = currentinput..shiftify(data[1])
  1201. else
  1202. currentinput = currentinput..string.lower(data[1])
  1203. end
  1204. if currentgui ~= nil then
  1205. if cursor ~= nil then
  1206. currentgui.Text = currentinput..blinkcharacter
  1207. else
  1208. currentgui.Text = currentinput
  1209. end
  1210. currentgui.Size = UDim2.new(1,0,0,currentgui.TextBounds.Y+38)
  1211. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  1212. end
  1213. inputtimer = tick() + 5
  1214. elseif typ == "Backspace" then
  1215. currentinput = string.sub(currentinput,1,#currentinput-1)
  1216. inputtimer = tick() + 5
  1217. end
  1218. end
  1219. end)
  1220.  
  1221. local function inputChat(str,plr)
  1222. local account = accounts[tostring(plr.UserId)]
  1223. if account ~= nil and tick() > inputtimer and currentgui ~= nil and not chattyping then
  1224. chattyping = true
  1225. currentinput = ""
  1226. for i=1,#str do
  1227. currentinput = currentinput..string.sub(str,i,i)
  1228. if cursor ~= nil then
  1229. currentgui.Text = currentinput..blinkcharacter
  1230. else
  1231. currentgui.Text = currentinput
  1232. end
  1233. currentgui.Size = UDim2.new(1,0,0,currentgui.TextBounds.Y+38)
  1234. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  1235. AccurateWait(0.025)
  1236. end
  1237. wait()
  1238. enter:Fire(account)
  1239. chattyping = false
  1240. end
  1241. end
  1242.  
  1243. for i,plr in pairs(game:GetService("Players"):GetPlayers()) do
  1244. plr.Chatted:Connect(function(msg)
  1245. if string.sub(msg,1,1) == ">" then
  1246. inputChat(string.sub(msg,2),plr)
  1247. end
  1248. end)
  1249. end
  1250.  
  1251. game:GetService("Players").PlayerAdded:Connect(function(plr)
  1252. plr.Chatted:Connect(function(msg)
  1253. if string.sub(msg,1,1) == ">" then
  1254. inputChat(string.sub(msg,2),plr)
  1255. end
  1256. end)
  1257. end)
  1258.  
  1259. local gui = Instance.new("ScreenGui",owner.PlayerGui)
  1260. gui.ResetOnSpawn = false
  1261.  
  1262. NLS([[local remote = owner:WaitForChild("remememfordingypingy")
  1263. local uis = game:GetService("UserInputService")
  1264. local ts = game:GetService("TweenService")
  1265. local part = nil
  1266. local active = false
  1267. local camcf = CFrame.new(0,0,0)
  1268.  
  1269. remote:FireServer("ready")
  1270. remote.OnClientEvent:Connect(function(typ,data)
  1271. if typ == "ready" then
  1272. part = data[1]
  1273. end
  1274. end)
  1275.  
  1276. repeat wait() until part ~= nil
  1277.  
  1278. local keycodes = {
  1279. Enum.KeyCode.LeftAlt,
  1280. Enum.KeyCode.RightAlt,
  1281. Enum.KeyCode.LeftControl,
  1282. Enum.KeyCode.LeftSuper,
  1283. Enum.KeyCode.Left,
  1284. Enum.KeyCode.Up,
  1285. Enum.KeyCode.Right,
  1286. Enum.KeyCode.Down,
  1287. Enum.KeyCode.Tab,
  1288. Enum.KeyCode.F1,
  1289. Enum.KeyCode.F2,
  1290. Enum.KeyCode.F3,
  1291. Enum.KeyCode.F4,
  1292. Enum.KeyCode.F5,
  1293. Enum.KeyCode.F6,
  1294. Enum.KeyCode.F7,
  1295. Enum.KeyCode.F8,
  1296. Enum.KeyCode.F9,
  1297. Enum.KeyCode.F10,
  1298. Enum.KeyCode.F11,
  1299. Enum.KeyCode.F12,
  1300. Enum.KeyCode.Insert,
  1301. Enum.KeyCode.Delete,
  1302. Enum.KeyCode.Home,
  1303. Enum.KeyCode.PageUp,
  1304. Enum.KeyCode.PageDown,
  1305. Enum.KeyCode.Print,
  1306. Enum.KeyCode.ScrollLock,
  1307. Enum.KeyCode.CapsLock,
  1308. Enum.KeyCode.Pause,
  1309. Enum.KeyCode.NumLock,
  1310. Enum.KeyCode.RightSuper,
  1311. Enum.KeyCode.Menu
  1312. }
  1313.  
  1314. local function notKeycoders(keycode)
  1315. for _,v in pairs(keycodes) do
  1316. if v == keycode then
  1317. return false
  1318. end
  1319. end
  1320. return true
  1321. end
  1322.  
  1323. uis.InputBegan:Connect(function(input,gameprocessed)
  1324. if input.UserInputType == Enum.UserInputType.Keyboard and not gameprocessed and active then
  1325. if input.KeyCode == Enum.KeyCode.End then
  1326. active = false
  1327. local twen = ts:Create(workspace.CurrentCamera,TweenInfo.new(0.75,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{CFrame = camcf})
  1328. twen:Play()
  1329. wait(0.75)
  1330. workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
  1331. local hum = owner.Character:FindFirstChildOfClass("Humanoid")
  1332. if hum ~= nil then
  1333. hum.WalkSpeed = 16
  1334. hum.UseJumpPower = true
  1335. hum.JumpPower = 50
  1336. end
  1337. elseif input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
  1338. remote:FireServer("Shift",{true})
  1339. elseif input.KeyCode == Enum.KeyCode.Return then
  1340. remote:FireServer("Enter")
  1341. elseif input.KeyCode == Enum.KeyCode.Backspace then
  1342. remote:FireServer("Backspace")
  1343. elseif notKeycoders(input.KeyCode) then
  1344. remote:FireServer("KeyType",{uis:GetStringForKeyCode(input.KeyCode)})
  1345. end
  1346. end
  1347. end)
  1348.  
  1349. uis.InputEnded:Connect(function(input,gameprocessed)
  1350. if input.UserInputType == Enum.UserInputType.Keyboard and not gameprocessed and active then
  1351. if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
  1352. remote:FireServer("Shift",{false})
  1353. end
  1354. end
  1355. end)
  1356.  
  1357. local but = part.SurfaceGui.TextButton
  1358. but.Parent = nil
  1359. local but2 = but:Clone()
  1360. but2.Parent = part.SurfaceGui
  1361.  
  1362. but2.MouseButton1Click:Connect(function()
  1363. if not active then
  1364. workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  1365. camcf = workspace.CurrentCamera.CFrame
  1366. 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)})
  1367. twen:Play()
  1368. active = true
  1369. local hum = owner.Character:FindFirstChildOfClass("Humanoid")
  1370. if hum ~= nil then
  1371. hum.WalkSpeed = 0
  1372. hum.UseJumpPower = true
  1373. hum.JumpPower = 0
  1374. end
  1375. end
  1376. end)]],gui)
  1377.  
  1378. while true do
  1379. local ans,user = getInput("> What do you want to do?")
  1380. wait()
  1381. screen.ScrollingFrame.CanvasPosition = Vector2.new(0,999999)
  1382. local spl = string.split(ans," ")
  1383. local command = commands[spl[1]]
  1384. if command ~= nil then
  1385. if user.rank > 0 then
  1386. if user.rank >= command.rank then
  1387. if command.cooldown > 0 then
  1388. local can = true
  1389. for i,v in pairs(cache) do
  1390. if v[1] == user.name and v[2] > os.time() and v[3] == command.name then
  1391. can = false
  1392. warningln("️️You must wait "..tostring(v[2]-os.time()).." seconds before using this command again!")
  1393. elseif v[1] == user.name and v[2] <= os.time() and v[3] == command.name then
  1394. table.remove(cache,i)
  1395. end
  1396. end
  1397. if can then
  1398. table.remove(spl,1)
  1399. local success = command.func(table.concat(spl," "),user)
  1400. if success ~= false then
  1401. table.insert(cache,{user.name,os.time()+command.cooldown,command.name})
  1402. end
  1403. end
  1404. else
  1405. table.remove(spl,1)
  1406. command.func(table.concat(spl," "),user)
  1407. end
  1408. else
  1409. errorln("Invalid permissions")
  1410. end
  1411. end
  1412. else
  1413. errorln("No such command: \""..ans.."\"")
  1414. end
  1415. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement