Advertisement
asdasdasd1312567dfsd

Untitled

Aug 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. script.Parent = nil
  3.  
  4. Tablets = {}
  5.  
  6. function nT()
  7. Tablets = {}
  8. end
  9. function Dismiss()
  10. nT()
  11. print("dismissed tabs")
  12. end
  13.  
  14. function GetTabs(plr)
  15. local Found = {}
  16. for i,v in pairs(Tablets) do
  17. if v[2] == plr.Name then
  18. table.insert(Found,v)
  19. end
  20. end
  21. return Found
  22. end
  23. norm = "Bright yellow"
  24.  
  25. function makeTablet(msg,color,plr)
  26. if color == normal then
  27. color = norm
  28. end
  29. m = Instance.new("Model", game.Workspace)
  30. m.Name = msg
  31. p = Instance.new("Part", m)
  32. p.CanCollide = false
  33. p.FormFactor = "Custom"
  34. p.Size = Vector3.new(2,0.1,3)
  35. p.BrickColor = BrickColor.new(color)
  36. p.TopSurface = 0
  37. p.BottomSurface = 0
  38. p.Transparency = 0.5
  39. s = Instance.new("SelectionBox", p)
  40. s.Adornee = p
  41. s.Color = BrickColor.new(color)
  42. pos = Instance.new("BodyPosition", p)
  43. pos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  44. gyr = Instance.new("BodyGyro", p)
  45. gyr.maxTorque = pos.maxForce
  46. local BGUI = Instance.new("BillboardGui")
  47. BGUI.Name = "AdminGUI"
  48. BGUI.Size = UDim2.new(0,1,0,1)
  49. BGUI.StudsOffset = Vector3.new(0,2.5,0)
  50. BGUI.Parent = p
  51. BGUI.Adornee = p
  52. local BText = Instance.new("TextLabel",BGUI)
  53. BText.Name = "Admin"
  54. BText.FontSize = "Size18"
  55. BText.TextStrokeTransparency = 0
  56. BText.TextColor3 = BrickColor.new(color).Color
  57. BText.Font = "ArialBold"
  58. BText.Text = msg
  59. if m.Name == "Dismiss" then
  60. c = Instance.new("ClickDetector", p)
  61. c.MouseHoverEnter:connect(function(pla)
  62. if pla.Name == plr then
  63. rotate = false
  64. selection = Instance.new("SelectionPartLasso", p)
  65. selection.Part = p
  66. selection.Humanoid = game.Workspace[plr].Humanoid
  67. selection.Color = BrickColor.new("Really red")
  68. end
  69. end)
  70. c.MouseHoverLeave:connect(function(pla)
  71. if pla.Name == plr then
  72. rotate = true
  73. selection:Remove()
  74. end
  75. end)
  76. c.MouseClick:connect(function(pla)
  77. if pla.Name == plr then
  78. pcall(function()
  79. selection:Remove()
  80. end)
  81. Tabs = GetTabs(Player)
  82. rotate = true
  83. for i = 1, #Tabs do
  84. Tabs[i][1]:Destroy()
  85. table.remove(Tablets,i)
  86. Dismiss()
  87. end
  88. end
  89. end)
  90. end
  91. p:BreakJoints()
  92. table.insert(Tablets,{p,plr})
  93. end
  94. function Tab(color, player, ...)
  95. args = { ... }
  96. for i,v in pairs(args) do
  97. makeTablet(v, color, player)
  98. end
  99. end
  100. function DisTab()
  101. makeTablet("Dismiss", "Really red", Player.Name)
  102. end
  103. function Loaded()
  104. Tab(normal, Player.Name, "Loaded ZTA 5.2", "Loaded tablet functions", "Loaded mainfunctions", "Loaded Commands", "Say /cmds; for commands")
  105. end
  106. function getN(name)
  107. c = {}
  108. for i,v in pairs(game.Players:GetChildren()) do
  109. if v.Name:sub(1,name:len()):lower() == name:lower() then
  110. return v
  111. end
  112. end
  113. return c
  114. end
  115. Loaded() DisTab()
  116. function cht(msg)
  117. if string.sub(msg,1,6) == "/cmds;" then
  118. Tab(normal, Player.Name, "/cmds;", "/kill;", "/kick;", "/ping;", "/color;",
  119. "/exp;", "/r;", "/exe;", "/ff;", "/unff;", "/about;", "/info;") DisTab()
  120. elseif string.sub(msg,1,7) == "/about;" then
  121. Tab(normal,Player.Name,"ZTA 5.2 Info","ZTA was developed by Taduliukas", "ZTA is in version 5.2", "ZTA will not be distributed unless by owner.")
  122. DisTab()
  123. elseif string.sub(msg,1,6) == "/kill;" then
  124. v = getN(string.sub(msg,7))
  125. v.Character:BreakJoints()
  126. elseif string.sub(msg,1,6) == "/kick;" then
  127. getN(string.sub(msg,7)):Remove()
  128. elseif string.sub(msg,1,6) == "/info;" then
  129. v = getN(string.sub(msg,7))
  130. Tab(normal, Player.Name, v.Name.."'s Info", "Account Age: "..v.AccountAge, "User ID: "..v.userId, "Membership Type: "..v.MembershipType)
  131. DisTab()
  132. elseif string.sub(msg,1,6) == "/ping;" then
  133. ping = string.sub(msg,7)
  134. if ping == "players" then
  135. ps = game.Players:GetChildren()
  136. makeTablet(#ps.." Players", normal, Player.Name)
  137. for i = 1, #ps do
  138. makeTablet(ps[i].Name, normal, Player.Name)
  139. end
  140. DisTab()
  141. else
  142. makeTablet(ping, normal, Player.Name)
  143. DisTab()
  144. end
  145. elseif string.sub(msg,1,7) == "/color;" then
  146. norm = string.sub(msg,8)
  147. if norm == "normal" then
  148. norm = "Bright yellow"
  149. makeTablet("Tablets are now default color.", normal, Player.Name)
  150. DisTab()
  151. else
  152. makeTablet("Changed tablet colors to "..norm, normal, Player.Name)
  153. DisTab()
  154. end
  155. elseif string.sub(msg,1,5) == "/exp;" then
  156. v = getN(string.sub(msg,6))
  157. f = Instance.new("Explosion", v.Character)
  158. f.Position = f.Parent.Torso.Position
  159. elseif string.sub(msg,1,3) == "/r;" then
  160. rtype = string.sub(msg,4)
  161. if rtype == "p" then
  162. ps = game:GetService("Players"):GetChildren()
  163. for i = 1, #ps do
  164. ps[i].Character:BreakJoints()
  165. end
  166. elseif rtype == "m" then
  167. for i = 1, 1000 do
  168. game.Workspace.Message:Remove()
  169. end
  170. elseif rtype == "h" then
  171. for i = 1, 1000 do
  172. game.Workspace.Hint:Remove()
  173. end
  174. end
  175. elseif string.sub(msg,1,5) == "/exe;" then
  176. pcall(function()
  177. loadstring(string.sub(msg,6))()
  178. end)
  179. elseif string.sub(msg,1,4) == "/ff;" then
  180. v = getN(string.sub(msg,5))
  181. f = Instance.new("ForceField", v.Character)
  182. elseif string.sub(msg,1,6) == "/unff;" then
  183. v = getN(string.sub(msg,7))
  184. f = v.Character:FindFirstChild("ForceField")
  185. if f then f:Remove() end
  186. end
  187. end
  188. Player.chatted:connect(cht)
  189. local Rotation = 0
  190. rotate = true
  191.  
  192. while wait() do
  193. if rotate == true then
  194. Rotation = Rotation+0.001
  195. if Rotation >= 360 then
  196. Rotation = 0
  197. end
  198. end
  199. for i,v in pairs(game.Players:GetChildren()) do
  200. pcall(function()
  201. local Tabs = GetTabs(v)
  202. local radius = 7 + (#Tabs*0.7)
  203. for i2,v2 in pairs(Tabs) do
  204. local Pos = v.Character.Torso.CFrame
  205. local x = math.cos((i2/#Tabs - (0.5/#Tabs)+Rotation*2) * math.pi*2) * radius
  206. local y = 0
  207. local z = math.sin((i2/#Tabs - (0.5/#Tabs)+Rotation*2) * math.pi*2) * radius
  208. local tabletPosition = Pos:toWorldSpace(CFrame.new(x,y,z):inverse())
  209. pcall(function() Tabs[i2][1].BodyPosition.position = tabletPosition.p end)
  210. pcall(function() Tabs[i2][1].BodyGyro.cframe = CFrame.new(tabletPosition.p, Pos.p) * CFrame.Angles(math.rad(-45), 0, 0) end)
  211. end
  212. end)
  213. end
  214. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement