Advertisement
Descaii

Fmer test

Sep 4th, 2014
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.10 KB | None | 0 0
  1. --Scripters test--
  2. Allowed = false
  3. local Player = game.Players.LocalPlayer
  4. PlayerGui = Player:WaitForChild("PlayerGui")
  5. Screen = Instance.new("ScreenGui",PlayerGui)
  6. local Tests = {}
  7. function Addtest(Text,Answer,noanswer,Title)
  8.     table.insert(Tests,{Text=Text,Answer=Answer,NeedAnswer=noanswer,Title=(Title or "Scripters test")})
  9. end
  10. Addtest("In this test we will make sure you know how to script, if you can script, these questions should be easy.\ntype continue to go on.","continue")
  11. Addtest("What language is robloxes scripting langauge?",{"Lua","lua","lau"})
  12. Addtest("How do you insert text into the output?","print")
  13. Addtest("What is a table?",function(txt) if txt:find("table") and #txt>10 then return true  end end)
  14. Addtest("What is a function?",function(txt) if (txt:find("function") or txt:find("run") or txt:find("execute") or txt:find("args") or txt:find("return")) and #txt>10 then return true end end)
  15. Level = 0
  16. game:GetService("RunService").RenderStepped:connect(function()
  17.     if not Allowed then
  18.         game:GetService("StarterGui"):SetCoreGuiEnabled(4,false)
  19.     end
  20. end)
  21.  
  22. for i,v in pairs(Tests) do
  23.     local n = Level
  24.     local Gui = Instance.new("Frame",Screen)
  25.     Gui.Size = UDim2.new(1,0,1,0)
  26.     Gui.BackgroundColor3 = Color3.new(0,0,0)
  27.     Gui.ZIndex = 9
  28.     local Title = Instance.new("TextLabel",Gui)
  29.     Title.Text = v.Title
  30.     Title.BackgroundTransparency = 1
  31.     Title.FontSize = "Size24"
  32.     Title.TextColor3 = Color3.new(0.8,0.8,0.8)
  33.     Title.Size = UDim2.new(1,0,0.1,0)
  34.     Title.ZIndex = 10
  35.     local Ticker = Instance.new("TextLabel",Gui)
  36.     Ticker.ZIndex = 10
  37.     Ticker.BackgroundTransparency = 1
  38.     Ticker.Text = 120
  39.     Ticker.FontSize = "Size24"
  40.     Ticker.Size = UDim2.new(0.1,0,0.1,0)
  41.     Ticker.TextColor3 = Title.TextColor3
  42.     local Question = Instance.new("TextLabel",Gui)
  43.     Question.Text = v.Text
  44.     Question.TextScaled = true
  45.     Question.BackgroundTransparency = 1
  46.     Question.TextColor3 = Color3.new(1,1,1)
  47.     Question.Size = UDim2.new(0.8,0,0.5,0)
  48.     Question.Position = UDim2.new(0.1,0,0.1,0)
  49.     Question.ZIndex = 10
  50.     local Answer = Instance.new("TextBox",Gui)
  51.     Answer.Position = UDim2.new(0,0,0.7,0)
  52.     Answer.Size = UDim2.new(1,0,0.2,0)
  53.     Answer.Text = "Answer here"
  54.     Answer.ZIndex = 10
  55.     Answer.TextScaled = true
  56.     Answer.BackgroundColor3 = Color3.new(1,1,1)
  57.     Answer.FocusLost:connect(function(t)
  58.         if t then
  59.             if type(v.Answer) == "string" then
  60.                 if Answer.Text:find(v.Answer) then
  61.                     Level = Level +1
  62.                 end
  63.             elseif type(v.Answer) == 'function' then
  64.                 if v.Answer(Answer.Text) then
  65.                     Level = Level+1
  66.                 end
  67.             elseif type(v.Answer) == 'table' then
  68.                 for _,g in pairs(v.Answer) do
  69.                     if Answer.Text:find(_) or Answer.Text:find(g) then
  70.                         Level = Level +1
  71.                     end
  72.                 end
  73.             end
  74.         end
  75.     end)
  76.     local time = tick()
  77.     repeat wait() Ticker.Text = 120-math.ceil(tick()-time) if tick()-time > 120 then Answer:Destroy() Ticker:Destroy() Title:Destroy() Question.Size = UDim2.new(1,0,1,0) Question.Position = UDim2.new() Question.Text = "Your out of time, you are now being kicked." wait(3) Player:Kick() end until Level > n
  78.     Gui:Destroy()
  79. end
  80. Allowed = true
  81. game:GetService("StarterGui"):SetCoreGuiEnabled(4,true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement