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 = owner
- do
- print("FE Compatibility by timlikekezenit")
- 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
- local phy = game:GetService("PhysicsService")
- for i,v in pairs(phy:GetCollisionGroups()) do
- if v:GetCollisionGroupName()=="shieldal" or v:GetCollisionGroupName()=="shieldgr" then
- phy:RemoveCollisionGroup("shieldal")
- phy:RemoveCollisionGroup("shieldgr")
- end
- local plr = owner
- local lederGui = Instance.new("ScreenGui",plr.PlayerGui)
- local ledervolume = 2
- local run = game:GetService("RunService")
- lederGui.Name = "lederGui"
- lederGui.ResetOnSpawn = true
- local credits = Instance.new("TextLabel",lederGui)
- credits.Name = "lederCredits"
- credits.Position = UDim2.new(0,0,0,50)
- credits.Size = UDim2.new(1,0,0,75)
- credits.Text = [[LEDER SCRIPTED AND ANIMATED BY OOF0M, INSPIRED BY AZNDIB'S "GENERIC ROLEPLAY GAME"]]
- credits.Font = Enum.Font.GothamBlack
- credits.TextColor3 = Color3.new(255,255,255)
- credits.TextStrokeTransparency = 0
- credits.BackgroundColor3 = Color3.new(0,0,0)
- credits.BackgroundTransparency = .5
- credits.BorderSizePixel = 0
- credits.TextScaled = true
- delay(5,function()
- lederGui:Destroy()
- end)
- local char = plr.Character
- local ledertag = Instance.new("BillboardGui",char.Head)
- ledertag.Size = UDim2.new(8,0,2,0)
- ledertag.StudsOffset = Vector3.new(0,3,0)
- ledertag.LightInfluence = 0
- local ledertagtext = Instance.new("TextLabel",ledertag)
- ledertagtext.Text = "leder"
- ledertagtext.BackgroundTransparency = 1
- ledertagtext.Size = UDim2.new(1,0,1,0)
- ledertagtext.Font = Enum.Font.GothamBlack
- ledertagtext.TextColor3 = Color3.new(255,0,0)
- ledertagtext.TextStrokeTransparency = 0
- ledertagtext.TextScaled = true
- --[[
- char.Animate.idle.Animation1.AnimationId = "rbxassetid://5430782081"
- char.Animate.idle.Animation2.AnimationId = "rbxassetid://5436122854"
- char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://5436083585"
- char.Animate.fall.FallAnim.AnimationId = "rbxassetid://5436050339"
- ]]
- local uis = game:GetService("UserInputService")
- local audio = Instance.new("Sound",char.HumanoidRootPart)
- audio.Name = "lederMusic"
- audio.Volume = ledervolume
- audio.Looped = true
- audio.SoundId = "rbxassetid://2988447548"
- audio:Play()
- -- start fake limbs
- local fakelimbsfolder = Instance.new("Folder",char)
- fakelimbsfolder.Name = "fakelimbsfolder"
- char.Humanoid.WalkSpeed = 50
- for _, child in pairs(char:GetChildren()) do
- if child:IsA("Part") then
- if child.Name ~= "Head" then
- if child.Name ~= "HumanoidRootPart" then
- child.Transparency = 1
- local clone = child:Clone()
- clone.Transparency = 0
- clone.Parent = fakelimbsfolder
- local weld = Instance.new("Weld",clone)
- weld.Part0 = child
- weld.Part1 = clone
- if clone.Name == "Torso" then
- clone.BrickColor = BrickColor.new("Really red")
- elseif clone.Name == "Left Leg" then
- clone.BrickColor = BrickColor.new("Sea green")
- elseif clone.Name == "Right Leg" then
- clone.BrickColor = BrickColor.new("Sea green")
- end
- end
- end
- end
- char.Humanoid.MaxHealth = math.huge
- char.Humanoid.Health = char.Humanoid.MaxHealth
- --end fake limbs
- local muted = false
- local shieldon = false
- Mouse.KeyDown:Connect(function(press)
- local key = string.lower(press)
- if key == "m" then
- if muted == false then
- muted = true
- audio.Volume = 0
- elseif muted == true then
- muted = false
- audio.Volume = ledervolume
- end
- elseif key == "c" then
- local Camera = workspace.CurrentCamera
- local projectile = Instance.new("Part",workspace)
- projectile.Touched:Connect(function(hit)
- local char2 = hit.Parent
- if char2:FindFirstChildWhichIsA("Humanoid") and char2 ~= char then
- char2:FindFirstChildWhichIsA("Humanoid").Health = 0
- end
- end)
- local mouse = plr:GetMouse()
- projectile.Material = Enum.Material.Neon
- projectile.BrickColor = BrickColor.new("Magenta")
- projectile.Size = Vector3.new(1,1,1)
- projectile.Position = char.HumanoidRootPart.Position
- projectile.Anchored = true
- projectile.Transparency = .5
- projectile.CanCollide = false
- local ts = game:GetService("TweenService")
- local goals = {Size = Vector3.new(30,30,30), Transparency = 1}
- local info = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0)
- ts:Create(projectile,info,goals):Play()
- local projectpath = Instance.new("Part",workspace)
- projectpath.Material = Enum.Material.ForceField
- projectpath.BrickColor = BrickColor.new("Magenta")
- projectpath.Size = Vector3.new(1,1,1)
- projectpath.Position = char.HumanoidRootPart.Position
- projectpath.Anchored = true
- projectpath.Transparency = 0
- projectpath.CanCollide = false
- local ts = game:GetService("TweenService")
- local goals = {Size = Vector3.new(30,30,30), Transparency = 1}
- local info = TweenInfo.new(.8,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)
- ts:Create(projectpath,info,goals):Play()
- local sound = Instance.new("Sound",char.Torso)
- sound.SoundId = "rbxassetid://4996813865"
- sound.Name = "bruh"
- sound.Volume = 5
- sound.TimePosition = .5
- sound:Play()
- wait(1)
- projectile:Destroy()
- projectpath:Destroy()
- wait(1)
- sound:Destroy()
- elseif key == "f" then
- local changing = false
- if shieldon == false and changing == false then
- shieldon = true
- changing = true
- local shield = Instance.new("Part",char)
- shield.Material = Enum.Material.ForceField
- shield.Color = Color3.new(0,0,1)
- shield.TopSurface = Enum.SurfaceType.Smooth
- shield.BottomSurface = Enum.SurfaceType.Smooth
- shield.Size = Vector3.new(1,1,1)
- shield.Position = char.Torso.Position
- shield.Orientation = char.Torso.Orientation
- shield.Name = "lederShield"
- shield.CanCollide = true
- local shieldal = phy:CreateCollisionGroup("shieldal")
- local shieldgr = phy:CreateCollisionGroup("shield")
- for _, child in ipairs(char:GetDescendants()) do
- if child:IsA("Part") and child.Name ~= "lederShield" then
- phy:SetPartCollisionGroup(child, "shieldal")
- end
- end
- phy:SetPartCollisionGroup(shield, "shieldal")
- phy:CollisionGroupSetCollidable("shieldal", "shieldgr", false)
- local weld2 = Instance.new("Weld",shield)
- weld2.Part0 = shield
- weld2.Part1 = char.Head
- local ts = game:GetService("TweenService")
- local goals = {Size = Vector3.new(10,10,10)} -- 4.5,6,3
- local info = TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)
- ts:Create(shield,info,goals):Play()
- wait(1)
- changing = false
- elseif shieldon == true and changing == false then
- shieldon = false
- changing = true
- local ts = game:GetService("TweenService")
- local goals = {Size = Vector3.new(1,1,1), Transparency = 1}
- local info = TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)
- ts:Create(shield,info,goals):Play()
- wait(1)
- changing = false
- shield:Destroy()
- end
- end
- end)
- end
- end
Add Comment
Please, Sign In to add comment