Advertisement
Guest User

Tween Position Issues

a guest
Jul 24th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. function notify(txt,who,style,interval,interval2)
  2.     plr = game.Players:FindFirstChild(who)
  3.     print("Starting...")
  4.     if plr~=nil then
  5.         print("Player found!")
  6.         gui = plr.PlayerGui:findFirstChild("Notify")
  7.         if gui~=nil then
  8.             print("Gui found!")
  9.             iu = gui.Main.InUse
  10.             if iu.Value == false then
  11.                 print("Not in use!")
  12.                 iu.Value = true
  13.                 gui.Main.Button.Text = txt.."!"
  14.                 gui.Main:TweenPosition(UDim2.new(0.25,0,0.3,0),"Out",style,interval,false)
  15.                 wait(interval2)
  16.                 gui.Main:TweenPosition(UDim2.new(0.25,0,-0.3,0),"In",style,interval,false)
  17.                 wait(interval)
  18.                 iu.Value = false
  19.             elseif iu.Value == true then
  20.                 print("In use, waiting..")
  21.                 repeat
  22.                     wait(1)
  23.                 until
  24.                 iu.Value == false
  25.                 iu.Value = true
  26.                 gui.Main.Button.Text = txt.."!"
  27.                 gui.Main:TweenPosition(UDim2.new(0.25,0,0.3,0),"Out",style,interval,false)
  28.                 wait(interval2)
  29.                 gui.Main:TweenPosition(UDim2.new(0.25,0,-0.3,0),"In",style,interval,false)
  30.                 wait(interval)
  31.                 iu.Value = false
  32.             end
  33.             print("Done!")
  34.         end
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement