Advertisement
Descaii

Anoter ting

Sep 18th, 2014
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.99 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. Mouse = Player:GetMouse()
  3. PlayerGui = Player:WaitForChild("PlayerGui")
  4. Screen = Instance.new("ScreenGui",PlayerGui)
  5. Key = {Down={},AllDown={},Byte={}}
  6. Guis = {}
  7. Mouse.KeyDown:connect(function(k)
  8.     Key.Down[k]=true
  9.     Key.AllDown[string.lower(k)]=true
  10.     Key.Byte[string.byte(k)]=true
  11.     Key.AllDown[string.upper(k)]=true end)
  12. Mouse.KeyUp:connect(function(k)
  13.     Key.Down[k]=nil
  14.     Key.AllDown[string.lower(k)]=nil
  15.     Key.Byte[string.byte(k)]=nil
  16.     Key.AllDown[string.upper(k)]=nil end)
  17. function NewC(table,name,func)
  18.     table[name]=func
  19. end
  20. function glerp(a,b,c)
  21.     local axs,axo,ays,ayo,bxs,bxo,bys,byo=a.X.Scale,a.X.Offset,a.Y.Scale,a.Y.Offset,b.X.Scale,b.X.Offset,b.Y.Scale,b.Y.Offset
  22.     return UDim2.new(axs+(bxs-axs)*c,axo+(bxo-axo)*c,ays+(bys-ays)*c,ayo+(byo-ayo)*c)
  23. end
  24. Commands = {}
  25. NewC(Commands,"Kill",function(p)
  26.     p.Character:breakJoints()
  27. end)
  28. function List(tab)
  29.     for i,v in pairs(Guis) do
  30.         v.TargetPostion = v.TargetPosition -UDim2.new(0,0,0,20)
  31.         v.TTarget = 1
  32.     end
  33.     local num=0
  34.     for i,v in pairs(tab) do
  35.         local n = {}
  36.         n.TTarget = 0
  37.         n.TargetPosition = UDim2.new(1,-110,1,-num*30)
  38.         local g = Instance.new("TextButton",Screen)
  39.         g.Size = UDim2.new(0,100,0,20)
  40.         g.Position = n.TargetPosition+UDim2.new(0,0,0,20)
  41.         g.BackgroundTransparency = 0.8
  42.         g.Text = i
  43.         g.MouseButton1Click:connect(function()
  44.             ypcall(function() v() end)
  45.         end)
  46.     end
  47. end
  48. function Open()
  49.     if not Opened then
  50.         Opened = true
  51.         print("Opened")
  52.     end
  53.     wait() Opened = false
  54. end
  55. Mouse.KeyUp:connect(function(k)
  56.     if k:lower()=="u" and Key.Byte[50] then
  57.         Open()
  58.     end
  59.     if string.byte(k) == 50 and Key.AllDown.u then
  60.         Open()
  61.     end
  62. end)
  63. game:GetService("RunService").RenderStepped:connect(function()
  64.     for i,v in pairs(Guis) do
  65.         v.Gui.Position = glerp(v.Gui.Position,v.TargetPosition,0.2)
  66.         v.Gui.BackgroundTransparency = glerp(v.Gui.BackgroundTransparency,v.TTarget,0.2)
  67.         if v.Gui.BackgroundTransparency > 0.95 then
  68.             v:Destroy()
  69.             table.remove(Guis,i)
  70.         end
  71.     end
  72. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement