Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile("shared.lua")
- include "shared.lua"
- function ENT:Draw()
- self:DrawModel()
- end
- surface.CreateFont("MiraiDefuseFont", {
- font = "Times New Roman",
- size=20,
- antialias=true,
- italic=false,
- shadow=true,
- additive = false,
- outline = false,
- underline = false,
- weight = 500,
- bold=false,
- blursize = 0,
- scanlines = 0 })
- surface.CreateFont("MiraiBombFont", {
- font = "Times New Roman",
- size=40,
- antialias=true,
- italic=false,
- shadow=true,
- additive = false,
- outline = false,
- underline = false,
- weight = 500,
- bold=true,
- blursize = 0,
- scanlines = 0 })
- net.Receive("beep", function()
- surface.PlaySound("MiraiExplosives/beep.mp3")
- end)
- function Problem1()
- local a1 = math.random(700,2000)
- local a2 = math.random(700,2000)
- local ans = a1+a2
- local frame1 = vgui.Create("DFrame")
- frame1:SetPos(280,400)
- frame1:SetSize(800,200)
- frame1:SetVisible(true)
- frame1:SetTitle("Bomb defusing screen. -- Addon created by Lord Mirai (未来)")
- frame1:MakePopup()
- local TitL1 = vgui.Create("DLabel",frame1)
- TitL1:SetText("Defuse Bomb")
- TitL1:SetPos(280,20)
- TitL1:SetSize(600,80)
- TitL1:SetFont("MiraiBombFont")
- TitL1:SetColor(Color(0,0,0,255))
- local QL1 = vgui.Create("DLabel",frame1)
- QL1:SetText("What is "..tonumber(a1).." + "..tonumber(a2).." ?" )
- QL1:SetPos(250,80)
- QL1:SetSize(400,50)
- QL1:SetFont("MiraiDefuseFont")
- QL1:SetColor(Color(70,10,110,245))
- local In1 = vgui.Create("DTextEntry",frame1)
- In1:SetSize(300,40)
- In1:SetPos(250,130)
- In1.OnEnter = function(self)
- local subAnswer = tonumber(self:GetValue())
- print("You said "..subAnswer)
- frame:SetVisible(false)
- if subAnswer == ans then
- Problem2()
- else
- print("You cut the wrong wire!")
- frame:SetVisible(false)
- net.Start("BombDefuseFail")
- net.SendToServer()
- end
- end
- end
- function Problem2()
- local b1 = math.random(1700,5000)
- local b2 = math.random(1700,5000)
- local ans2 = b1+b2
- print(ans2)
- local frame2 = vgui.Create("DFrame")
- frame2:SetPos(280,400)
- frame2:SetSize(800,200)
- frame2:SetVisible(true)
- frame2:SetTitle("Bomb defusing screen. -- Addon created by Lord Mirai (未来)")
- frame2:MakePopup()
- local TitL2 = vgui.Create("DLabel",frame2)
- TitL2:SetText("Defuse Bomb")
- TitL2:SetPos(280,20)
- TitL2:SetSize(600,80)
- TitL2:SetFont("MiraiBombFont")
- TitL2:SetColor(Color(0,0,0,255))
- local QL2 = vgui.Create("DLabel",frame2)
- QL2:SetText("What is "..tonumber(b1).." + "..tonumber(b2).." ?" )
- QL2:SetPos(250,80)
- QL2:SetSize(400,50)
- QL2:SetFont("MiraiDefuseFont")
- QL2:SetColor(Color(70,10,110,245))
- local In2 = vgui.Create("DTextEntry",frame2)
- In2:SetSize(300,40)
- In2:SetPos(250,130)
- In2.OnEnter = function(self)
- In2:SetValue("")
- local subAnswer = tonumber(self:GetValue())
- print("You said "..subAnswer)
- frame2:SetVisible(false)
- if subAnswer == ans2 then
- print("You successfully defused a bomb!")
- net.Start("BombDefuseSuccess")
- net.SendToServer()
- else
- print("You cut the wrong wire!")
- net.Start("BombDefuseFail")
- net.SendToServer()
- end
- end
- end
- net.Receive("Fuse", function()
- local FuseGUI = vgui.Create("DFrame",frame)
- FuseGUI:SetPos(280,400)
- FuseGUI:SetSize(200,150)
- FuseGUI:SetVisible(true)
- FuseGUI:SetTitle("Mirai's bomb. Enter timer to kill ppl >;3")
- FuseGUI:MakePopup()
- local TimeL = vgui.Create("DLabel",frame)
- TimeL:SetText("Set timer in seconds (must be higher than 30):")
- TimeL:SetPos(280,30)
- TimeL:SetSize(600,80)
- TimeL:SetFont("MiraiBombFont")
- TimeL:SetColor(Color(220,10,10,255))
- local TimeIn = vgui.Create("DTextEntry",FuseGUI)
- TimeIn:SetPos(280,90)
- TimeIn:SetSize(300,80)
- TimeIn.OnEnter = function(self)
- BombFuseTimer = tonumber(TimeIn:GetValue())
- FuseGUI:SetVisible(false)
- printedTime = BombFuseTimer
- isBombFused = true
- net.Start("BombStart")
- net.SendToServer()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement