generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: could someone help me with making a stopwatch gui plugin?

Previous Thread :: Next Thread 
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
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
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 09:30 AM
bump
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 09:32 AM
can anyone please help? i know im a noob by asking this.
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 09:37 AM
bump of nonreplyness
Report Abuse
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 09:39 AM
thats not a plugin
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 09:42 AM
bump of electricness
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 10:03 AM
come on
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 10:06 AM
well i guess im not getting any help am i?
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 10:09 AM
final bump for now
Report Abuse
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
14 Aug 2011 10:14 AM
ANYONE PLEASE?
Report Abuse
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
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 is not online. 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
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
321sith654 is not online. 321sith654
Joined: 20 Mar 2010
Total Posts: 398
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image