Advertisement
dahpiglz

Untitled

Nov 17th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility: by WaverlyCole & Mokiros")
  3. InternalData = {}
  4. do
  5.     script.Parent = owner.Character
  6.     local Event = Instance.new("RemoteEvent")
  7.     Event.Name = "UserInput"
  8.     local function NewFakeEvent()
  9.         local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10.         return Fake
  11.     end
  12.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17.     local function TriggerEvent(self,Event,...)
  18.         local Trigger = Mouse[Event]
  19.         if Trigger and Trigger.fakeEvent and Trigger.Function then
  20.             Trigger.Function(...)
  21.         end
  22.     end
  23.     Mouse.TrigEvent = TriggerEvent
  24.     UserInputService.TrigEvent = TriggerEvent
  25.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  26.         if FiredBy.Name ~= owner.Name then end
  27.         if Input.MouseEvent then
  28.             Mouse.Target = Input.Target
  29.             Mouse.Hit = Input.Hit
  30.         else
  31.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33.                 return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34.             end
  35.             for _,Action in pairs(ContextActionService.Actions) do
  36.                 for _,Key in pairs(Action.Keys) do
  37.                     if Key==Input.KeyCode then
  38.                         Action.Function(Action.Name,Input.UserInputState,Input)
  39.                     end
  40.                 end
  41.             end
  42.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44.         end
  45.     end)
  46.     InternalData["Mouse"] = Mouse
  47.     InternalData["ContextActionService"] = ContextActionService
  48.     InternalData["UserInputService"] = UserInputService
  49.     Event.Parent = NLS([[
  50.         local Player = owner
  51.         local Event = script:WaitForChild("UserInput")
  52.         local UserInputService = game:GetService("UserInputService")
  53.         local Mouse = Player:GetMouse()
  54.         local Input = function(Input,gameProcessedEvent)
  55.             if gameProcessedEvent then return end
  56.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57.         end
  58.         UserInputService.InputBegan:Connect(Input)
  59.         UserInputService.InputEnded:Connect(Input)
  60.         local Hit,Target
  61.         while wait(1/30) do
  62.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63.                 Hit,Targer = Mouse.Hit,Mouse.Target
  64.                 Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65.             end
  66.         end
  67.     ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70.     __index = function (self,Index)
  71.         local Sandbox = function (Thing)
  72.             if Thing:IsA("Player") then
  73.                 local RealPlayer = Thing
  74.                 return setmetatable({},{
  75.                     __index = function (self,Index)
  76.                         local Type = type(RealPlayer[Index])
  77.                         if Type == "function" then
  78.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79.                                 return function (self)
  80.                                     return InternalData["Mouse"]
  81.                                 end
  82.                             end
  83.                             return function (self,...)
  84.                                 return RealPlayer[Index](RealPlayer,...)
  85.                             end
  86.                         else
  87.                             return RealPlayer[Index]
  88.                         end
  89.                     end;
  90.                     __tostring = function(self)
  91.                         return RealPlayer.Name
  92.                     end
  93.                 })
  94.             end
  95.         end
  96.         if RealGame[Index] then
  97.             local Type = type(RealGame[Index])
  98.             if Type == "function" then
  99.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  100.                     return function (self,Service)
  101.                         if Service:lower() == "players" then
  102.                             return setmetatable({},{
  103.                                 __index = function (self2,Index2)
  104.                                     local RealService = RealGame:GetService(Service)
  105.                                     local Type2 = type(Index2)
  106.                                     if Type2 == "function" then
  107.                                         return function (self,...)
  108.                                             return RealService[Index2](RealService,...)
  109.                                         end
  110.                                     else
  111.                                         if Index2:lower() == "localplayer" then
  112.                                             return Sandbox(owner)
  113.                                         end
  114.                                         return RealService[Index2]
  115.                                     end
  116.                                 end;
  117.                                 __tostring = function(self)
  118.                                     return RealGame:GetService(Service).Name
  119.                                 end
  120.                             })
  121.                         elseif Service:lower() == "contextactionservice" then
  122.                             return InternalData["ContextActionService"]
  123.                         elseif Service:lower() == "contextactionservice" then
  124.                             return InternalData["UserInputService"]
  125.                         elseif Service:lower() == "runservice" then
  126.                             return setmetatable({},{
  127.                                 __index = function(self2,Index2)
  128.                                     local RealService = RealGame:GetService(Service)
  129.                                     local Type2 = type(Index2)
  130.                                     if Type2 == "function" then
  131.                                         return function (self,...)
  132.                                             return RealService[Index2](RealService,...)
  133.                                         end
  134.                                     else
  135.                                         if Index2:lower() == "bindtorenderstep" then
  136.                                             return function (self,Name,Priority,Function)
  137.                                                 return RealGame:GetService("RunService").Stepped:Connect(Function)
  138.                                             end
  139.                                         end
  140.                                         if Index2:lower() == "renderstepped" then
  141.                                             return RealService["Stepped"]
  142.                                         end
  143.                                         return RealService[Index2]
  144.                                     end
  145.                                 end
  146.                             })
  147.                         else
  148.                             return RealGame:GetService(Service)
  149.                         end
  150.                     end
  151.                 end
  152.                 return function (self,...)
  153.                     return RealGame[Index](RealGame,...)
  154.                 end
  155.             else
  156.                 if game:GetService(Index) then
  157.                     return game:GetService(Index)
  158.                 end
  159.                 return RealGame[Index]
  160.             end
  161.         else
  162.             return nil
  163.         end
  164.     end
  165. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  166. print("Complete! Running...")
  167.  
  168.  
  169.  
  170. --ForceField
  171.  
  172.  
  173. --Intro
  174.  
  175. playintro = 0
  176.  
  177. if playintro == 1 then
  178. introtypespeed = 0.2
  179. introerasespeed = 0.05
  180. local introscreengui = Instance.new("ScreenGui")
  181. local introlabel = Instance.new("TextLabel")
  182. introscreengui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  183. introlabel.Parent = introscreengui
  184. introlabel.BackgroundTransparency = 1
  185. introlabel.Size = UDim2.new(0, 1270, 0, 707)
  186. introlabel.Position = UDim2.new(0, 350, 0, 0)
  187. introlabel.TextColor3 = Color3.new(130, 203, 255)
  188. introlabel.TextSize = 100
  189. introlabel.TextStrokeTransparency = (0)
  190. introlabel.Text = ("F")
  191. wait(introtypespeed)
  192. introlabel.Text = ("Fo")
  193. wait(introtypespeed)
  194. introlabel.Text = ("For")
  195. wait(introtypespeed)
  196. introlabel.Text = ("Forc")
  197. wait(introtypespeed)
  198. introlabel.Text = ("Force")
  199. wait(introtypespeed)
  200. introlabel.Text = ("Force ")
  201. wait(introtypespeed)
  202. introlabel.Text = ("Force F")
  203. wait(introtypespeed)
  204. introlabel.Text = ("Force Fi")
  205. wait(introtypespeed)
  206. introlabel.Text = ("Force Fie")
  207. wait(introtypespeed)
  208. introlabel.Text = ("Force Fiel")
  209. wait(introtypespeed)
  210. introlabel.Text = ("Force Field")
  211. wait(0.5)
  212. wait(introtypespeed)
  213. introlabel.Text = ("Force Fiel")
  214. wait(introerasespeed)
  215. introlabel.Text = ("Force Fie")
  216. wait(introerasespeed)
  217. introlabel.Text = ("Force Fi")
  218. wait(introerasespeed)
  219. introlabel.Text = ("Force F")
  220. wait(introerasespeed)
  221. introlabel.Text = ("Force ")
  222. wait(introerasespeed)
  223. introlabel.Text = ("Force")
  224. wait(introerasespeed)
  225. introlabel.Text = ("Forc")
  226. wait(introerasespeed)
  227. introlabel.Text = ("For")
  228. wait(introerasespeed)
  229. introlabel.Text = ("Fo")
  230. wait(introerasespeed)
  231. introlabel.Text = ("F")
  232. wait(introerasespeed)
  233. introlabel.Text = ("")
  234. end
  235.  
  236.  
  237.  
  238. print("ForceField Script Loaded")
  239.  
  240. local player = game:GetService("Players").LocalPlayer
  241. local character = player.Character
  242. local mouse = player:GetMouse()
  243.  
  244. local head = character.Head
  245. local torso = nil
  246.  
  247. if character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  248.     torso = character.Torso
  249.     else
  250.     torso = character.UpperTorso
  251. end
  252.  
  253. shieldon = true
  254. shieldsize = 10
  255. shieldgrowrate = 0.025
  256. shieldv = nil
  257.  
  258. local PermissionList = {}
  259. --local user1 = ("")
  260. --local user2 = ("")
  261. --local user3 = ("")
  262.  
  263. --Shield Customization
  264.  
  265. shieldtransparency = 0.7
  266. shieldcolor = BrickColor.new("Bright red")
  267. shieldmaterial = ("Neon")
  268. shieldshape = ("Block")
  269.  
  270. --Other Stuff
  271. character.Humanoid.MaxHealth = math.huge
  272. character.Humanoid.Health = math.huge
  273.  
  274. ff = Instance.new("ForceField")
  275. ff.Visible = false
  276. ff.Parent = character
  277.  
  278. --container1 = Instance.new("Folder")
  279. --container1.Parent = game.Workspace
  280. --character.Parent = container1
  281.  
  282. --h = Instance.new("Humanoid")
  283. --h.Parent = container1
  284.  
  285. --Clear Old Gui
  286. if player.PlayerGui:FindFirstChild("ShieldGui") ~= nil then
  287.     player.PlayerGui.ShieldGui:Destroy()
  288. end
  289.  
  290. --Make Gui
  291. local screenguia = Instance.new("ScreenGui")
  292. screenguia.Parent = player.PlayerGui
  293. screenguia.Name = ("ShieldGui")
  294.  
  295. local screengui = Instance.new("Frame")
  296. screengui.Parent = screenguia
  297. screengui.Name = ("Frame")
  298. screengui.BackgroundTransparency = 1
  299.  
  300. screengui.Size = UDim2.new(1, 0, 1, 0)
  301. screengui.Position = UDim2.new(0, 0, 0, 0)
  302.  
  303. permissionlistgui = Instance.new("Frame")
  304. permissionlistgui.Parent = screengui
  305. permissionlistgui.Name = ("PermissionListGui")
  306. permissionlistgui.BackgroundTransparency = 1
  307.  
  308. permissionlistgui.Size = UDim2.new(1, 0, 1, 0)
  309. permissionlistgui.Position = UDim2.new(0, 0, 0, 0)
  310.  
  311. customizeguiopen = false
  312. local screengui2 = Instance.new("Frame")
  313. screengui2.Parent = screenguia
  314. screengui2.Visible = false
  315. screengui2.Name = ("Customize")
  316. screengui2.BackgroundTransparency = 1
  317.  
  318. screengui2.Size = UDim2.new(1, 0, 1, 0)
  319. screengui2.Position = UDim2.new(0, 0, 0, 0)
  320.  
  321. --Create shield visual
  322.  
  323. s = Instance.new("Part")
  324. s.Anchored = true
  325. s.CanCollide = false
  326. s.Parent = game.Workspace
  327. s.TopSurface = ("Smooth")
  328. s.BottomSurface = ("Smooth")
  329. s.Transparency = shieldtransparency
  330. s.BrickColor = shieldcolor
  331. s.Material = shieldmaterial
  332. s.Size = Vector3.new(0,0,0)
  333. s.Name = ("ShieldVisual")
  334. shieldv = s
  335.  
  336.  
  337. --Size Gui
  338.  
  339.  
  340. local textbutton1 = Instance.new("TextButton")
  341. local textbar1 = Instance.new("TextBox")
  342. textbar1.Parent = screengui
  343. textbar1.Position = UDim2.new(0, 0, 0.370, 0)
  344. textbar1.Size = UDim2.new(0, 126, 0, 18)
  345. textbar1.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  346. textbar1.TextColor3 = Color3.new(240, 240, 240)
  347. textbar1.BackgroundTransparency = (0)
  348. textbar1.BorderSizePixel = (0)
  349. textbar1.Text = ("10")
  350. textbutton1.Parent = screengui
  351. textbutton1.Text = ("Apply Size")
  352. textbutton1.Position = UDim2.new(0, 0, 0.352, 0)
  353. textbutton1.Size = UDim2.new(0, 126, 0, 18)
  354. textbutton1.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  355. textbutton1.TextColor3 = Color3.new(240, 240, 240)
  356. textbutton1.BackgroundTransparency = (0)
  357. textbutton1.BorderSizePixel = (0)
  358.  
  359. function onClick()
  360.     n = tonumber(textbar1.Text)
  361.     shieldsize = n
  362.     --shieldv:TweenSize(Vector3.new(n, n, n), Enum.EasingDirection.In, Enum.EasingStyle.Linear, shieldgrowrate, false);
  363. end
  364.  
  365. textbutton1.MouseButton1Click:connect(onClick)
  366.  
  367.  
  368. --local textbutton11 = Instance.new("TextButton")
  369. --local textbar11 = Instance.new("TextLabel")
  370. --textbar11.Parent = screengui
  371. --textbar11.Text = game:GetService("Players").LocalPlayer.Name
  372. --textbar11.Position = UDim2.new(0, 0, 0.494, 0)
  373. --textbar11.Size = UDim2.new(0, 126, 0, 18)
  374. --textbar11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  375. --textbar11.TextColor3 = Color3.new(58, 58, 58)
  376. --textbar11.BackgroundTransparency = (0)
  377. --textbar11.BorderSizePixel = (0)
  378.  
  379.  
  380.  
  381.  
  382. local textbutton11 = Instance.new("TextButton")
  383. textbutton11.Parent = screengui
  384. textbutton11.Text = ("Apply Access Changes")
  385. textbutton11.Position = UDim2.new(0, 0, 0.476, 0)
  386. textbutton11.Size = UDim2.new(0, 126, 0, 18)
  387. textbutton11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  388. textbutton11.TextColor3 = Color3.new(240, 240, 240)
  389. textbutton11.BackgroundTransparency = (0)
  390. textbutton11.BorderSizePixel = (0)
  391.  
  392. local textbutton11a = Instance.new("TextButton")
  393. textbutton11a.Parent = screengui
  394. textbutton11a.Text = ("+")
  395. textbutton11a.Position = UDim2.new(0.068, 0, 0.476, 0)
  396. textbutton11a.Size = UDim2.new(0, 18, 0, 18)
  397. textbutton11a.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  398. textbutton11a.TextColor3 = Color3.new(240, 240, 240)
  399. textbutton11a.BackgroundTransparency = (0)
  400. textbutton11a.BorderSizePixel = (0)
  401.  
  402. local textbutton11b = Instance.new("TextButton")
  403. textbutton11b.Parent = screengui
  404. textbutton11b.Text = ("-")
  405. textbutton11b.Position = UDim2.new(0.078, 0, 0.476, 0)
  406. textbutton11b.Size = UDim2.new(0, 18, 0, 18)
  407. textbutton11b.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  408. textbutton11b.TextColor3 = Color3.new(240, 240, 240)
  409. textbutton11b.BackgroundTransparency = (0)
  410. textbutton11b.BorderSizePixel = (0)
  411.  
  412. nextpermissionlistslotposition = 0.512
  413.  
  414. function onClick()
  415.     local textbar12 = Instance.new("TextBox")
  416.     textbar12.Parent = permissionlistgui
  417.     textbar12.Position = UDim2.new(0, 0, nextpermissionlistslotposition, 0)
  418.     textbar12.Size = UDim2.new(0, 126, 0, 18)
  419.     textbar12.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  420.     textbar12.TextColor3 = Color3.new(240, 240, 240)
  421.     textbar12.BackgroundTransparency = (0)
  422.     textbar12.BorderSizePixel = (0)
  423.     textbar12.Text = ("Player Name")
  424.  
  425.     nextpermissionlistslotposition = nextpermissionlistslotposition + 0.018
  426. end
  427.  
  428. textbutton11a.MouseButton1Click:connect(onClick)
  429.  
  430. function onClick()
  431.     local lookingfor = #permissionlistgui:GetChildren()
  432.     for i,v in pairs(permissionlistgui:GetChildren()) do
  433.         if i == lookingfor then
  434.             v:Destroy()
  435.             nextpermissionlistslotposition = nextpermissionlistslotposition - 0.018
  436.         end
  437.     end
  438. end
  439.  
  440. textbutton11b.MouseButton1Click:connect(onClick)
  441.  
  442. function onClick()
  443.     for i = 1, #PermissionList do
  444.         PermissionList[i] = nil
  445.     end
  446.     for i,v in pairs(permissionlistgui:GetChildren()) do
  447.         PermissionList[i] = v.Text
  448.     end
  449. end
  450.  
  451. textbutton11.MouseButton1Click:connect(onClick)
  452.  
  453.  
  454.  
  455.  
  456.  
  457. --Toggle Gui
  458.  
  459.  
  460. local textbutton2 = Instance.new("TextButton")
  461. textbutton2.Parent = screengui
  462. textbutton2.Text = ("Toggle Shield Off")
  463. textbutton2.Position = UDim2.new(0, 0, 0.406, 0)
  464. textbutton2.Size = UDim2.new(0, 126, 0, 18)
  465. textbutton2.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  466. textbutton2.TextColor3 = Color3.new(240, 240, 240)
  467. textbutton2.BackgroundTransparency = (0)
  468. textbutton2.BorderSizePixel = (0)
  469.  
  470. function onClick()
  471.     if shieldon == true then
  472.         shieldon = false
  473.         character.Humanoid.MaxHealth = 100
  474.         character.Humanoid.Health = 100
  475.         shieldv.Transparency = 1
  476.         ff.Parent = nil
  477.         textbutton2.Text = ("Toggle Shield On")
  478.     else
  479.         shieldon = true
  480.         character.Humanoid.MaxHealth = math.huge
  481.         character.Humanoid.Health = math.huge
  482.         shieldv.Transparency = shieldtransparency
  483.         ff.Parent = character
  484.         textbutton2.Text = ("Toggle Shield Off")
  485.     end
  486. end
  487.  
  488. textbutton2.MouseButton1Click:connect(onClick)
  489.  
  490. --Toggle Customization Gui
  491.  
  492. local textbutton3 = Instance.new("TextButton")
  493. textbutton3.Parent = screengui
  494. textbutton3.Text = ("Customize")
  495. textbutton3.Position = UDim2.new(0, 0, 0.440, 0)
  496. textbutton3.Size = UDim2.new(0, 126, 0, 18)
  497. textbutton3.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  498. textbutton3.TextColor3 = Color3.new(240, 240, 240)
  499. textbutton3.BackgroundTransparency = (0)
  500. textbutton3.BorderSizePixel = (0)
  501.  
  502. function onClick()
  503.     if customizeguiopen == true then
  504.         customizeguiopen = false
  505.         screengui2.Visible = false
  506.     else
  507.         customizeguiopen = true
  508.         screengui2.Visible = true
  509.     end
  510. end
  511.  
  512. textbutton3.MouseButton1Click:connect(onClick)
  513.  
  514.  
  515. --Shield Colors
  516.  
  517.  
  518. --Red
  519. local textbuttonc1 = Instance.new("TextButton")
  520. textbuttonc1.Parent = screengui2
  521. textbuttonc1.Text = ("Red Shield Color")
  522. textbuttonc1.Position = UDim2.new(0.88, 0, 0.440, 0)
  523. textbuttonc1.Size = UDim2.new(0, 126, 0, 18)
  524. textbuttonc1.BackgroundColor3 = Color3.fromRGB(128, 30, 30)
  525. textbuttonc1.TextColor3 = Color3.new(240, 240, 240)
  526. textbuttonc1.BackgroundTransparency = (0)
  527. textbuttonc1.BorderSizePixel = (0)
  528.  
  529. function onClick()
  530.     shieldv.BrickColor = BrickColor.new("Bright red")
  531.     shieldcolor = BrickColor.new("Bright red")
  532. end
  533. textbuttonc1.MouseButton1Click:connect(onClick)
  534.  
  535. --Green
  536. local textbuttonc2 = Instance.new("TextButton")
  537. textbuttonc2.Parent = screengui2
  538. textbuttonc2.Text = ("Green Shield Color")
  539. textbuttonc2.Position = UDim2.new(0.88, 0, 0.458, 0)
  540. textbuttonc2.Size = UDim2.new(0, 126, 0, 18)
  541. textbuttonc2.BackgroundColor3 = Color3.fromRGB(30, 128, 30)
  542. textbuttonc2.TextColor3 = Color3.new(240, 240, 240)
  543. textbuttonc2.BackgroundTransparency = (0)
  544. textbuttonc2.BorderSizePixel = (0)
  545.  
  546. function onClick()
  547.     shieldv.BrickColor = BrickColor.new("Bright green")
  548.     shieldcolor = BrickColor.new("Bright green")
  549. end
  550. textbuttonc2.MouseButton1Click:connect(onClick)
  551.  
  552. --Blue
  553. local textbuttonc3 = Instance.new("TextButton")
  554. textbuttonc3.Parent = screengui2
  555. textbuttonc3.Text = ("Blue Shield Color")
  556. textbuttonc3.Position = UDim2.new(0.88, 0, 0.476, 0)
  557. textbuttonc3.Size = UDim2.new(0, 126, 0, 18)
  558. textbuttonc3.BackgroundColor3 = Color3.fromRGB(30, 30, 128)
  559. textbuttonc3.TextColor3 = Color3.new(240, 240, 240)
  560. textbuttonc3.BackgroundTransparency = (0)
  561. textbuttonc3.BorderSizePixel = (0)
  562.  
  563. function onClick()
  564.     shieldv.BrickColor = BrickColor.new("Really blue")
  565.     shieldcolor = BrickColor.new("Really blue")
  566. end
  567. textbuttonc3.MouseButton1Click:connect(onClick)
  568.  
  569. --Yellow
  570. local textbuttonc5 = Instance.new("TextButton")
  571. textbuttonc5.Parent = screengui2
  572. textbuttonc5.Text = ("Yellow Shield Color")
  573. textbuttonc5.Position = UDim2.new(0.88, 0, 0.494, 0)
  574. textbuttonc5.Size = UDim2.new(0, 126, 0, 18)
  575. textbuttonc5.BackgroundColor3 = Color3.fromRGB(128, 128, 30)
  576. textbuttonc5.TextColor3 = Color3.new(128, 128, 30)
  577. textbuttonc5.BackgroundTransparency = (0)
  578. textbuttonc5.BorderSizePixel = (0)
  579.  
  580. function onClick()
  581.     shieldv.BrickColor = BrickColor.new("New Yeller")
  582.     shieldcolor = BrickColor.new("New Yeller")
  583. end
  584. textbuttonc5.MouseButton1Click:connect(onClick)
  585.  
  586. --Pink
  587. local textbuttonc6 = Instance.new("TextButton")
  588. textbuttonc6.Parent = screengui2
  589. textbuttonc6.Text = ("Pink Shield Color")
  590. textbuttonc6.Position = UDim2.new(0.88, 0, 0.512, 0)
  591. textbuttonc6.Size = UDim2.new(0, 126, 0, 18)
  592. textbuttonc6.BackgroundColor3 = Color3.fromRGB(128, 30, 95)
  593. textbuttonc6.TextColor3 = Color3.new(240, 240, 240)
  594. textbuttonc6.BackgroundTransparency = (0)
  595. textbuttonc6.BorderSizePixel = (0)
  596.  
  597. function onClick()
  598.     shieldv.BrickColor = BrickColor.new("Hot pink")
  599.     shieldcolor = BrickColor.new("Hot pink")
  600. end
  601. textbuttonc6.MouseButton1Click:connect(onClick)
  602.  
  603. --White
  604. local textbuttonc7 = Instance.new("TextButton")
  605. textbuttonc7.Parent = screengui2
  606. textbuttonc7.Text = ("White Shield Color")
  607. textbuttonc7.Position = UDim2.new(0.88, 0, 0.530, 0)
  608. textbuttonc7.Size = UDim2.new(0, 126, 0, 18)
  609. textbuttonc7.BackgroundColor3 = Color3.fromRGB(128, 128, 128)
  610. textbuttonc7.TextColor3 = Color3.new(240, 240, 240)
  611. textbuttonc7.BackgroundTransparency = (0)
  612. textbuttonc7.BorderSizePixel = (0)
  613.  
  614. function onClick()
  615.     shieldv.BrickColor = BrickColor.new("Institutional white")
  616.     shieldcolor = BrickColor.new("Institutional white")
  617. end
  618. textbuttonc7.MouseButton1Click:connect(onClick)
  619.  
  620. --Black
  621. local textbuttonc8 = Instance.new("TextButton")
  622. textbuttonc8.Parent = screengui2
  623. textbuttonc8.Text = ("Black Shield Color")
  624. textbuttonc8.Position = UDim2.new(0.88, 0, 0.548, 0)
  625. textbuttonc8.Size = UDim2.new(0, 126, 0, 18)
  626. textbuttonc8.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  627. textbuttonc8.TextColor3 = Color3.new(240, 240, 240)
  628. textbuttonc8.BackgroundTransparency = (0)
  629. textbuttonc8.BorderSizePixel = (0)
  630.  
  631. function onClick()
  632.     shieldv.BrickColor = BrickColor.new("Really black")
  633.     shieldcolor = BrickColor.new("Really black")
  634. end
  635. textbuttonc8.MouseButton1Click:connect(onClick)
  636.  
  637. --Transparency Options
  638. local textbuttonc4 = Instance.new("TextButton")
  639. local textbarc4 = Instance.new("TextBox")
  640. textbarc4.Parent = screengui2
  641. textbarc4.Position = UDim2.new(0.88, 0, 0.406, 0)
  642. textbarc4.Size = UDim2.new(0, 126, 0, 18)
  643. textbarc4.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  644. textbarc4.TextColor3 = Color3.new(240, 240, 240)
  645. textbarc4.BackgroundTransparency = (0)
  646. textbarc4.BorderSizePixel = (0)
  647. textbarc4.Text = (shieldtransparency)
  648. textbuttonc4.Parent = screengui2
  649. textbuttonc4.Text = ("Apply Transparency")
  650. textbuttonc4.Position = UDim2.new(0.88, 0, 0.388, 0)
  651. textbuttonc4.Size = UDim2.new(0, 126, 0, 18)
  652. textbuttonc4.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  653. textbuttonc4.TextColor3 = Color3.new(240, 240, 240)
  654. textbuttonc4.BackgroundTransparency = (0)
  655. textbuttonc4.BorderSizePixel = (0)
  656.  
  657. function onClick()
  658.     n = tonumber(textbarc4.Text)
  659.     shieldtransparency = n
  660.     shieldv.Transparency = n
  661. end
  662.  
  663. textbuttonc4.MouseButton1Click:connect(onClick)
  664.  
  665. --Block Shape
  666.  
  667. local textbuttonc9 = Instance.new("TextButton")
  668. textbuttonc9.Parent = screengui2
  669. textbuttonc9.Text = ("Block Shape")
  670. textbuttonc9.Position = UDim2.new(0.88, 0, 0.584, 0)
  671. textbuttonc9.Size = UDim2.new(0, 126, 0, 18)
  672. textbuttonc9.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  673. textbuttonc9.TextColor3 = Color3.new(240, 240, 240)
  674. textbuttonc9.BackgroundTransparency = (0)
  675. textbuttonc9.BorderSizePixel = (0)
  676.  
  677. function onClick()
  678.     shieldshape = ("Block")
  679.     shieldv.Shape = ("Block")
  680. end
  681. textbuttonc9.MouseButton1Click:connect(onClick)
  682.  
  683. --Sphere Shape
  684.  
  685. local textbuttonc10 = Instance.new("TextButton")
  686. textbuttonc10.Parent = screengui2
  687. textbuttonc10.Text = ("Sphere Shape")
  688. textbuttonc10.Position = UDim2.new(0.88, 0, 0.602, 0)
  689. textbuttonc10.Size = UDim2.new(0, 126, 0, 18)
  690. textbuttonc10.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  691. textbuttonc10.TextColor3 = Color3.new(240, 240, 240)
  692. textbuttonc10.BackgroundTransparency = (0)
  693. textbuttonc10.BorderSizePixel = (0)
  694.  
  695. function onClick()
  696.     shieldshape = ("Ball")
  697.     shieldv.Shape = ("Ball")
  698. end
  699. textbuttonc10.MouseButton1Click:connect(onClick)
  700.  
  701. --Neon Material
  702.  
  703. local textbuttonc11 = Instance.new("TextButton")
  704. textbuttonc11.Parent = screengui2
  705. textbuttonc11.Text = ("Neon Material")
  706. textbuttonc11.Position = UDim2.new(0.88, 0, 0.638, 0)
  707. textbuttonc11.Size = UDim2.new(0, 126, 0, 18)
  708. textbuttonc11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  709. textbuttonc11.TextColor3 = Color3.new(240, 240, 240)
  710. textbuttonc11.BackgroundTransparency = (0)
  711. textbuttonc11.BorderSizePixel = (0)
  712.  
  713. function onClick()
  714.     shieldmaterial = ("Neon")
  715.     shieldv.Material = ("Neon")
  716. end
  717. textbuttonc11.MouseButton1Click:connect(onClick)
  718.  
  719. --SmoothPlastic Material
  720.  
  721. local textbuttonc12 = Instance.new("TextButton")
  722. textbuttonc12.Parent = screengui2
  723. textbuttonc12.Text = ("SmoothPlastic Material")
  724. textbuttonc12.Position = UDim2.new(0.88, 0, 0.656, 0)
  725. textbuttonc12.Size = UDim2.new(0, 126, 0, 18)
  726. textbuttonc12.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  727. textbuttonc12.TextColor3 = Color3.new(240, 240, 240)
  728. textbuttonc12.BackgroundTransparency = (0)
  729. textbuttonc12.BorderSizePixel = (0)
  730.  
  731. function onClick()
  732.     shieldmaterial = ("SmoothPlastic")
  733.     shieldv.Material = ("SmoothPlastic")
  734. end
  735. textbuttonc12.MouseButton1Click:connect(onClick)
  736.  
  737. --Plastic Material
  738.  
  739. local textbuttonc13 = Instance.new("TextButton")
  740. textbuttonc13.Parent = screengui2
  741. textbuttonc13.Text = ("Plastic Material")
  742. textbuttonc13.Position = UDim2.new(0.88, 0, 0.674, 0)
  743. textbuttonc13.Size = UDim2.new(0, 126, 0, 18)
  744. textbuttonc13.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  745. textbuttonc13.TextColor3 = Color3.new(240, 240, 240)
  746. textbuttonc13.BackgroundTransparency = (0)
  747. textbuttonc13.BorderSizePixel = (0)
  748.  
  749. function onClick()
  750.     shieldmaterial = ("Plastic")
  751.     shieldv.Material = ("Plastic")
  752. end
  753. textbuttonc13.MouseButton1Click:connect(onClick)
  754.  
  755. --Glass Material
  756.  
  757. local textbuttonc14 = Instance.new("TextButton")
  758. textbuttonc14.Parent = screengui2
  759. textbuttonc14.Text = ("Glass Material")
  760. textbuttonc14.Position = UDim2.new(0.88, 0, 0.692, 0)
  761. textbuttonc14.Size = UDim2.new(0, 126, 0, 18)
  762. textbuttonc14.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  763. textbuttonc14.TextColor3 = Color3.new(240, 240, 240)
  764. textbuttonc14.BackgroundTransparency = (0)
  765. textbuttonc14.BorderSizePixel = (0)
  766.  
  767. function onClick()
  768.     shieldmaterial = ("Glass")
  769.     shieldv.Material = ("Glass")
  770. end
  771. textbuttonc14.MouseButton1Click:connect(onClick)
  772.  
  773.  
  774. --platforms
  775.  
  776.  
  777. hasplatform = 0
  778.  
  779. game:GetService("UserInputService").InputBegan:connect(function(input)
  780. if input.KeyCode == Enum.KeyCode.Tab then
  781.     platform = Instance.new("Part")
  782.     platform.BrickColor = BrickColor.new("Bright green")
  783.     platform.Parent = character
  784.     platform.Name = ("Platform")
  785.     platform.Reflectance = 0.5
  786.     platform.Transparency = 0.5
  787.     platform.Size = Vector3.new(0.05,3,3)
  788.     platform.Orientation = Vector3.new(0,0,90)
  789.     platform.Shape = ("Cylinder")
  790.     platform.Anchored = true
  791.     hasplatform = 1
  792. end
  793. end)
  794.  
  795. game:GetService("UserInputService").InputEnded:connect(function(input)
  796. if input.KeyCode == Enum.KeyCode.Tab then
  797.     character.Platform:Destroy()
  798.     hasplatform = 0
  799. end
  800. end)
  801.  
  802. ghostmode = 0
  803.  
  804. game:GetService("UserInputService").InputBegan:connect(function(input)
  805. if input.KeyCode == Enum.KeyCode.LeftAlt then
  806.     if ghostmode == 0 then
  807.         ghostmode = 1
  808.         character.Parent =  game.Workspace.Camera
  809.         for i,v in pairs(character:GetChildren()) do
  810.             if v.ClassName == ("Part") then
  811.                 if v.Name ~= ("HumanoidRootPart") then
  812.                     v.Transparency = 0.5
  813.                 end
  814.             end
  815.         end
  816.     else
  817.         ghostmode = 0
  818.         character.Parent = game.Workspace
  819.         for i,v in pairs(character:GetChildren()) do
  820.             if v.ClassName == ("Part") then
  821.                 if v.Name ~= ("HumanoidRootPart") then
  822.                     v.Transparency = 0
  823.                 end
  824.             end
  825.         end
  826.     end
  827. end
  828. end)
  829.  
  830. game:GetService("UserInputService").InputEnded:connect(function(input)
  831. if input.KeyCode == Enum.KeyCode.T then
  832.     --for i,v in pairs(PermissionList) do
  833.     --  print(v)
  834.     --end
  835. end
  836. end)
  837.  
  838. --While true do stuff
  839.  
  840. function rstepped()
  841.     if shieldv ~= nil and shieldv.Parent ~= nil then
  842.         shieldv.CFrame = character.Head.CFrame
  843.     else
  844.         if shieldv ~= nil then
  845.             shieldv:Destroy()
  846.         end
  847.         local s = Instance.new("Part")
  848.         s.Anchored = true
  849.         s.CanCollide = false
  850.         s.Parent = game.Workspace
  851.         s.TopSurface = ("Smooth")
  852.         s.BottomSurface = ("Smooth")
  853.         s.Transparency = shieldtransparency
  854.         s.BrickColor = shieldcolor
  855.         s.Material = shieldmaterial
  856.         s.Size = Vector3.new(shieldsize, shieldsize, shieldsize)
  857.         s.Shape = shieldshape
  858.         s.Name = ("ShieldVisual")
  859.         shieldv = s
  860.     end
  861. end
  862.  
  863. game:GetService("RunService").RenderStepped:Connect(rstepped)
  864.  
  865. while true do
  866.     wait(0.01)
  867.  
  868.  
  869.     --Destroy Intruders
  870.  
  871.     if shieldon == true then
  872.         for i,v in pairs(game.Workspace:GetChildren()) do
  873.             if v:IsA("BasePart") == true then
  874.                 local magnitude = (character.Head.Position - v.Position).magnitude
  875.                 if magnitude <= shieldsize then
  876.                     if v.Parent ~= player.Character and v.Name ~= ("ShieldVisual") then
  877.                         if v.Name ~= ("Base") then
  878.                             if v.Name ~= ("Terrain") then
  879.                                 local permissiondenied = 0
  880.                                 for i,m in pairs(PermissionList) do
  881.                                     if v.Parent.Name == m then
  882.                                         permissiondenied = 1
  883.                                     end
  884.                                 end
  885.                                 if permissiondenied == 0 then
  886.                                     v:Destroy()
  887.                                 end
  888.                             end
  889.                         end
  890.                     end
  891.                 end
  892.             end
  893.             if v:IsA("BasePart") == false then
  894.                 for i,w in pairs(v:GetChildren()) do
  895.                     if w:IsA("BasePart") == true then
  896.                         local magnitude = (character.Head.Position - w.Position).magnitude
  897.                         if magnitude <= shieldsize then
  898.                             if w.Parent ~= player.Character and v.Name ~= ("ShieldVisual") then
  899.                                 if w.Name ~= ("Base") then
  900.                                     local permissiondenied = 0
  901.                                     for i,n in pairs(PermissionList) do
  902.                                         if w.Parent.Name == n then
  903.                                             permissiondenied = 1
  904.                                         end
  905.                                     end
  906.                                     if permissiondenied == 0 then
  907.                                         w:Destroy()
  908.                                     end                        
  909.                                 end
  910.                             end
  911.                         end
  912.                     else
  913.                     for i,b in pairs(w:GetChildren()) do
  914.                         if b:IsA("BasePart") == true then
  915.                             local magnitude = (character.Head.Position - b.Position).magnitude
  916.                             if magnitude <= shieldsize then
  917.                                 if b.Parent ~= player.Character and b.Name ~= ("ShieldVisual") then
  918.                                     if b.Name ~= ("Base") then
  919.                                         for i,k in pairs(PermissionList) do
  920.                                             if b.Parent.Name == k then
  921.                                                 permissiondenied = 1
  922.                                             end
  923.                                         end
  924.                                         if permissiondenied == 0 then
  925.                                             b:Destroy()
  926.                                         end
  927.                                     end
  928.                                 end
  929.                             end
  930.                         end
  931.                     end
  932.                 end
  933.             end
  934.         end
  935.     end
  936.  
  937.     --Move and Size Shield Visual
  938.  
  939. game:GetService("UserInputService").InputBegan:connect(function(input)
  940. if input.KeyCode == Enum.KeyCode.LeftShift then
  941. character.Humanoid.WalkSpeed = (100)
  942. end
  943. end)
  944.  
  945. game:GetService("UserInputService").InputBegan:connect(function(input)
  946. if input.KeyCode == Enum.KeyCode.LeftControl then
  947. torso.CFrame = mouse.Hit
  948. end
  949. end)
  950.  
  951. game:GetService("UserInputService").InputEnded:connect(function(input)
  952. if input.KeyCode == Enum.KeyCode.LeftShift then
  953. character.Humanoid.WalkSpeed = (16)
  954. end
  955. end)
  956.  
  957.  
  958.     shieldv.CFrame = character.Head.CFrame
  959.     if shieldv.Size.X <= shieldsize then
  960.         shieldv.Size = shieldv.Size + Vector3.new(shieldsize * shieldgrowrate, shieldsize * shieldgrowrate, shieldsize * shieldgrowrate)
  961.     end
  962.     if shieldv.Size.X >= shieldsize then
  963.         shieldv.Size = shieldv.Size - Vector3.new(shieldv.Size.X * shieldgrowrate, shieldv.Size.Y * shieldgrowrate, shieldv.Size.Z * shieldgrowrate)
  964.     end
  965.     if player.Character == nil then
  966.         shieldv:Destroy()
  967.     end
  968.     if torso == nil then
  969.         shieldv:Destroy()
  970.     end
  971.     if head == nil then
  972.         shieldv:Destroy()
  973.     end
  974.     if character.Humanoid.Health <= 0 then
  975.         shieldv:Destroy()
  976.     end
  977.    
  978.     --platform move
  979.     if hasplatform == 1 then
  980.         character.Platform.CanCollide = false
  981.         character.Platform.Position = torso.Position + Vector3.new(0, -3, 0)
  982.         character.Platform.CanCollide = true
  983.     end
  984.     for i,v in pairs(player.Backpack:GetChildren()) do
  985.         if v.Name == ("HopperBin") then
  986.             v:Destroy()
  987.         end
  988.     end
  989. end
  990. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement