Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = Localplayer
- do
- print("FE Covered By Red_Jack142 | FE Made By Red_Jack142")
- print("Have Fun!")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- plr = game.Players.LocalPlayer
- repeat wait() until plr.Character
- char = plr.Character
- -- Credit to shack for the anti death system
- local BODY = {}
- LeftArm = char["Left Arm"]
- RightLeg = char["Right Leg"]
- LeftLeg = char["Left Leg"]
- for _, c in pairs(char:GetDescendants()) do
- if c:IsA("BasePart") and c.Name ~= "Handle" then
- if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
- elseif c:IsA("JointInstance") then
- table.insert(BODY,{c,c.Parent,nil,nil,nil})
- end
- end
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY
- end
- PART.AncestryChanged:Connect(function()
- PART.Parent = PARENT
- end)
- end
- end
- function refit()
- char.Parent = workspace
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY
- end
- if PART.Parent ~= PARENT then
- char:FindFirstChildOfClass("Humanoid"):remove()
- PART.Parent = PARENT
- Humanoid = Instance.new("Humanoid",char)
- end
- end
- end
- end
- char.Humanoid.Died:connect(function()
- refit()
- end)
- local torso = Instance.new("SelectionBox",char)
- torso.Adornee = char.Torso
- local leftarm = Instance.new("SelectionBox",char)
- leftarm.Adornee = LeftArm
- local rightarm = Instance.new("SelectionBox",char)
- rightarm.Adornee = char["Right Arm"]
- local leftleg = Instance.new("SelectionBox",char)
- leftleg.Adornee = LeftLeg
- local rightleg = Instance.new("SelectionBox",char)
- rightleg.Adornee = char["Right Leg"]
- -- Color pallet
- green = "Lime green"
- red = "Really red"
- blue = "Electric blue"
- yellow = "New Yeller"
- violet = "Pastel violet"
- coroutine.wrap(function()
- while true do
- wait(0.5)
- torso.Color3 = BrickColor.new(green).Color
- rightarm.Color3 = BrickColor.new(green).Color
- leftarm.Color3 = BrickColor.new(green).Color
- leftleg.Color3 = BrickColor.new(green).Color
- rightleg.Color3 = BrickColor.new(green).Color
- wait(0.5)
- torso.Color3 = BrickColor.new(red).Color
- rightarm.Color3 = BrickColor.new(red).Color
- leftarm.Color3 = BrickColor.new(red).Color
- leftleg.Color3 = BrickColor.new(red).Color
- rightleg.Color3 = BrickColor.new(red).Color
- wait(0.5)
- torso.Color3 = BrickColor.new(blue).Color
- rightarm.Color3 = BrickColor.new(blue).Color
- leftarm.Color3 = BrickColor.new(blue).Color
- leftleg.Color3 = BrickColor.new(blue).Color
- rightleg.Color3 = BrickColor.new(blue).Color
- wait(0.5)
- torso.Color3 = BrickColor.new(yellow).Color
- rightarm.Color3 = BrickColor.new(yellow).Color
- leftarm.Color3 = BrickColor.new(yellow).Color
- leftleg.Color3 = BrickColor.new(yellow).Color
- rightleg.Color3 = BrickColor.new(yellow).Color
- wait(0.5)
- torso.Color3 = BrickColor.new(violet).Color
- rightarm.Color3 = BrickColor.new(violet).Color
- leftarm.Color3 = BrickColor.new(violet).Color
- leftleg.Color3 = BrickColor.new(violet).Color
- rightleg.Color3 = BrickColor.new(violet).Color
- end
- end)()
- while true do
- wait()
- refit()
- local BODY = {}
- for _, c in pairs(Character:GetDescendants()) do
- if c:IsA("BasePart") and c.Name ~= "Handle" then
- if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
- elseif c:IsA("JointInstance") then
- table.insert(BODY,{c,c.Parent,nil,nil,nil})
- end
- end
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= RootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY
- end
- PART.AncestryChanged:Connect(function()
- PART.Parent = PARENT
- end)
- end
- end
- function refit()
- Character.Parent = workspace
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART:IsA("BasePart") and PART ~= RootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY+EXTRATRANS
- end
- if PART.Parent ~= PARENT then
- Humanoid:remove()
- PART.Parent = PARENT
- Humanoid = IT("Humanoid",Character)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement