Advertisement
Guest User

Script Hub Testing

a guest
Jul 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.07 KB | None | 0 0
  1. local template = Instance.new("ScreenGui")
  2. local main = Instance.new("Frame")
  3. local button7 = Instance.new("TextButton")
  4. local button8 = Instance.new("TextButton")
  5. local textbox1 = Instance.new("TextBox")
  6. local button6 = Instance.new("TextButton")
  7. local button5 = Instance.new("TextButton")
  8. local button2 = Instance.new("TextButton")
  9. local button1 = Instance.new("TextButton")
  10. local button4 = Instance.new("TextButton")
  11. local button3 = Instance.new("TextButton")
  12. local textlabel1 = Instance.new("TextLabel")
  13. local close = Instance.new("TextButton")
  14. --//
  15. --//SETTINGS//--
  16. local nameofgui = "ha please's GUI" --name here
  17. --// BUTTON NAMES //--
  18. button1.Text = "ESP (K)" --name of script
  19. button2.Text = "Fly (E)"
  20. button3.Text = "Noclip (E)"
  21. button4.Text = ""
  22. button5.Text = ""
  23. button6.Text = ""
  24. button7.Text = ""
  25. button8.Text = ""
  26. --//
  27. template.Name = "template"
  28. template.Parent = game.StarterGui
  29. --//
  30. main.Name = "main"
  31. main.Parent = template
  32. main.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
  33. main.BorderSizePixel = 0
  34. main.Position = UDim2.new(0.050512448, 0, 0.324546933, 0)
  35. main.Size = UDim2.new(0, 218, 0, 293)
  36. --//
  37. button7.Name = "button7"
  38. button7.Parent = main
  39. button7.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  40. button7.BorderSizePixel = 0
  41. button7.Position = UDim2.new(0.0412844047, 0, 0.69624573, 0)
  42. button7.Size = UDim2.new(0, 98, 0, 50)
  43. button7.Font = Enum.Font.SourceSansLight
  44. button7.TextColor3 = Color3.new(1, 1, 1)
  45. button7.TextSize = 17
  46. --//
  47. button8.Name = "button8"
  48. button8.Parent = main
  49. button8.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  50. button8.BorderSizePixel = 0
  51. button8.Position = UDim2.new(0.527522922, 0, 0.69624573, 0)
  52. button8.Size = UDim2.new(0, 94, 0, 50)
  53. button8.Font = Enum.Font.SourceSansLight
  54. button8.TextColor3 = Color3.new(1, 1, 1)
  55. button8.TextSize = 17
  56. --//
  57. textbox1.Name = "textbox1"
  58. textbox1.Parent = main
  59. textbox1.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  60. textbox1.Position = UDim2.new(0.0412844047, 0, 0.887372017, 0)
  61. textbox1.Size = UDim2.new(0, 200, 0, 26)
  62. textbox1.Font = Enum.Font.SourceSansLight
  63. textbox1.Text = "name of player"
  64. textbox1.TextColor3 = Color3.new(1, 1, 1)
  65. textbox1.TextSize = 14
  66. --//
  67. button6.Name = "button6"
  68. button6.Parent = main
  69. button6.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  70. button6.BorderSizePixel = 0
  71. button6.Position = UDim2.new(0.527522922, 0, 0.501706481, 0)
  72. button6.Size = UDim2.new(0, 94, 0, 50)
  73. button6.Font = Enum.Font.SourceSansLight
  74. button6.TextColor3 = Color3.new(1, 1, 1)
  75. button6.TextSize = 17
  76. --//
  77. button5.Name = "button5"
  78. button5.Parent = main
  79. button5.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  80. button5.BorderSizePixel = 0
  81. button5.Position = UDim2.new(0.0412844047, 0, 0.501706481, 0)
  82. button5.Size = UDim2.new(0, 98, 0, 50)
  83. button5.Font = Enum.Font.SourceSansLight
  84. button5.TextColor3 = Color3.new(1, 1, 1)
  85. button5.TextSize = 17
  86. --//
  87. button2.Name = "button2"
  88. button2.Parent = main
  89. button2.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  90. button2.BorderSizePixel = 0
  91. button2.Position = UDim2.new(0.527522922, 0, 0.116040945, 0)
  92. button2.Size = UDim2.new(0, 94, 0, 50)
  93. button2.Font = Enum.Font.SourceSansLight
  94. button2.TextColor3 = Color3.new(1, 1, 1)
  95. button2.TextSize = 17
  96. --//
  97. button1.Name = "button1"
  98. button1.Parent = main
  99. button1.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  100. button1.BorderSizePixel = 0
  101. button1.Position = UDim2.new(0.0412844047, 0, 0.116040945, 0)
  102. button1.Size = UDim2.new(0, 98, 0, 50)
  103. button1.Font = Enum.Font.SourceSansLight
  104. button1.TextColor3 = Color3.new(1, 1, 1)
  105. button1.TextSize = 17
  106. --//
  107. button4.Name = "button4"
  108. button4.Parent = main
  109. button4.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  110. button4.BorderSizePixel = 0
  111. button4.Position = UDim2.new(0.527522922, 0, 0.310580194, 0)
  112. button4.Size = UDim2.new(0, 94, 0, 50)
  113. button4.Font = Enum.Font.SourceSansLight
  114. button4.TextColor3 = Color3.new(1, 1, 1)
  115. button4.TextSize = 17
  116. --//
  117. button3.Name = "button3"
  118. button3.Parent = main
  119. button3.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  120. button3.BorderSizePixel = 0
  121. button3.Position = UDim2.new(0.0412844047, 0, 0.310580194, 0)
  122. button3.Size = UDim2.new(0, 98, 0, 50)
  123. button3.Font = Enum.Font.SourceSansLight
  124. button3.TextColor3 = Color3.new(1, 1, 1)
  125. button3.TextSize = 17
  126. --//
  127. textlabel1.Name = "textlabel1"
  128. textlabel1.Parent = main
  129. textlabel1.BackgroundColor3 = Color3.new(1, 1, 1)
  130. textlabel1.BackgroundTransparency = 1
  131. textlabel1.Position = UDim2.new(0.0412844047, 0, 0, 0)
  132. textlabel1.Size = UDim2.new(0, 154, 0, 28)
  133. textlabel1.Font = Enum.Font.SourceSansSemibold
  134. textlabel1.Text = nameofgui
  135. textlabel1.TextColor3 = Color3.new(1, 1, 1)
  136. textlabel1.TextScaled = true
  137. textlabel1.TextSize = 14
  138. textlabel1.TextWrapped = true
  139. textlabel1.TextXAlignment = Enum.TextXAlignment.Left
  140. --//
  141. close.Name = "close"
  142. close.Parent = main
  143. close.BackgroundColor3 = Color3.new(0.494118, 0, 0)
  144. close.BorderSizePixel = 0
  145. close.Position = UDim2.new(0.830275238, 0, 0.0238907859, 0)
  146. close.Size = UDim2.new(0, 28, 0, 21)
  147. close.Font = Enum.Font.SourceSans
  148. close.Text = ""
  149. close.TextColor3 = Color3.new(0, 0, 0)
  150. close.TextSize = 14
  151.  
  152. --==// SCRIPTS GO BELOW //==--
  153. --// MAKE SURE THE BUTTONS CORRESPOND TO THEIR CORRECT COMMAND. TO CHECK, LOOK AT LINE 19-26 TO SEE WHAT BUTTON IS WHAT COMMAND
  154. close.MouseButton1Down:connect(function()
  155. template:Destroy() --CLOSE BUTTON
  156. end)
  157. button1.MouseButton1Down:connect(function()
  158. local player = game.Players.LocalPlayer
  159. local players = {} -- Table to get the players
  160. local core = game:GetService("CoreGui")
  161.  
  162. function CreateBillboard(adornee)
  163. local billboard = Instance.new("BillboardGui")
  164. billboard.Name = "E"
  165. local frame = Instance.new("Frame")
  166. billboard.AlwaysOnTop = true
  167. billboard.Size = UDim2.new(4, 0, 5.5, 0)
  168. billboard.StudsOffset = Vector3.new(0, 0, 0)
  169. billboard.Adornee = adornee
  170. frame.BackgroundColor = BrickColor.new("Maroon")
  171. frame.BackgroundTransparency = .35
  172. frame.BorderSizePixel = 0
  173. frame.Size = UDim2.new(1, 0, 1, 0)
  174. billboard.Parent = core
  175. frame.Parent = billboard
  176. end
  177.  
  178. function GetEnemyPlayers()
  179. players = {}
  180. if #game:GetService("Teams"):GetTeams() > 0 then
  181. local friendly = player.Team.Name
  182. for i,v in pairs(game:GetService("Teams"):GetTeams()) do
  183. if v.Name ~= friendly and v.Name ~= (game.Teams:FindFirstChild("Spectators") and game.Teams.Spectators.Name) then
  184. print("Enemy team: "..v.Name)
  185. local enemyPlayers = v:GetPlayers()
  186. for i,v in pairs(enemyPlayers) do
  187. table.insert(players, v)
  188. end
  189. end
  190. end
  191. return players
  192. end
  193. end
  194.  
  195. function InsertBillboardToPlayers()
  196. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do if v.Name == "E" then v:Destroy() end end
  197. if #game:GetService("Teams"):GetTeams() > 0 then
  198. local enemies = GetEnemyPlayers()
  199. for i,v in pairs(enemies) do
  200. CreateBillboard(v.Character.Head)
  201. end
  202. else
  203. warn("No enemy players.")
  204. end
  205. end
  206. InsertBillboardToPlayers()
  207.  
  208. player:GetMouse().KeyDown:Connect(function(key)
  209. if key:lower() == "k" then
  210. InsertBillboardToPlayers()
  211. end
  212. end)
  213.  
  214. game.Players.PlayerAdded:Connect(function(plr)
  215. plr.CharacterAdded:Wait()
  216. players = GetEnemyPlayers()
  217. InsertBillboardToPlayers()
  218. end)
  219. --code here
  220. end)
  221. button2.MouseButton1Down:connect(function()
  222. repeat wait()
  223. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  224. local mouse = game.Players.LocalPlayer:GetMouse()
  225. repeat wait() until mouse
  226. local plr = game.Players.LocalPlayer
  227. local torso = plr.Character.Torso
  228. local flying = true
  229. local deb = true
  230. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  231. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  232. local maxspeed = 50
  233. local speed = 0
  234.  
  235. function Fly()
  236. local bg = Instance.new("BodyGyro", torso)
  237. bg.P = 9e4
  238. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  239. bg.cframe = torso.CFrame
  240. local bv = Instance.new("BodyVelocity", torso)
  241. bv.velocity = Vector3.new(0,0.1,0)
  242. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  243. repeat wait()
  244. plr.Character.Humanoid.PlatformStand = true
  245. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  246. speed = speed+.5+(speed/maxspeed)
  247. if speed > maxspeed then
  248. speed = maxspeed
  249. end
  250. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  251. speed = speed-1
  252. if speed < 0 then
  253. speed = 0
  254. end
  255. end
  256. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  257. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  258. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  259. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  260. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  261. else
  262. bv.velocity = Vector3.new(0,0.1,0)
  263. end
  264. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  265. until not flying
  266. ctrl = {f = 0, b = 0, l = 0, r = 0}
  267. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  268. speed = 0
  269. bg:Destroy()
  270. bv:Destroy()
  271. plr.Character.Humanoid.PlatformStand = false
  272. end
  273. mouse.KeyDown:connect(function(key)
  274. if key:lower() == "e" then
  275. if flying then flying = false
  276. else
  277. flying = true
  278. Fly()
  279. end
  280. elseif key:lower() == "w" then
  281. ctrl.f = 1
  282. elseif key:lower() == "s" then
  283. ctrl.b = -1
  284. elseif key:lower() == "a" then
  285. ctrl.l = -1
  286. elseif key:lower() == "d" then
  287. ctrl.r = 1
  288. end
  289. end)
  290. mouse.KeyUp:connect(function(key)
  291. if key:lower() == "w" then
  292. ctrl.f = 0
  293. elseif key:lower() == "s" then
  294. ctrl.b = 0
  295. elseif key:lower() == "a" then
  296. ctrl.l = 0
  297. elseif key:lower() == "d" then
  298. ctrl.r = 0
  299. end
  300. end)
  301. Fly()
  302. --code here
  303. end)
  304. button3.MouseButton1Down:connect(function()
  305. --Made by !!!RelentlessRaptor#5709 on discord.
  306. --Press E to enable / disable
  307.  
  308. enabled = false
  309. function onKeyPress(actionName, userInputState, inputObject)
  310. if userInputState == Enum.UserInputState.Begin then
  311. if enabled == true then
  312. enabled = false
  313. else
  314. enabled = true
  315. end
  316. end
  317. end
  318. game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.E)
  319.  
  320. game:GetService('Players').LocalPlayer.Character.Torso.Touched:connect(function(t)
  321. if enabled == true then
  322. if t.CanCollide == true then
  323. t.CanCollide = false
  324. end
  325. end
  326. end)
  327. game:GetService('Players').LocalPlayer.Character.Torso.TouchEnded:connect(function(t)
  328. if enabled == true then
  329. if t.CanCollide == false then
  330. t.CanCollide = true
  331. end
  332. end
  333.  
  334. end)
  335. --code here
  336. end)
  337. button4.MouseButton1Down:connect(function()
  338. --code here
  339. end)
  340. button5.MouseButton1Down:connect(function()
  341. --code here
  342. end)
  343. button6.MouseButton1Down:connect(function()
  344. --code here
  345. end)
  346. button7.MouseButton1Down:connect(function()
  347. --code here
  348. end)
  349. button8.MouseButton1Down:connect(function()
  350. --code here
  351. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement