Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
- print("FE Compatibility: by WaverlyCole & Mokiros")
- InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput"
- local function NewFakeEvent()
- local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
- return Fake
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Function then
- Trigger.Function(...)
- end
- end
- Mouse.TrigEvent = TriggerEvent
- UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then end
- if Input.MouseEvent then
- Mouse.Target = Input.Target
- Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then
- return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
- end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do
- if Key==Input.KeyCode then
- Action.Function(Action.Name,Input.UserInputState,Input)
- end
- end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse
- InternalData["ContextActionService"] = ContextActionService
- InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner
- local Event = script:WaitForChild("UserInput")
- local UserInputService = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input)
- UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Targer = Mouse.Hit,Mouse.Target
- Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)
- return InternalData["Mouse"]
- end
- end
- return function (self,...)
- return RealPlayer[Index](RealPlayer,...)
- end
- else
- return RealPlayer[Index]
- end
- end;
- __tostring = function(self)
- return RealPlayer.Name
- end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- if Service:lower() == "players" then
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "localplayer" then
- return Sandbox(owner)
- end
- return RealService[Index2]
- end
- end;
- __tostring = function(self)
- return RealGame:GetService(Service).Name
- end
- })
- elseif Service:lower() == "contextactionservice" then
- return InternalData["ContextActionService"]
- elseif Service:lower() == "contextactionservice" then
- return InternalData["UserInputService"]
- elseif Service:lower() == "runservice" then
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "bindtorenderstep" then
- return function (self,Name,Priority,Function)
- return RealGame:GetService("RunService").Stepped:Connect(Function)
- end
- end
- if Index2:lower() == "renderstepped" then
- return RealService["Stepped"]
- end
- return RealService[Index2]
- end
- end
- })
- else
- return RealGame:GetService(Service)
- end
- end
- end
- return function (self,...)
- return RealGame[Index](RealGame,...)
- end
- else
- if game:GetService(Index) then
- return game:GetService(Index)
- end
- return RealGame[Index]
- end
- else
- return nil
- end
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
- print("Complete! Running...")
- --ForceField
- --Intro
- playintro = 0
- if playintro == 1 then
- introtypespeed = 0.2
- introerasespeed = 0.05
- local introscreengui = Instance.new("ScreenGui")
- local introlabel = Instance.new("TextLabel")
- introscreengui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- introlabel.Parent = introscreengui
- introlabel.BackgroundTransparency = 1
- introlabel.Size = UDim2.new(0, 1270, 0, 707)
- introlabel.Position = UDim2.new(0, 350, 0, 0)
- introlabel.TextColor3 = Color3.new(130, 203, 255)
- introlabel.TextSize = 100
- introlabel.TextStrokeTransparency = (0)
- introlabel.Text = ("F")
- wait(introtypespeed)
- introlabel.Text = ("Fo")
- wait(introtypespeed)
- introlabel.Text = ("For")
- wait(introtypespeed)
- introlabel.Text = ("Forc")
- wait(introtypespeed)
- introlabel.Text = ("Force")
- wait(introtypespeed)
- introlabel.Text = ("Force ")
- wait(introtypespeed)
- introlabel.Text = ("Force F")
- wait(introtypespeed)
- introlabel.Text = ("Force Fi")
- wait(introtypespeed)
- introlabel.Text = ("Force Fie")
- wait(introtypespeed)
- introlabel.Text = ("Force Fiel")
- wait(introtypespeed)
- introlabel.Text = ("Force Field")
- wait(0.5)
- wait(introtypespeed)
- introlabel.Text = ("Force Fiel")
- wait(introerasespeed)
- introlabel.Text = ("Force Fie")
- wait(introerasespeed)
- introlabel.Text = ("Force Fi")
- wait(introerasespeed)
- introlabel.Text = ("Force F")
- wait(introerasespeed)
- introlabel.Text = ("Force ")
- wait(introerasespeed)
- introlabel.Text = ("Force")
- wait(introerasespeed)
- introlabel.Text = ("Forc")
- wait(introerasespeed)
- introlabel.Text = ("For")
- wait(introerasespeed)
- introlabel.Text = ("Fo")
- wait(introerasespeed)
- introlabel.Text = ("F")
- wait(introerasespeed)
- introlabel.Text = ("")
- end
- print("ForceField Script Loaded")
- local player = game:GetService("Players").LocalPlayer
- local character = player.Character
- local mouse = player:GetMouse()
- local head = character.Head
- local torso = nil
- if character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
- torso = character.Torso
- else
- torso = character.UpperTorso
- end
- shieldon = true
- shieldsize = 10
- shieldgrowrate = 0.025
- shieldv = nil
- local PermissionList = {}
- --local user1 = ("")
- --local user2 = ("")
- --local user3 = ("")
- --Shield Customization
- shieldtransparency = 0.7
- shieldcolor = BrickColor.new("Bright red")
- shieldmaterial = ("Neon")
- shieldshape = ("Block")
- --Other Stuff
- character.Humanoid.MaxHealth = math.huge
- character.Humanoid.Health = math.huge
- ff = Instance.new("ForceField")
- ff.Visible = false
- ff.Parent = character
- --container1 = Instance.new("Folder")
- --container1.Parent = game.Workspace
- --character.Parent = container1
- --h = Instance.new("Humanoid")
- --h.Parent = container1
- --Clear Old Gui
- if player.PlayerGui:FindFirstChild("ShieldGui") ~= nil then
- player.PlayerGui.ShieldGui:Destroy()
- end
- --Make Gui
- local screenguia = Instance.new("ScreenGui")
- screenguia.Parent = player.PlayerGui
- screenguia.Name = ("ShieldGui")
- local screengui = Instance.new("Frame")
- screengui.Parent = screenguia
- screengui.Name = ("Frame")
- screengui.BackgroundTransparency = 1
- screengui.Size = UDim2.new(1, 0, 1, 0)
- screengui.Position = UDim2.new(0, 0, 0, 0)
- permissionlistgui = Instance.new("Frame")
- permissionlistgui.Parent = screengui
- permissionlistgui.Name = ("PermissionListGui")
- permissionlistgui.BackgroundTransparency = 1
- permissionlistgui.Size = UDim2.new(1, 0, 1, 0)
- permissionlistgui.Position = UDim2.new(0, 0, 0, 0)
- customizeguiopen = false
- local screengui2 = Instance.new("Frame")
- screengui2.Parent = screenguia
- screengui2.Visible = false
- screengui2.Name = ("Customize")
- screengui2.BackgroundTransparency = 1
- screengui2.Size = UDim2.new(1, 0, 1, 0)
- screengui2.Position = UDim2.new(0, 0, 0, 0)
- --Create shield visual
- s = Instance.new("Part")
- s.Anchored = true
- s.CanCollide = false
- s.Parent = game.Workspace
- s.TopSurface = ("Smooth")
- s.BottomSurface = ("Smooth")
- s.Transparency = shieldtransparency
- s.BrickColor = shieldcolor
- s.Material = shieldmaterial
- s.Size = Vector3.new(0,0,0)
- s.Name = ("ShieldVisual")
- shieldv = s
- --Size Gui
- local textbutton1 = Instance.new("TextButton")
- local textbar1 = Instance.new("TextBox")
- textbar1.Parent = screengui
- textbar1.Position = UDim2.new(0, 0, 0.370, 0)
- textbar1.Size = UDim2.new(0, 126, 0, 18)
- textbar1.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbar1.TextColor3 = Color3.new(240, 240, 240)
- textbar1.BackgroundTransparency = (0)
- textbar1.BorderSizePixel = (0)
- textbar1.Text = ("10")
- textbutton1.Parent = screengui
- textbutton1.Text = ("Apply Size")
- textbutton1.Position = UDim2.new(0, 0, 0.352, 0)
- textbutton1.Size = UDim2.new(0, 126, 0, 18)
- textbutton1.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton1.TextColor3 = Color3.new(240, 240, 240)
- textbutton1.BackgroundTransparency = (0)
- textbutton1.BorderSizePixel = (0)
- function onClick()
- n = tonumber(textbar1.Text)
- shieldsize = n
- --shieldv:TweenSize(Vector3.new(n, n, n), Enum.EasingDirection.In, Enum.EasingStyle.Linear, shieldgrowrate, false);
- end
- textbutton1.MouseButton1Click:connect(onClick)
- --local textbutton11 = Instance.new("TextButton")
- --local textbar11 = Instance.new("TextLabel")
- --textbar11.Parent = screengui
- --textbar11.Text = game:GetService("Players").LocalPlayer.Name
- --textbar11.Position = UDim2.new(0, 0, 0.494, 0)
- --textbar11.Size = UDim2.new(0, 126, 0, 18)
- --textbar11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- --textbar11.TextColor3 = Color3.new(58, 58, 58)
- --textbar11.BackgroundTransparency = (0)
- --textbar11.BorderSizePixel = (0)
- local textbutton11 = Instance.new("TextButton")
- textbutton11.Parent = screengui
- textbutton11.Text = ("Apply Access Changes")
- textbutton11.Position = UDim2.new(0, 0, 0.476, 0)
- textbutton11.Size = UDim2.new(0, 126, 0, 18)
- textbutton11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton11.TextColor3 = Color3.new(240, 240, 240)
- textbutton11.BackgroundTransparency = (0)
- textbutton11.BorderSizePixel = (0)
- local textbutton11a = Instance.new("TextButton")
- textbutton11a.Parent = screengui
- textbutton11a.Text = ("+")
- textbutton11a.Position = UDim2.new(0.068, 0, 0.476, 0)
- textbutton11a.Size = UDim2.new(0, 18, 0, 18)
- textbutton11a.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton11a.TextColor3 = Color3.new(240, 240, 240)
- textbutton11a.BackgroundTransparency = (0)
- textbutton11a.BorderSizePixel = (0)
- local textbutton11b = Instance.new("TextButton")
- textbutton11b.Parent = screengui
- textbutton11b.Text = ("-")
- textbutton11b.Position = UDim2.new(0.078, 0, 0.476, 0)
- textbutton11b.Size = UDim2.new(0, 18, 0, 18)
- textbutton11b.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton11b.TextColor3 = Color3.new(240, 240, 240)
- textbutton11b.BackgroundTransparency = (0)
- textbutton11b.BorderSizePixel = (0)
- nextpermissionlistslotposition = 0.512
- function onClick()
- local textbar12 = Instance.new("TextBox")
- textbar12.Parent = permissionlistgui
- textbar12.Position = UDim2.new(0, 0, nextpermissionlistslotposition, 0)
- textbar12.Size = UDim2.new(0, 126, 0, 18)
- textbar12.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbar12.TextColor3 = Color3.new(240, 240, 240)
- textbar12.BackgroundTransparency = (0)
- textbar12.BorderSizePixel = (0)
- textbar12.Text = ("Player Name")
- nextpermissionlistslotposition = nextpermissionlistslotposition + 0.018
- end
- textbutton11a.MouseButton1Click:connect(onClick)
- function onClick()
- local lookingfor = #permissionlistgui:GetChildren()
- for i,v in pairs(permissionlistgui:GetChildren()) do
- if i == lookingfor then
- v:Destroy()
- nextpermissionlistslotposition = nextpermissionlistslotposition - 0.018
- end
- end
- end
- textbutton11b.MouseButton1Click:connect(onClick)
- function onClick()
- for i = 1, #PermissionList do
- PermissionList[i] = nil
- end
- for i,v in pairs(permissionlistgui:GetChildren()) do
- PermissionList[i] = v.Text
- end
- end
- textbutton11.MouseButton1Click:connect(onClick)
- --Toggle Gui
- local textbutton2 = Instance.new("TextButton")
- textbutton2.Parent = screengui
- textbutton2.Text = ("Toggle Shield Off")
- textbutton2.Position = UDim2.new(0, 0, 0.406, 0)
- textbutton2.Size = UDim2.new(0, 126, 0, 18)
- textbutton2.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton2.TextColor3 = Color3.new(240, 240, 240)
- textbutton2.BackgroundTransparency = (0)
- textbutton2.BorderSizePixel = (0)
- function onClick()
- if shieldon == true then
- shieldon = false
- character.Humanoid.MaxHealth = 100
- character.Humanoid.Health = 100
- shieldv.Transparency = 1
- ff.Parent = nil
- textbutton2.Text = ("Toggle Shield On")
- else
- shieldon = true
- character.Humanoid.MaxHealth = math.huge
- character.Humanoid.Health = math.huge
- shieldv.Transparency = shieldtransparency
- ff.Parent = character
- textbutton2.Text = ("Toggle Shield Off")
- end
- end
- textbutton2.MouseButton1Click:connect(onClick)
- --Toggle Customization Gui
- local textbutton3 = Instance.new("TextButton")
- textbutton3.Parent = screengui
- textbutton3.Text = ("Customize")
- textbutton3.Position = UDim2.new(0, 0, 0.440, 0)
- textbutton3.Size = UDim2.new(0, 126, 0, 18)
- textbutton3.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton3.TextColor3 = Color3.new(240, 240, 240)
- textbutton3.BackgroundTransparency = (0)
- textbutton3.BorderSizePixel = (0)
- function onClick()
- if customizeguiopen == true then
- customizeguiopen = false
- screengui2.Visible = false
- else
- customizeguiopen = true
- screengui2.Visible = true
- end
- end
- textbutton3.MouseButton1Click:connect(onClick)
- --Shield Colors
- --Red
- local textbuttonc1 = Instance.new("TextButton")
- textbuttonc1.Parent = screengui2
- textbuttonc1.Text = ("Red Shield Color")
- textbuttonc1.Position = UDim2.new(0.88, 0, 0.440, 0)
- textbuttonc1.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc1.BackgroundColor3 = Color3.fromRGB(128, 30, 30)
- textbuttonc1.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc1.BackgroundTransparency = (0)
- textbuttonc1.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Bright red")
- shieldcolor = BrickColor.new("Bright red")
- end
- textbuttonc1.MouseButton1Click:connect(onClick)
- --Green
- local textbuttonc2 = Instance.new("TextButton")
- textbuttonc2.Parent = screengui2
- textbuttonc2.Text = ("Green Shield Color")
- textbuttonc2.Position = UDim2.new(0.88, 0, 0.458, 0)
- textbuttonc2.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc2.BackgroundColor3 = Color3.fromRGB(30, 128, 30)
- textbuttonc2.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc2.BackgroundTransparency = (0)
- textbuttonc2.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Bright green")
- shieldcolor = BrickColor.new("Bright green")
- end
- textbuttonc2.MouseButton1Click:connect(onClick)
- --Blue
- local textbuttonc3 = Instance.new("TextButton")
- textbuttonc3.Parent = screengui2
- textbuttonc3.Text = ("Blue Shield Color")
- textbuttonc3.Position = UDim2.new(0.88, 0, 0.476, 0)
- textbuttonc3.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc3.BackgroundColor3 = Color3.fromRGB(30, 30, 128)
- textbuttonc3.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc3.BackgroundTransparency = (0)
- textbuttonc3.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Really blue")
- shieldcolor = BrickColor.new("Really blue")
- end
- textbuttonc3.MouseButton1Click:connect(onClick)
- --Yellow
- local textbuttonc5 = Instance.new("TextButton")
- textbuttonc5.Parent = screengui2
- textbuttonc5.Text = ("Yellow Shield Color")
- textbuttonc5.Position = UDim2.new(0.88, 0, 0.494, 0)
- textbuttonc5.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc5.BackgroundColor3 = Color3.fromRGB(128, 128, 30)
- textbuttonc5.TextColor3 = Color3.new(128, 128, 30)
- textbuttonc5.BackgroundTransparency = (0)
- textbuttonc5.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("New Yeller")
- shieldcolor = BrickColor.new("New Yeller")
- end
- textbuttonc5.MouseButton1Click:connect(onClick)
- --Pink
- local textbuttonc6 = Instance.new("TextButton")
- textbuttonc6.Parent = screengui2
- textbuttonc6.Text = ("Pink Shield Color")
- textbuttonc6.Position = UDim2.new(0.88, 0, 0.512, 0)
- textbuttonc6.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc6.BackgroundColor3 = Color3.fromRGB(128, 30, 95)
- textbuttonc6.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc6.BackgroundTransparency = (0)
- textbuttonc6.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Hot pink")
- shieldcolor = BrickColor.new("Hot pink")
- end
- textbuttonc6.MouseButton1Click:connect(onClick)
- --White
- local textbuttonc7 = Instance.new("TextButton")
- textbuttonc7.Parent = screengui2
- textbuttonc7.Text = ("White Shield Color")
- textbuttonc7.Position = UDim2.new(0.88, 0, 0.530, 0)
- textbuttonc7.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc7.BackgroundColor3 = Color3.fromRGB(128, 128, 128)
- textbuttonc7.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc7.BackgroundTransparency = (0)
- textbuttonc7.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Institutional white")
- shieldcolor = BrickColor.new("Institutional white")
- end
- textbuttonc7.MouseButton1Click:connect(onClick)
- --Black
- local textbuttonc8 = Instance.new("TextButton")
- textbuttonc8.Parent = screengui2
- textbuttonc8.Text = ("Black Shield Color")
- textbuttonc8.Position = UDim2.new(0.88, 0, 0.548, 0)
- textbuttonc8.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc8.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc8.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc8.BackgroundTransparency = (0)
- textbuttonc8.BorderSizePixel = (0)
- function onClick()
- shieldv.BrickColor = BrickColor.new("Really black")
- shieldcolor = BrickColor.new("Really black")
- end
- textbuttonc8.MouseButton1Click:connect(onClick)
- --Transparency Options
- local textbuttonc4 = Instance.new("TextButton")
- local textbarc4 = Instance.new("TextBox")
- textbarc4.Parent = screengui2
- textbarc4.Position = UDim2.new(0.88, 0, 0.406, 0)
- textbarc4.Size = UDim2.new(0, 126, 0, 18)
- textbarc4.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbarc4.TextColor3 = Color3.new(240, 240, 240)
- textbarc4.BackgroundTransparency = (0)
- textbarc4.BorderSizePixel = (0)
- textbarc4.Text = (shieldtransparency)
- textbuttonc4.Parent = screengui2
- textbuttonc4.Text = ("Apply Transparency")
- textbuttonc4.Position = UDim2.new(0.88, 0, 0.388, 0)
- textbuttonc4.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc4.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc4.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc4.BackgroundTransparency = (0)
- textbuttonc4.BorderSizePixel = (0)
- function onClick()
- n = tonumber(textbarc4.Text)
- shieldtransparency = n
- shieldv.Transparency = n
- end
- textbuttonc4.MouseButton1Click:connect(onClick)
- --Block Shape
- local textbuttonc9 = Instance.new("TextButton")
- textbuttonc9.Parent = screengui2
- textbuttonc9.Text = ("Block Shape")
- textbuttonc9.Position = UDim2.new(0.88, 0, 0.584, 0)
- textbuttonc9.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc9.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc9.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc9.BackgroundTransparency = (0)
- textbuttonc9.BorderSizePixel = (0)
- function onClick()
- shieldshape = ("Block")
- shieldv.Shape = ("Block")
- end
- textbuttonc9.MouseButton1Click:connect(onClick)
- --Sphere Shape
- local textbuttonc10 = Instance.new("TextButton")
- textbuttonc10.Parent = screengui2
- textbuttonc10.Text = ("Sphere Shape")
- textbuttonc10.Position = UDim2.new(0.88, 0, 0.602, 0)
- textbuttonc10.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc10.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc10.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc10.BackgroundTransparency = (0)
- textbuttonc10.BorderSizePixel = (0)
- function onClick()
- shieldshape = ("Ball")
- shieldv.Shape = ("Ball")
- end
- textbuttonc10.MouseButton1Click:connect(onClick)
- --Neon Material
- local textbuttonc11 = Instance.new("TextButton")
- textbuttonc11.Parent = screengui2
- textbuttonc11.Text = ("Neon Material")
- textbuttonc11.Position = UDim2.new(0.88, 0, 0.638, 0)
- textbuttonc11.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc11.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc11.BackgroundTransparency = (0)
- textbuttonc11.BorderSizePixel = (0)
- function onClick()
- shieldmaterial = ("Neon")
- shieldv.Material = ("Neon")
- end
- textbuttonc11.MouseButton1Click:connect(onClick)
- --SmoothPlastic Material
- local textbuttonc12 = Instance.new("TextButton")
- textbuttonc12.Parent = screengui2
- textbuttonc12.Text = ("SmoothPlastic Material")
- textbuttonc12.Position = UDim2.new(0.88, 0, 0.656, 0)
- textbuttonc12.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc12.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc12.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc12.BackgroundTransparency = (0)
- textbuttonc12.BorderSizePixel = (0)
- function onClick()
- shieldmaterial = ("SmoothPlastic")
- shieldv.Material = ("SmoothPlastic")
- end
- textbuttonc12.MouseButton1Click:connect(onClick)
- --Plastic Material
- local textbuttonc13 = Instance.new("TextButton")
- textbuttonc13.Parent = screengui2
- textbuttonc13.Text = ("Plastic Material")
- textbuttonc13.Position = UDim2.new(0.88, 0, 0.674, 0)
- textbuttonc13.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc13.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc13.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc13.BackgroundTransparency = (0)
- textbuttonc13.BorderSizePixel = (0)
- function onClick()
- shieldmaterial = ("Plastic")
- shieldv.Material = ("Plastic")
- end
- textbuttonc13.MouseButton1Click:connect(onClick)
- --Glass Material
- local textbuttonc14 = Instance.new("TextButton")
- textbuttonc14.Parent = screengui2
- textbuttonc14.Text = ("Glass Material")
- textbuttonc14.Position = UDim2.new(0.88, 0, 0.692, 0)
- textbuttonc14.Size = UDim2.new(0, 126, 0, 18)
- textbuttonc14.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbuttonc14.TextColor3 = Color3.new(240, 240, 240)
- textbuttonc14.BackgroundTransparency = (0)
- textbuttonc14.BorderSizePixel = (0)
- function onClick()
- shieldmaterial = ("Glass")
- shieldv.Material = ("Glass")
- end
- textbuttonc14.MouseButton1Click:connect(onClick)
- --platforms
- hasplatform = 0
- game:GetService("UserInputService").InputBegan:connect(function(input)
- if input.KeyCode == Enum.KeyCode.Tab then
- platform = Instance.new("Part")
- platform.BrickColor = BrickColor.new("Bright green")
- platform.Parent = character
- platform.Name = ("Platform")
- platform.Reflectance = 0.5
- platform.Transparency = 0.5
- platform.Size = Vector3.new(0.05,3,3)
- platform.Orientation = Vector3.new(0,0,90)
- platform.Shape = ("Cylinder")
- platform.Anchored = true
- hasplatform = 1
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(input)
- if input.KeyCode == Enum.KeyCode.Tab then
- character.Platform:Destroy()
- hasplatform = 0
- end
- end)
- ghostmode = 0
- game:GetService("UserInputService").InputBegan:connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftAlt then
- if ghostmode == 0 then
- ghostmode = 1
- character.Parent = game.Workspace.Camera
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == ("Part") then
- if v.Name ~= ("HumanoidRootPart") then
- v.Transparency = 0.5
- end
- end
- end
- else
- ghostmode = 0
- character.Parent = game.Workspace
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == ("Part") then
- if v.Name ~= ("HumanoidRootPart") then
- v.Transparency = 0
- end
- end
- end
- end
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(input)
- if input.KeyCode == Enum.KeyCode.T then
- --for i,v in pairs(PermissionList) do
- -- print(v)
- --end
- end
- end)
- --While true do stuff
- function rstepped()
- if shieldv ~= nil and shieldv.Parent ~= nil then
- shieldv.CFrame = character.Head.CFrame
- else
- if shieldv ~= nil then
- shieldv:Destroy()
- end
- local s = Instance.new("Part")
- s.Anchored = true
- s.CanCollide = false
- s.Parent = game.Workspace
- s.TopSurface = ("Smooth")
- s.BottomSurface = ("Smooth")
- s.Transparency = shieldtransparency
- s.BrickColor = shieldcolor
- s.Material = shieldmaterial
- s.Size = Vector3.new(shieldsize, shieldsize, shieldsize)
- s.Shape = shieldshape
- s.Name = ("ShieldVisual")
- shieldv = s
- end
- end
- game:GetService("RunService").RenderStepped:Connect(rstepped)
- while true do
- wait(0.01)
- --Destroy Intruders
- if shieldon == true then
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v:IsA("BasePart") == true then
- local magnitude = (character.Head.Position - v.Position).magnitude
- if magnitude <= shieldsize then
- if v.Parent ~= player.Character and v.Name ~= ("ShieldVisual") then
- if v.Name ~= ("Base") then
- if v.Name ~= ("Terrain") then
- local permissiondenied = 0
- for i,m in pairs(PermissionList) do
- if v.Parent.Name == m then
- permissiondenied = 1
- end
- end
- if permissiondenied == 0 then
- v:Destroy()
- end
- end
- end
- end
- end
- end
- if v:IsA("BasePart") == false then
- for i,w in pairs(v:GetChildren()) do
- if w:IsA("BasePart") == true then
- local magnitude = (character.Head.Position - w.Position).magnitude
- if magnitude <= shieldsize then
- if w.Parent ~= player.Character and v.Name ~= ("ShieldVisual") then
- if w.Name ~= ("Base") then
- local permissiondenied = 0
- for i,n in pairs(PermissionList) do
- if w.Parent.Name == n then
- permissiondenied = 1
- end
- end
- if permissiondenied == 0 then
- w:Destroy()
- end
- end
- end
- end
- else
- for i,b in pairs(w:GetChildren()) do
- if b:IsA("BasePart") == true then
- local magnitude = (character.Head.Position - b.Position).magnitude
- if magnitude <= shieldsize then
- if b.Parent ~= player.Character and b.Name ~= ("ShieldVisual") then
- if b.Name ~= ("Base") then
- for i,k in pairs(PermissionList) do
- if b.Parent.Name == k then
- permissiondenied = 1
- end
- end
- if permissiondenied == 0 then
- b:Destroy()
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- --Move and Size Shield Visual
- game:GetService("UserInputService").InputBegan:connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftShift then
- character.Humanoid.WalkSpeed = (100)
- end
- end)
- game:GetService("UserInputService").InputBegan:connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftControl then
- torso.CFrame = mouse.Hit
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftShift then
- character.Humanoid.WalkSpeed = (16)
- end
- end)
- shieldv.CFrame = character.Head.CFrame
- if shieldv.Size.X <= shieldsize then
- shieldv.Size = shieldv.Size + Vector3.new(shieldsize * shieldgrowrate, shieldsize * shieldgrowrate, shieldsize * shieldgrowrate)
- end
- if shieldv.Size.X >= shieldsize then
- shieldv.Size = shieldv.Size - Vector3.new(shieldv.Size.X * shieldgrowrate, shieldv.Size.Y * shieldgrowrate, shieldv.Size.Z * shieldgrowrate)
- end
- if player.Character == nil then
- shieldv:Destroy()
- end
- if torso == nil then
- shieldv:Destroy()
- end
- if head == nil then
- shieldv:Destroy()
- end
- if character.Humanoid.Health <= 0 then
- shieldv:Destroy()
- end
- --platform move
- if hasplatform == 1 then
- character.Platform.CanCollide = false
- character.Platform.Position = torso.Position + Vector3.new(0, -3, 0)
- character.Platform.CanCollide = true
- end
- for i,v in pairs(player.Backpack:GetChildren()) do
- if v.Name == ("HopperBin") then
- v:Destroy()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement