|
| 14 Aug 2011 09:28 AM |
i know its gotta have the frame and the text buttons
and here is the script
local paused = false local running = false local begin = tick() local pauseT = tick() local current = 0
local timer = script.Parent local start,reset = timer.Start,timer.Reset
function display() local sec = tostring(math.floor(current%60)) local mili = tostring(math.floor((current%60)*1000%1000)) mili = (#mili == 1 and ("00" .. mili) or #mili == 2 and ("0" .. mili) or mili) script.Parent.Time.Text = (sec .. "." .. mili) end
function startTimer(resetT) running,paused = true,false if (resetT) then current = 0 begin = tick() end while (running) do if (not paused) then current = (tick()-begin) display() end wait() end end
start.MouseButton1Click:connect(function() if (paused) then local diff = (tick()-pauseT) begin = (begin+diff) start.Text = "Pause" start.Style,reset.Style = 1,1 startTimer(false) elseif (running) then paused = true pauseT = tick() start.Text = "Resume" start.Style,reset.Style = 1,1 else start.Text = "Pause" start.Style,reset.Style = 1,1 startTimer(true) end end)
reset.MouseButton1Click:connect(function() running,paused = false,false start.Style,reset.Style = 1,2 script.Parent.Time.Text = "0.000" start.Text = "Start" end)
could anyone help me? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Aug 2011 09:32 AM |
| can anyone please help? i know im a noob by asking this. |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Aug 2011 09:38 AM |
local paused = false local running = false local begin = tick() local pauseT = tick() local current = 0
local timer = script.Parent local start,reset = timer.Start,timer.Reset
function display() local sec = tostring(math.floor(current%60)) local mili = tostring(math.floor((current%60)*1000%1000)) mili = (#mili == 1 and ("00" .. mili) or #mili == 2 and ("0" .. mili) or mili) script.Parent.Time.Text = (sec .. "." .. mili) end
function startTimer(resetT) running,paused = true,false if (resetT) then current = 0 begin = tick() end while (running) do if (not paused) then current = (tick()-begin) display() end end wait() end start.MouseButton1Click:connect(function() if (paused) then local diff = (tick()-pauseT) begin = (begin+diff) start.Text = "Pause" start.Style,reset.Style = 1,1 elseif (running) then paused = true pauseT = tick() start.Text = "Resume" start.Style,reset.Style = 1,1 else start.Text = "Pause" start.Style,reset.Style = 1,1 startTimer() end end)
reset.MouseButton1Click:connect(function() running,paused = false,false start.Style,reset.Style = 1,2 script.Parent.Time.Text = "0.000" start.Text = "Start" end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 14 Aug 2011 10:06 AM |
| well i guess im not getting any help am i? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 14 Aug 2011 10:54 AM |
OH you want the plugin script? If you do here it is..
local PluginManagerObject = PluginManager() local Plugin = PluginManagerObject:CreatePlugin() local Toolbar = Plugin:CreateToolbar("Hello World Plugin Toolbar") local Button = Toolbar:CreateButton("Timer", "Click this button to print Hello World!", "IconName.png") Button.Click:connect(function() print("Hello, World!") end)
|
|
|
| Report Abuse |
|
|
|
| 14 Aug 2011 10:56 AM |
| you know what im sick and tried of your trolling if you can't help me then don't post again on this thread! |
|
|
| Report Abuse |
|
|
Tranhead
|
  |
| Joined: 02 Apr 2008 |
| Total Posts: 4217 |
|
|
| 14 Aug 2011 10:57 AM |
| Quit raging, kid. Not everyone knows alot about plugins. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2011 11:07 AM |
local PluginManagerObject = PluginManager() local Plugin = PluginManagerObject:CreatePlugin() local Toolbar = Plugin:CreateToolbar("Hello World Plugin Toolbar") local Button = Toolbar:CreateButton("Timer", "Click this button to print Hello World!", "IconName.png") Button.Click:connect(function(plr) gui = Instance.new("ScreenGui",plr.PlayerGui) text = Instance.new("TextLabel",gui) text1 = text script = Instance.new("Script",text) createscript([[ for i = 1,9999999, 1 do text1.Text = "Sever Clock"..1 + i end]],text) text.Size = UDim2(1,0,0,50) end) |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2011 11:10 AM |
| @biker could you make it so that it works like the gui script that i posted but so that its a plugin too |
|
|
| Report Abuse |
|
|