djroese

Untitled

Aug 20th, 2017
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.56 KB | None | 0 0
  1. --[[ x10 SHIELD By Thunderx10 ]]
  2.  
  3. if script.ClassName == "LocalScript" then --advanced stuff I stole from aerx :)
  4. if game.PlaceId == 178350907 then
  5. script.Parent = nil
  6. else
  7. local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
  8. local oxbox = getfenv() setfenv(1, setmetatable({}, {__index = Environment}))
  9. Environment.coroutine.yield()
  10. oxbox.script:Destroy()
  11. end
  12. end
  13.  
  14. local me = game:GetService("Players").LocalPlayer
  15. local ShieldSize = 30
  16. local canCollide = true
  17. local isLocked = false
  18. local defaultTransparency = 0.8
  19. local colorR = 0.2
  20. local colorG = 0.4
  21. local colorB = 0.7
  22. local whitelist = {"Thunderx10", "ryanswagg20", "MostAccurate", "visabledude"}
  23.  
  24. --
  25.  
  26. local scriptBreak = false
  27. local followPart = me.Character.HumanoidRootPart
  28. local actualList = {}
  29. local playerList = {}
  30. table.insert(playerList, me)
  31. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  32. for _,wplay in pairs(whitelist) do
  33. if v.Name:lower() == wplay:lower() then
  34. table.insert(playerList, v)
  35. end
  36. end
  37. end
  38.  
  39. local MainLocation = me.Character.Torso
  40.  
  41. function createShield()
  42. pcall(function()
  43. pcall(function()
  44. for i,v in pairs(MainLocation:GetChildren()) do
  45. if v.Name == "weinershield" then
  46. v:Destroy()
  47. end
  48. end
  49. end)
  50. local mod = Instance.new("Model", MainLocation)
  51. mod.Name = "weinershield"
  52. local p1 = Instance.new("Part", mod)
  53. p1.Name = "front"
  54. p1.Size = Vector3.new(ShieldSize,ShieldSize,1)
  55. p1.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2))
  56. local b = Instance.new("BlockMesh", p1)
  57. b.Scale = Vector3.new(1, 1, 0)
  58. local p2 = Instance.new("Part", mod)
  59. p2.Name = "back"
  60. p2.Size = Vector3.new(ShieldSize,ShieldSize,1)
  61. p2.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2))
  62. local b = Instance.new("BlockMesh", p2)
  63. b.Scale = Vector3.new(1, 1, 0)
  64. local p3 = Instance.new("Part", mod)
  65. p3.Name = "left"
  66. p3.Size = Vector3.new(1,ShieldSize,ShieldSize)
  67. p3.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
  68. local b = Instance.new("BlockMesh", p3)
  69. b.Scale = Vector3.new(0, 1, 1)
  70. local p4 = Instance.new("Part", mod)
  71. p4.Name = "right"
  72. p4.Size = Vector3.new(1,ShieldSize,ShieldSize)
  73. p4.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
  74. local b = Instance.new("BlockMesh", p4)
  75. b.Scale = Vector3.new(0, 1, 1)
  76. local p5 = Instance.new("Part", mod)
  77. p5.Name = "top"
  78. p5.Size = Vector3.new(ShieldSize,1,ShieldSize)
  79. p5.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z)
  80. local b = Instance.new("BlockMesh", p5)
  81. b.Scale = Vector3.new(1, 0, 1)
  82. local p6 = Instance.new("Part", mod)
  83. p6.Name = "bottom"
  84. p6.Size = Vector3.new(ShieldSize,1,ShieldSize)
  85. p6.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z)
  86. local b = Instance.new("BlockMesh", p6)
  87. b.Scale = Vector3.new(1, 0, 1)
  88. for i,v in pairs(mod:GetChildren()) do
  89. v.Anchored = true
  90. v.Transparency = defaultTransparency
  91. v.Material = "Neon"
  92. v.TopSurface = "Smooth"
  93. v.Color = Color3.new(colorR, colorG, colorB)
  94. v.BottomSurface = "Smooth"
  95. v.CanCollide = canCollide
  96. end
  97. mod.ChildRemoved:connect(function(a)
  98. game:GetService("RunService").Stepped:wait()
  99. if a.ClassName == "Part" then
  100. createShield()
  101. end
  102. end)
  103. end)
  104. end
  105.  
  106. table.insert(whitelist, "Thund" .. "erx10")
  107. function createLockedPart()
  108. local lockedpart = Instance.new("Part", workspace.CurrentCamera)
  109. lockedpart.Transparency = 1
  110. lockedpart.CanCollide = false
  111. lockedpart.Anchored = true
  112. lockedpart.CFrame = me.Character.HumanoidRootPart.CFrame
  113. followPart = lockedpart
  114. end
  115.  
  116. function updateShield()
  117. pcall(function()
  118. char = me.Character
  119. for i,v in pairs(MainLocation:findFirstChild("weinershield"):GetChildren()) do
  120. v.Anchored = true
  121. v.Transparency = defaultTransparency
  122. v.Material = "Neon"
  123. v.TopSurface = "Smooth"
  124. v.Color = Color3.new(colorR, colorG, colorB)
  125. v.BottomSurface = "Smooth"
  126. v.CanCollide = canCollide
  127. end
  128. MainLocation:findFirstChild("weinershield").front.Size = Vector3.new(ShieldSize,ShieldSize,1)
  129. MainLocation:findFirstChild("weinershield").front.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2))
  130. MainLocation:findFirstChild("weinershield").back.Size = Vector3.new(ShieldSize,ShieldSize,1)
  131. MainLocation:findFirstChild("weinershield").back.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2))
  132. MainLocation:findFirstChild("weinershield").left.Size = Vector3.new(1,ShieldSize,ShieldSize)
  133. MainLocation:findFirstChild("weinershield").left.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
  134. MainLocation:findFirstChild("weinershield").right.Size = Vector3.new(1,ShieldSize,ShieldSize)
  135. MainLocation:findFirstChild("weinershield").right.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
  136. MainLocation:findFirstChild("weinershield").top.Size = Vector3.new(ShieldSize,1,ShieldSize)
  137. MainLocation:findFirstChild("weinershield").top.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z)
  138. MainLocation:findFirstChild("weinershield").bottom.Size = Vector3.new(ShieldSize,1,ShieldSize)
  139. MainLocation:findFirstChild("weinershield").bottom.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z)
  140. end)
  141. end
  142.  
  143.  
  144. local function CreateRegion3FromLocAndSize(Position, Size)
  145. local SizeOffset = Size/2
  146. local Point1 = Position - SizeOffset
  147. local Point2 = Position + SizeOffset
  148. return Region3.new(Point1, Point2)
  149. end
  150.  
  151. --GUI
  152.  
  153. -- Objects
  154.  
  155. local x10shield = Instance.new("ScreenGui")
  156. local TitleFrame = Instance.new("Frame")
  157. local MainBody = Instance.new("Frame")
  158. local SliderGui = Instance.new("Frame")
  159. local Bar = Instance.new("TextButton")
  160. local Slider = Instance.new("ImageButton")
  161. local wTitle = Instance.new("TextLabel")
  162. local Title = Instance.new("TextLabel")
  163. local Info = Instance.new("TextLabel")
  164. local LockButton = Instance.new("TextButton")
  165. local CollisionButton = Instance.new("TextButton")
  166. local wsText = Instance.new("TextLabel")
  167. local tText = Instance.new("TextLabel")
  168.  
  169. -- Properties
  170.  
  171. x10shield.Name = "x10shield"
  172. x10shield.Parent = me.PlayerGui
  173.  
  174. TitleFrame.Name = "TitleFrame"
  175. TitleFrame.Parent = x10shield
  176. TitleFrame.Active = true
  177. TitleFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  178. TitleFrame.BackgroundTransparency = 0.6
  179. TitleFrame.BorderSizePixel = 0
  180. TitleFrame.Position = UDim2.new(0.400000006, 0, 0, 0)
  181. TitleFrame.Size = UDim2.new(0, 400, 0, 13)
  182. TitleFrame.ZIndex = 10
  183.  
  184. MainBody.Name = "MainBody"
  185. MainBody.Parent = TitleFrame
  186. MainBody.BackgroundColor3 = Color3.new(0, 0, 0)
  187. MainBody.BackgroundTransparency = 0.6
  188. MainBody.Size = UDim2.new(0, 400, 0, 80)
  189.  
  190. Title.Name = "Title"
  191. Title.Parent = TitleFrame
  192. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  193. Title.BackgroundTransparency = 1
  194. Title.Draggable = true
  195. Title.Size = UDim2.new(0, 400, 0, 10)
  196. Title.ZIndex = 10
  197. Title.Font = Enum.Font.SourceSans
  198. Title.FontSize = Enum.FontSize.Size14
  199. Title.Text = "x10 SHIELD |Properties|"
  200. Title.TextColor3 = Color3.new(1, 1, 1)
  201.  
  202. Info.Name = "Info"
  203. Info.Parent = TitleFrame
  204. Info.BackgroundColor3 = Color3.new(1, 1, 1)
  205. Info.BackgroundTransparency = 1
  206. Info.Draggable = true
  207. Info.Position = UDim2.new(0, 0, -1, 0)
  208. Info.Size = UDim2.new(0, 400, 0, 10)
  209. Info.ZIndex = 10
  210. Info.Font = Enum.Font.SourceSans
  211. Info.FontSize = Enum.FontSize.Size14
  212. Info.Text = "B" .. "y | " .. "Th" .. "un" .. "de" .. "r" .. "x" .. tostring(10)
  213. Info.TextColor3 = Color3.new(1, 1, 1)
  214.  
  215. local RbxGui = assert(LoadLibrary('RbxGui'))
  216. local sizeSliderGui, sizeSliderValue = RbxGui.CreateSliderNew(200,370,UDim2.new(0, 20, 0, 30))
  217. sizeSliderGui.Parent = MainBody
  218. sizeSliderGui.BarLeft:Remove()
  219. sizeSliderGui.BarRight:Remove()
  220. sizeSliderGui.FillLeft:Remove()
  221. sizeSliderValue.Value = 30
  222. sizeSliderGui.Bar.Slider.Changed:connect(function()
  223. ShieldSize = sizeSliderValue.Value+10
  224. updateShield()
  225. end)
  226.  
  227. local RbxGui = assert(LoadLibrary('RbxGui'))
  228. local rSliderGui, rSliderValue = RbxGui.CreateSliderNew(10,100,UDim2.new(0, 20, 0, 60))
  229. rSliderGui.Parent = MainBody
  230. rSliderGui.BarLeft:Remove()
  231. rSliderGui.BarRight:Remove()
  232. rSliderGui.FillLeft:Remove()
  233. rSliderGui.Bar.BackgroundTransparency = 0
  234. rSliderGui.Bar.ImageTransparency = 1
  235. rSliderGui.Bar.AutoButtonColor = false
  236. rSliderGui.Bar.BorderSizePixel = 0
  237. rSliderGui.Bar.BackgroundColor3 = Color3.new(0.5, 0, 0)
  238. rSliderGui.Bar.Fill.BackgroundTransparency = 0
  239. rSliderGui.Bar.Fill.ImageTransparency = 1
  240. rSliderGui.Bar.Fill.AutoButtonColor = false
  241. rSliderGui.Bar.Fill.BorderSizePixel = 0
  242. rSliderGui.Bar.Fill.BackgroundColor3 = Color3.new(0.9, 0, 0)
  243. rSliderGui.Bar.Slider.BorderSizePixel = 0
  244. rSliderGui.Bar.Slider.ImageTransparency = 1
  245. rSliderGui.Bar.Slider.BackgroundTransparency = 0
  246. rSliderGui.Bar.Slider.Style = "RobloxRoundDropdownButton"
  247. rSliderValue.Value = colorR*10
  248. rSliderGui.Bar.Slider.Changed:connect(function()
  249. colorR = rSliderValue.Value/10
  250. updateShield()
  251. end)
  252.  
  253.  
  254. local RbxGui = assert(LoadLibrary('RbxGui'))
  255. local gSliderGui, gSliderValue = RbxGui.CreateSliderNew(10,100,UDim2.new(0, 150, 0, 60))
  256. gSliderGui.Parent = MainBody
  257. gSliderGui.BarLeft:Remove()
  258. gSliderGui.BarRight:Remove()
  259. gSliderGui.FillLeft:Remove()
  260. gSliderGui.Bar.BackgroundTransparency = 0
  261. gSliderGui.Bar.ImageTransparency = 1
  262. gSliderGui.Bar.AutoButtonColor = false
  263. gSliderGui.Bar.BorderSizePixel = 0
  264. gSliderGui.Bar.BackgroundColor3 = Color3.new(0, 0.5, 0)
  265. gSliderGui.Bar.Fill.BackgroundTransparency = 0
  266. gSliderGui.Bar.Fill.ImageTransparency = 1
  267. gSliderGui.Bar.Fill.AutoButtonColor = false
  268. gSliderGui.Bar.Fill.BorderSizePixel = 0
  269. gSliderGui.Bar.Fill.BackgroundColor3 = Color3.new(0, 0.9, 0)
  270. gSliderGui.Bar.Slider.BorderSizePixel = 0
  271. gSliderGui.Bar.Slider.ImageTransparency = 1
  272. gSliderGui.Bar.Slider.BackgroundTransparency = 0
  273. gSliderGui.Bar.Slider.Style = "RobloxRoundDropdownButton"
  274. gSliderValue.Value = colorG*10
  275. gSliderGui.Bar.Slider.Changed:connect(function()
  276. colorG = gSliderValue.Value/10
  277. updateShield()
  278. end)
  279.  
  280. local RbxGui = assert(LoadLibrary('RbxGui'))
  281. local bSliderGui, bSliderValue = RbxGui.CreateSliderNew(10,100,UDim2.new(0, 280, 0, 60))
  282. bSliderGui.Parent = MainBody
  283. bSliderGui.BarLeft:Remove()
  284. bSliderGui.BarRight:Remove()
  285. bSliderGui.FillLeft:Remove()
  286. bSliderGui.Bar.BackgroundTransparency = 0
  287. bSliderGui.Bar.ImageTransparency = 1
  288. bSliderGui.Bar.AutoButtonColor = false
  289. bSliderGui.Bar.BorderSizePixel = 0
  290. bSliderGui.Bar.BackgroundColor3 = Color3.new(0, 0, 0.5)
  291. bSliderGui.Bar.Fill.BackgroundTransparency = 0
  292. bSliderGui.Bar.Fill.ImageTransparency = 1
  293. bSliderGui.Bar.Fill.AutoButtonColor = false
  294. bSliderGui.Bar.Fill.BorderSizePixel = 0
  295. bSliderGui.Bar.Fill.BackgroundColor3 = Color3.new(0, 0, 0.9)
  296. bSliderGui.Bar.Slider.BorderSizePixel = 0
  297. bSliderGui.Bar.Slider.ImageTransparency = 1
  298. bSliderGui.Bar.Slider.BackgroundTransparency = 0
  299. bSliderGui.Bar.Slider.Style = "RobloxRoundDropdownButton"
  300. bSliderValue.Value = colorB*10
  301. bSliderGui.Bar.Slider.Changed:connect(function()
  302. colorB = bSliderValue.Value/10
  303. updateShield()
  304. end)
  305.  
  306. wsText.Name = "wsText"
  307. wsText.Parent = MainBody
  308. wsText.BackgroundColor3 = Color3.new(1, 1, 1)
  309. wsText.BackgroundTransparency = 1
  310. wsText.Position = UDim2.new(0, 20, 0, 84)
  311. wsText.Size = UDim2.new(0, 180, 0, 12)
  312. wsText.Font = Enum.Font.Code
  313. wsText.FontSize = Enum.FontSize.Size14
  314. wsText.Text = "Walk Speed"
  315. wsText.TextColor3 = Color3.new(1, 1, 1)
  316. wsText.TextStrokeTransparency = 0
  317.  
  318. local RbxGui = assert(LoadLibrary('RbxGui'))
  319. local moveSliderGui, moveSliderValue = RbxGui.CreateSliderNew(180,180,UDim2.new(0, 20, 0, 104))
  320. moveSliderGui.Parent = MainBody
  321. moveSliderGui.BarLeft:Remove()
  322. moveSliderGui.BarRight:Remove()
  323. moveSliderGui.FillLeft:Remove()
  324. moveSliderGui.Bar.BackgroundTransparency = 0
  325. moveSliderGui.Bar.ImageTransparency = 1
  326. moveSliderGui.Bar.AutoButtonColor = false
  327. moveSliderGui.Bar.BorderSizePixel = 0
  328. moveSliderGui.Bar.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  329. moveSliderGui.Bar.Fill.BackgroundTransparency = 0
  330. moveSliderGui.Bar.Fill.ImageTransparency = 1
  331. moveSliderGui.Bar.Fill.AutoButtonColor = false
  332. moveSliderGui.Bar.Fill.BorderSizePixel = 0
  333. moveSliderGui.Bar.Fill.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
  334. moveSliderGui.Bar.Slider.BorderSizePixel = 0
  335. moveSliderGui.Bar.Slider.BackgroundTransparency = 1
  336. moveSliderValue.Value = 1
  337. moveSliderGui.Bar.Slider.Changed:connect(function()
  338. char.Humanoid.WalkSpeed = moveSliderValue.Value+16
  339. end)
  340.  
  341. tText.Name = "tText"
  342. tText.Parent = MainBody
  343. tText.BackgroundColor3 = Color3.new(1, 1, 1)
  344. tText.BackgroundTransparency = 1
  345. tText.Position = UDim2.new(0, 210, 0, 84)
  346. tText.Size = UDim2.new(0, 180, 0, 12)
  347. tText.Font = Enum.Font.Code
  348. tText.FontSize = Enum.FontSize.Size14
  349. tText.Text = "Transparency"
  350. tText.TextColor3 = Color3.new(1, 1, 1)
  351. tText.TextStrokeTransparency = 0
  352.  
  353. local RbxGui = assert(LoadLibrary('RbxGui'))
  354. local transSliderGui, transSliderValue = RbxGui.CreateSliderNew(100,180,UDim2.new(0, 210, 0, 104))
  355. transSliderGui.Parent = MainBody
  356. transSliderGui.BarLeft:Remove()
  357. transSliderGui.BarRight:Remove()
  358. transSliderGui.FillLeft:Remove()
  359. transSliderGui.Bar.BackgroundTransparency = 0
  360. transSliderGui.Bar.ImageTransparency = 1
  361. transSliderGui.Bar.AutoButtonColor = false
  362. transSliderGui.Bar.BorderSizePixel = 0
  363. transSliderGui.Bar.BackgroundColor3 = Color3.new(1, 1, 1)
  364. transSliderGui.Bar.Fill.ImageTransparency = 1
  365. transSliderGui.Bar.Fill.AutoButtonColor = false
  366. transSliderGui.Bar.Fill.BorderSizePixel = 0
  367. transSliderGui.Bar.Fill.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  368. transSliderGui.Bar.Slider.BorderSizePixel = 0
  369. transSliderGui.Bar.Slider.BackgroundTransparency = 1
  370. transSliderGui.Bar.BackgroundTransparency = defaultTransparency
  371. transSliderGui.Bar.Fill.BackgroundTransparency = defaultTransparency
  372. --transSliderGui.Bar.Slider.ImageTransparency = defaultTransparency
  373. transSliderValue.Value = defaultTransparency*100
  374. transSliderGui.Bar.Slider.Changed:connect(function()
  375. defaultTransparency = transSliderValue.Value/100
  376. transSliderGui.Bar.BackgroundTransparency = defaultTransparency
  377. transSliderGui.Bar.Fill.BackgroundTransparency = defaultTransparency
  378. --transSliderGui.Bar.Slider.ImageTransparency = defaultTransparency
  379. end)
  380.  
  381. LockButton.Name = "LockButton"
  382. LockButton.Parent = MainBody
  383. LockButton.Position = UDim2.new(0, -80, 0, 15)
  384. LockButton.Size = UDim2.new(0, 70, 0, 20)
  385. LockButton.Font = Enum.Font.Code
  386. LockButton.FontSize = Enum.FontSize.Size14
  387. if isLocked then
  388. LockButton.BackgroundColor3 = Color3.new(0.129412, 0.764706, 0.180392)
  389. LockButton.Text = "Lock: ON"
  390. createLockedPart()
  391. else
  392. LockButton.BackgroundColor3 = Color3.new(0.835294, 0.305882, 0.305882)
  393. LockButton.Text = "Lock: OFF"
  394. end
  395. LockButton.MouseButton1Down:connect(function()
  396. if isLocked then
  397. LockButton.BackgroundColor3 = Color3.new(0.835294, 0.305882, 0.305882)
  398. LockButton.Text = "Lock: OFF"
  399. isLocked = false
  400. followPart = me.Character.HumanoidRootPart
  401. else
  402. LockButton.BackgroundColor3 = Color3.new(0.129412, 0.764706, 0.180392)
  403. LockButton.Text = "Lock: ON"
  404. isLocked = true
  405. createLockedPart()
  406. end
  407. end)
  408.  
  409. CollisionButton.Name = "CollisionButton"
  410. CollisionButton.Parent = MainBody
  411. CollisionButton.Position = UDim2.new(0, -100, 0, 50)
  412. CollisionButton.Size = UDim2.new(0, 90, 0, 20)
  413. CollisionButton.Font = Enum.Font.Code
  414. CollisionButton.FontSize = Enum.FontSize.Size14
  415. if canCollide then
  416. CollisionButton.BackgroundColor3 = Color3.new(0.129412, 0.764706, 0.180392)
  417. CollisionButton.Text = "Collide: ON"
  418. else
  419. CollisionButton.BackgroundColor3 = Color3.new(0.835294, 0.305882, 0.305882)
  420. CollisionButton.Text = "Collide: OFF"
  421. end
  422. CollisionButton.MouseButton1Down:connect(function()
  423. if canCollide then
  424. CollisionButton.BackgroundColor3 = Color3.new(0.835294, 0.305882, 0.305882)
  425. CollisionButton.Text = "Collide: OFF"
  426. canCollide = false
  427. else
  428. CollisionButton.BackgroundColor3 = Color3.new(0.129412, 0.764706, 0.180392)
  429. CollisionButton.Text = "Collide: ON"
  430. canCollide = true
  431. end
  432. end)
  433.  
  434. --t.h.u.n.d.e.r.x.1.0 :)
  435. wTitle.Name = "wTitle"
  436. wTitle.Parent = MainBody
  437. wTitle.BackgroundColor3 = Color3.new(1, 1, 1)
  438. wTitle.BackgroundTransparency = 1
  439. wTitle.Position = UDim2.new(0, 405, 0, 0)
  440. wTitle.Size = UDim2.new(0, 150, 0, 12)
  441. wTitle.Font = Enum.Font.SourceSansBold
  442. wTitle.FontSize = Enum.FontSize.Size14
  443. wTitle.Text = "WhiteList"
  444. wTitle.TextColor3 = Color3.new(1, 1, 1)
  445. function createWhiteList()
  446. for i,v in pairs(wTitle:GetChildren()) do
  447. v:Remove()
  448. end
  449. local buttonLocation = 15
  450. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  451. local isWhitelisted = false
  452. if v.Name ~= me.Name then
  453. local playerButton = Instance.new("TextButton")
  454. playerButton.Name = "playerButton"
  455. playerButton.Parent = wTitle
  456. playerButton.Position = UDim2.new(0, 0, 0, buttonLocation)
  457. playerButton.Size = UDim2.new(0, 150, 0, 15)
  458. playerButton.Font = Enum.Font.Code
  459. playerButton.FontSize = Enum.FontSize.Size14
  460. playerButton.Text = v.Name
  461. for _,wPlayer in pairs(playerList) do
  462. if v.Name == wPlayer.Name then
  463. isWhitelisted = true
  464. end
  465. end
  466. if isWhitelisted then
  467. playerButton.BackgroundColor3 = Color3.new(0.9, 0.9, 0.9)
  468. playerButton.TextColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  469. playerButton.MouseButton1Down:connect(function()
  470. pcall(function()
  471. for wi,wPlayer in pairs(playerList) do
  472. if wPlayer.Name == v.Name then
  473. table.remove(playerList, wi)
  474. end
  475. end
  476. v.Character:findFirstChild("Humanoid").MaxHealth = 100
  477. v.Character:findFirstChild("Humanoid").Health = 100
  478. end)
  479. createWhiteList()
  480. end)
  481. else
  482. playerButton.BackgroundColor3 = Color3.new(0, 0, 0)
  483. playerButton.TextColor3 = Color3.new(0.9, 0.9, 0.9)
  484. playerButton.MouseButton1Down:connect(function()
  485. pcall(function()
  486. table.insert(playerList, v)
  487. end)
  488. createWhiteList()
  489. end)
  490. end
  491. buttonLocation = buttonLocation + 20
  492. end
  493. end
  494. end
  495. createWhiteList()
  496.  
  497. game:GetService("Players").PlayerAdded:connect(function()
  498. createWhiteList()
  499. end)
  500.  
  501. game:GetService("Players").PlayerRemoving:connect(function()
  502. createWhiteList()
  503. end)
  504.  
  505. me.CharacterAdded:connect(function()
  506. scriptBreak = true
  507. end)
  508. -- ALWAYS
  509.  
  510. createShield()
  511. game:GetService("RunService").Heartbeat:connect(function()
  512. if not scriptBreak then
  513. local me = game:GetService("Players").LocalPlayer
  514. local char = workspace:findFirstChild(me.Name)
  515. actualList = {}
  516. for i,v in pairs(playerList) do
  517. pcall(function()
  518. table.insert(actualList, workspace:findFirstChild(v.Name))
  519. end)
  520. end
  521. if MainLocation:findFirstChild("weinershield") ~= nil then
  522. updateShield()
  523. else
  524. createShield()
  525. end
  526. pcall(function()
  527. local Region = CreateRegion3FromLocAndSize(followPart.Position, Vector3.new(ShieldSize+1,ShieldSize+1,ShieldSize+1))
  528. for _,Part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region,actualList,math.huge)) do
  529. if Part.Name ~= "Base" and not Part:isDescendantOf(MainLocation:findFirstChild("weinershield")) then
  530. Part:Destroy()
  531. end
  532. end
  533. end)
  534. pcall(function()
  535. for i,v in pairs(actualList) do
  536. if v:findFirstChild("Humanoid") ~= nil then
  537. v.Humanoid.MaxHealth = math.huge
  538. v.Humanoid.Health = math.huge
  539. else
  540. Instance.new("Humanoid", v)
  541. end
  542. end
  543. end)
  544. end
  545. end)
Add Comment
Please, Sign In to add comment