Advertisement
Descaii

Script Sharer

Feb 28th, 2014
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.39 KB | None | 0 0
  1. -- Joiner --
  2. --http://www49.zippyshare.com/v/38178937/file.html
  3. --Mouse=game.Players.LocalPlayer:GetMouse();Mouse.Button1Down:connect(function()ypcall(function()print(Mouse.Target)local a = Mouse.Target.Parent Mouse.Target:Destroy() a:Destroy() end)end)
  4. ScreenSize = 1000
  5. Screens = {}
  6. GlobalObjects = {}
  7. CurrentWorld = 1
  8. function clerp(c1,c2,sp)
  9.     return CFrame.new(
  10.         c1.X+(c2.X-c1.X)*sp,
  11.         c1.Y+(c2.Y-c1.Y)*sp,
  12.         c1.Z+(c2.Z-c1.Z)*sp
  13.     )
  14. end
  15. local PBT = Instance.new("Part",script)
  16. PBT.Transparency = 1
  17. PBT.Anchored = true
  18. local PBTG = Instance.new("SurfaceGui",PBT)
  19. PBTG.CanvasSize = Vector2.new(500,200)
  20. PBT.FormFactor = "Custom"
  21. PBT.Size = Vector3.new(5,2,1)
  22. PBTS = Vector3.new(5,2,1)
  23. PBTC = CFrame.new(-20,4,20)
  24. local PBTGB = Instance.new("TextLabel",PBTG)
  25. PBTGB.Size = UDim2.new(1,0,1,0)
  26. PBTGB.BackgroundColor3 = Color3.new(0,1,0)
  27. PBTGB.Text = "Play"
  28. PBTGB.TextScaled = true
  29. PBT.CFrame = CFrame.new(0,2,0)
  30.  
  31. local PBT2 = Instance.new("Part",script)
  32. PBT2CF = CFrame.new(-20,2,20)
  33. PBT2S = Vector3.new(5,1,1)
  34. PBT2.Anchored = true
  35. PBT2.Transparency = 1
  36. local PBTG2 = Instance.new("SurfaceGui",PBT2)
  37. PBTG2.CanvasSize = Vector2.new(500,100)
  38. PBT2.FormFactor = "Custom"
  39. PBT2.Size = Vector3.new(5,2,1)
  40. local PBTGB2 = Instance.new("TextLabel",PBTG2)
  41. PBTGB2.Size = UDim2.new(1,0,1,0)
  42. PBTGB2.BackgroundColor3 = Color3.new(0,1,0)
  43. PBTGB2.Text = "New Script"
  44. PBTGB2.TextScaled = true
  45.  
  46. local PBT3 = Instance.new("Part",script)
  47. PBT3CF = CFrame.new(-20,1,20)
  48. PBT3S = Vector3.new(5,1,1)
  49. PBT3.Anchored = true
  50. PBT3.Transparency = 1
  51. local PBTG3 = Instance.new("SurfaceGui",PBT3)
  52. PBTG3.CanvasSize = Vector2.new(500,100)
  53. PBT3.FormFactor = "Custom"
  54. PBT3.Size = Vector3.new(5,2,1)
  55. local PBTGB3 = Instance.new("TextLabel",PBTG3)
  56. PBTGB3.Size = UDim2.new(1,0,1,0)
  57. PBTGB3.BackgroundColor3 = Color3.new(1,0,0)
  58. PBTGB3.Text = "Delete Script"
  59. PBTGB3.TextScaled = true
  60. local Play = Instance.new("ClickDetector",PBT)
  61. local P2 = Instance.new("ClickDetector",PBT2)
  62. local P3 = Instance.new("ClickDetector",PBT3)
  63. Play.MouseClick:connect(function(player)
  64.     ypcall(function()
  65.         if not player.Backpack:findFirstChild(Screens[CurrentWorld].Name) then
  66.             NLS(game:GetService("HttpService"):GetAsync(Screens[CurrentWorld].Link),player.Backpack).Name = Screens[CurrentWorld].Name
  67.         end
  68.     end)
  69. end)
  70. function Msg(Player,Text,Click)
  71.     local SC = Instance.new("ScreenGui",Player.PlayerGui)
  72.     local FR = Instance.new("Frame",SC)
  73.     FR.Size = UDim2.new(0,200,0,100)
  74.     FR.BackgroundColor3 = Color3.new(0,0,0.5)
  75.     FR.Position = UDim2.new(0.5,-100,0.5,-100)
  76.     local Name = Instance.new("TextBox",FR)
  77.     Name.Size = UDim2.new(0,200,0,50)
  78.     Name.Position = UDim2.new(0,0,0,0)
  79.     Name.BackgroundTransparency = 1
  80.     Name.Text = Text
  81.     Name.FontSize = "Size12"
  82.     Name.TextColor3 = Color3.new(1,1,1)
  83.     Name.TextWrapped = true
  84.     local Add = Instance.new("TextButton",FR)
  85.     Add.Size = UDim2.new(0,60,0,20)
  86.     Add.Position = UDim2.new(0.5,-80,1,-30)
  87.     Add.Text = "Continue"
  88.     Add.BackgroundColor3 = Color3.new(0,1,0)
  89.     local Add2 = Instance.new("TextButton",FR)
  90.     Add2.Size = UDim2.new(0,60,0,20)
  91.     Add2.Position = UDim2.new(0.5,20,1,-30)
  92.     Add2.Text = "Close"
  93.     Add2.BackgroundColor3 = Color3.new(1,0,0)
  94.     Add2.MouseButton1Click:connect(function()
  95.         SC:Destroy()
  96.     end)
  97.     Add.MouseButton1Click:connect(function()
  98.         SC:Destroy()
  99.         if Click then
  100.             Click(Player)
  101.         end
  102.     end)
  103. end
  104. function Gui(Player)
  105.     local Clean,Error = ypcall(function()
  106.         local SC = Instance.new("ScreenGui",Player.PlayerGui)
  107.         local FR = Instance.new("Frame",SC)
  108.         FR.Size = UDim2.new(0,200,0,230)
  109.         FR.BackgroundColor3 = Color3.new(0,0,0.5)
  110.         FR.Position = UDim2.new(0.5,-100,0.5,-150)
  111.         local Name = Instance.new("TextBox",FR)
  112.         Name.Size = UDim2.new(0,150,0,40)
  113.         Name.Position = UDim2.new(0.5,-75,0,20)
  114.         Name.Text = "Name"
  115.         Name.BackgroundColor3 = Color3.new(1,1,1)
  116.         local Site = Instance.new("TextBox",FR)
  117.         Site.Size = UDim2.new(0,150,0,40)
  118.         Site.Position = UDim2.new(0.5,-75,0,80)
  119.         Site.Text = "Site(Where the script is)"
  120.         Site.BackgroundColor3 = Color3.new(1,1,1)
  121.         local Image = Instance.new("TextBox",FR)
  122.         Image.Size = UDim2.new(0,150,0,40)
  123.         Image.Position = UDim2.new(0.5,-75,0,140)
  124.         Image.Text = "ImageID (Just the number)"
  125.         Image.BackgroundColor3 = Color3.new(1,1,1)
  126.         local Add = Instance.new("TextButton",FR)
  127.         Add.Size = UDim2.new(0,60,0,20)
  128.         Add.Position = UDim2.new(0.5,-70,1,-30)
  129.         Add.Text = "Complete"
  130.         Add.BackgroundColor3 = Color3.new(0,1,0)
  131.         local Add2 = Instance.new("TextButton",FR)
  132.         Add2.Size = UDim2.new(0,60,0,20)
  133.         Add2.Position = UDim2.new(0.5,10,1,-30)
  134.         Add2.Text = "Cancel"
  135.         Add2.BackgroundColor3 = Color3.new(1,0,0)
  136.         Add.MouseButton1Click:connect(function()
  137.             if #Site.Text < 4 then
  138.                 SC:Destroy()
  139.                 Msg(Player,"You need a site link.",Gui)
  140.             else
  141.                 SC:Destroy()
  142.                 NewScreen(Name.Text,Site.Text,tonumber(Image.Text),function() end,Player.Name)
  143.             end
  144.         end)
  145.         Add2.MouseButton1Click:connect(function()
  146.             SC:Destroy()
  147.         end)
  148.     end)
  149.     if not Clean then
  150.         Msg(Player,"Error(Could not create):"..Error,Gui)
  151.     end
  152. end
  153. function DeleteGui(P)
  154.     ypcall(function()
  155.         local A = CurrentWorld
  156.         if Screens[A].Player == P.Name or P.Name == "dogwarrior24" then
  157.             local SC = Instance.new("ScreenGui",P.PlayerGui)
  158.             local FR = Instance.new("Frame",SC)
  159.             FR.Size = UDim2.new(0,200,0,100)
  160.             FR.BackgroundColor3 = Color3.new(0,0,0.5)
  161.             FR.Position = UDim2.new(0.5,-100,0.5,-100)
  162.             local Name = Instance.new("TextBox",FR)
  163.             Name.Size = UDim2.new(0,200,0,50)
  164.             Name.Position = UDim2.new(0,0,0,0)
  165.             Name.BackgroundTransparency = 1
  166.             Name.Text = "Are you sure you want to delete "..Screens[A].Name.."?"
  167.             Name.FontSize = "Size14"
  168.             Name.TextColor3 = Color3.new(1,1,1)
  169.             Name.TextWrapped = true
  170.             local Add = Instance.new("TextButton",FR)
  171.             Add.Size = UDim2.new(0,60,0,20)
  172.             Add.Position = UDim2.new(0.5,-80,1,-30)
  173.             Add.Text = "Ok"
  174.             Add.BackgroundColor3 = Color3.new(0,1,0)
  175.             local Add2 = Instance.new("TextButton",FR)
  176.             Add2.Size = UDim2.new(0,60,0,20)
  177.             Add2.Position = UDim2.new(0.5,20,1,-30)
  178.             Add2.Text = "Cancel"
  179.             Add2.BackgroundColor3 = Color3.new(1,0,0)
  180.             Add.MouseButton1Click:connect(function()
  181.                 SC:Destroy()
  182.                 if Screens[CurrentWorld].Player == P.Name or P.Name == "dogwarrior24"then
  183.                     local AC = Screens[A]
  184.                     AC.PG:Destroy()
  185.                     if Screens[A+1] then
  186.                         CurrentWorld = A+1
  187.                     elseif Screens[A-1] then
  188.                         CurrentWorld = A-1
  189.                     end
  190.                     table.remove(Screens,A)
  191.                     print(P.Name.." deleted "..AC.Name)
  192.                 end
  193.             end)
  194.             Add2.MouseButton1Click:connect(function()
  195.                 SC:Destroy()
  196.             end)
  197.         else
  198.             Msg(P,"You do not have permission to delete this.(you can only delete scripts you made)",function()end)
  199.         end
  200.     end)
  201. end
  202. P3.MouseClick:connect(function(P)
  203.     ypcall(function()
  204.         DeleteGui(P)
  205.     end)
  206. end)
  207. P2.MouseClick:connect(function(player)
  208.     ypcall(function()
  209.         Gui(player)
  210.     end)
  211. end)
  212. function NewScreen(Name,Link,BackgroundID,Update,PL)
  213.     local A = {}
  214.     local PlayerGui = Instance.new("Part",script)
  215.     PlayerGui.Anchored = true
  216.     PlayerGui.FormFactor = "Custom"
  217.     --PlayerGui.Size = Vector3.new(ScreenSize/100,ScreenSize/100,0)
  218.     PlayerGui.CFrame = CFrame.new(0,(ScreenSize/100)/2,0)
  219.     PlayerGui.Transparency = 1
  220.     local Play = Instance.new("ClickDetector",PlayerGui)
  221.     local AM = #Screens+1
  222.     Play.MouseClick:connect(function(player)
  223.         ypcall(function()
  224.             for i,v in pairs(Screens) do
  225.                 if v == A then
  226.                     CurrentWorld = i
  227.                 end
  228.             end
  229.         end)
  230.     end)
  231.     local Screen = Instance.new("SurfaceGui",PlayerGui)
  232.     Screen.Name = "2DGame"
  233.     Screen.CanvasSize = Vector2.new(ScreenSize,ScreenSize)
  234.     local Background = Instance.new("ImageLabel",Screen)
  235.     Background.Image = "http://www.roblox.com/asset/?id="..BackgroundID-1
  236.     Background.Size = UDim2.new(0,1000,0,600)
  237.     Background.Position = UDim2.new(0.5,-500,0.5,-300)
  238.     local Title = Instance.new("TextLabel",Background)
  239.     Title.Size = UDim2.new(1,0,1,0)
  240.     Title.Text = Name
  241.     Title.TextColor3 = Color3.new(0.5,0.5,0.5)
  242.     Title.TextScaled = true
  243.     Title.BackgroundTransparency = 1
  244.     Title.FontSize = "Size14"
  245.     Title.Position = UDim2.new(0,0,0,0)
  246.     A.PG = PlayerGui
  247.     A.SC = Screen
  248.     A.BK = Background
  249.     A.BKID = BackgroundID
  250.     A.Link = Link
  251.     A.Title = Title
  252.     A.PlayButton = Play
  253.     A.Name = Name
  254.     A.Player = PL
  255.     if not Update then
  256.         A.Update = function()
  257.         end
  258.     else
  259.         A.Update = Update
  260.     end
  261.     table.insert(Screens,A)
  262.     return A
  263. end
  264. Coob = NewScreen("Coob","http://pastebin.com/raw.php?i=3PK8jvfw",162074807)
  265. Physiks = NewScreen("Physiks","http://pastebin.com/raw.php?i=jiAgNm3G",162077870)
  266. Cars = NewScreen("Cars","http://pastebin.com/raw.php?i=GjxKuNP9",161150995)
  267. Draw = NewScreen("Draw","http://pastebin.com/raw.php?i=etgXSUx3",162219445)
  268. Emitter = NewScreen("Emitter","http://pastebin.com/raw.php?i=AEmbH9vJ",248102438)
  269. Water = NewScreen("Water","http://pastebin.com/raw.php?i=nD2zEXsQ",248102481)
  270. Test = NewScreen("Test","https://www.dropbox.com/s/yp4ihidhv651dny/2d%20BRL.lua?dl=1",0)
  271. mc = math.ceil
  272. while true do
  273.     Time = wait()
  274.     --for i = 1,math.ceil(1/Time) do
  275.         PBT.Size = clerp(PBT.Size,PBTS,0.05).p
  276.         PBT.CFrame = PBTC
  277.         PBT2.Size = clerp(PBT2.Size,PBT2S,0.05).p
  278.         PBT2.CFrame = PBT2CF
  279.         PBT3.Size = clerp(PBT3.Size,PBT3S,0.05).p
  280.         PBT3.CFrame = PBT3CF
  281.         PBT.Anchored,PBT2.Anchored,PBT3.Anchored = true,true,true
  282.         PBT.Transparency,PBT2.Transparency,PBT3.Transparency = 1,1,1
  283.         PBT.Locked,PBT2.Locked,PBT3.Locked = true,true,true
  284.         for _,Screen in pairs(Screens) do
  285.             local SZR = 100
  286.             if _ ~= CurrentWorld then
  287.                 SZR = 200
  288.             end
  289.             Screen.BK.Size = UDim2.new(0,1000,0,600)
  290.             Screen.Title.Text = Screen.Name
  291.             if Screen.BK.Image ~= "http://www.roblox.com/asset/?id="..Screen.BKID-1 then
  292.                 Screen.BK.Image = "http://www.roblox.com/asset/?id="..Screen.BKID-1
  293.             end
  294.             if Screen.BKID-1 > 0 then
  295.                 Screen.BK.BackgroundTransparency = 1
  296.                 Screen.Title.Visible = false
  297.             else
  298.                 Screen.BK.BackgroundTransparency = 0
  299.                 Screen.Title.Visible = true
  300.             end
  301.             Screen.PG.Anchored = true
  302.             Screen.PG.Locked = true
  303.             local C = Screen.PG.CFrame
  304.             Screen.PG.Size = clerp(Screen.PG.Size,Vector3.new(1500/SZR,1500/SZR,1),0.05).p
  305.             --Screen.PG.CFrame = clerp(C,CFrame.new(((1500/100)*-((_-CurrentWorld))),((1500/100)/2)+5,20),0.1)
  306.             Screen.PG.CFrame = clerp(C,
  307.                 --CFrame.new(0,6.5*#Screens,20)
  308.                 CFrame.new(-20,SZR/10,20+(3*#Screens))
  309.                 *CFrame.Angles(0,math.rad(360*(_/#Screens))-math.rad(360*(CurrentWorld/#Screens))+math.rad(180),math.rad(45))
  310.                 *CFrame.new(0,0,3*#Screens)
  311.             ,0.05)
  312.             Screen.Update()
  313.         end
  314.     --end
  315. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement