Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instructions:
- --[[
- Any local variables with :
- = LocalPlayer:
- Must be replaced with "owner". So if your local variable is game.Players.LocalPlayer , replace it with owner
- = :GetMouse():
- Remove the variable entirely.
- then paste this over the desired script
- --]]
- 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 code by Mokiros | Translated to FE by iPxter")
- 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
- -- End of FE converter
- local lp = owner
- local ch = owner.Character
- name = owner.Name
- if owner.UserId==710232008 then
- name="CHL"
- end
- if ch then
- local b = Instance.new("BillboardGui",ch.Head)
- b.Size = UDim2.new(0,200,0,50)
- b.ExtentsOffsetWorldSpace = Vector3.new(0,5,0)
- b.MaxDistance = 75
- local TextL= Instance.new("TextLabel",b)
- TextL.Size =UDim2.new(0,200,0,50)
- TextL.Text = name.." but with laser beams."
- TextL.TextColor3 = Color3.fromRGB(255, 255, 0)
- TextL.BackgroundTransparency = 1
- TextL.TextScaled = true
- TextL.Font = Enum.Font.Arcade
- end
- mouse.KeyDown:Connect(function(key)
- if key=="q" or key=="z" then
- local part0 = Instance.new("Part",game.Workspace)
- part0.Name="Laser Beam"
- part0.Position = lp.Character.Head.Position + Vector3.new(0,5,0)
- part0.Orientation = mouse.Hit.lookVector
- part0.Size = Vector3.new(1,1,1)
- part0.Shape = "Ball"
- part0.Transparency = 1
- part0.Anchored = false
- part0.CanCollide = false
- local at1 = Instance.new("Attachment",part0)
- at1.Position = Vector3.new(.5,.5,0)
- local at2 = Instance.new("Attachment",part0)
- at2.Position = Vector3.new(.5,-.5,0)
- local trail = Instance.new("Trail",part0)
- trail.Lifetime = 10
- trail.MaxLength = 0
- trail.Attachment0 = at1
- trail.Attachment1 = at2
- local at3 = Instance.new("Attachment",part0)
- at3.Position = Vector3.new(-.5,.5,0)
- local at4 = Instance.new("Attachment",part0)
- at4.Position = Vector3.new(-.5,-.5,0)
- local trail0 = Instance.new("Trail",part0)
- trail0.Lifetime = 10
- trail0.MaxLength = 0
- trail0.Attachment0 = at3
- trail0.Attachment1 = at4
- local trail1 = Instance.new("Trail",part0)
- trail1.Lifetime = 10
- trail1.MaxLength = 0
- trail1.Attachment0 = at3
- trail1.Attachment1 = at1
- local trail2 = Instance.new("Trail",part0)
- trail2.Lifetime = 10
- trail2.MaxLength = 0
- trail2.Attachment0 = at2
- trail2.Attachment1 = at4
- trail.Transparency = NumberSequence.new(0,0)
- trail0.Transparency = NumberSequence.new(0,0)
- trail1.Transparency = NumberSequence.new(0,0)
- trail2.Transparency = NumberSequence.new(0,0)
- wait(.001)
- part0.CFrame = mouse.Hit
- trail.MaxLength = 100
- trail0.MaxLength = 100
- trail1.MaxLength = 100
- trail2.MaxLength = 100
- local target = mouse.Target
- if game.PlaceId==843495510 or mouse.Target.Parent.Name=="Zombie" or mouse.Target.Parent.Name=="Default Dummy" then
- if mouse.Target==nil or mouse.Target.Name=="Laser Beam" then
- elseif mouse.Target.Parent:IsA("Accessory") then
- local tar = mouse.Target.Parent.Parent
- if tar:FindFirstChildWhichIsA("Humanoid") then
- if tar:FindFirstChildWhichIsA("Humanoid").Health==0 then
- else
- tar:FindFirstChildWhichIsA("Humanoid").Health = 0
- end
- elseif tar:FindFirstChild("Head") then
- tar:FindFirstChild("Head"):Destroy()
- elseif tar:FindFirstChild("UpperTorso") then
- tar:FindFirstChild("UpperTorso"):Destroy()
- elseif tar:FindFirstChild("Torso") then
- tar:FindFirstChild("Torso"):Destroy()
- end
- print(tar.Name.." died.")
- elseif mouse.Target:IsA("MeshPart") or mouse.Target:IsA("Part") then
- local tar = mouse.Target.Parent
- if tar:FindFirstChildWhichIsA("Humanoid") then
- if tar:FindFirstChildWhichIsA("Humanoid").Health==0 then
- else
- tar:FindFirstChildWhichIsA("Humanoid").Health = 0
- print(tar.Name.." died.")
- end
- elseif tar:FindFirstChild("Head") then
- tar:FindFirstChild("Head"):Destroy()
- print(tar.Name.." died.")
- elseif tar:FindFirstChild("UpperTorso") then
- tar:FindFirstChild("UpperTorso"):Destroy()
- print(tar.Name.." died.")
- elseif tar:FindFirstChild("Torso") then
- tar:FindFirstChild("Torso"):Destroy()
- print(tar.Name.." died.")
- end
- end
- elseif game.PlaceId==843468296 then
- if mouse.Target==nil or mouse.Target.Name=="Laser Beam" then
- elseif mouse.Target.Parent:IsA("Accessory") then
- local tar = mouse.Target.Parent.Parent
- if tar:FindFirstChildWhichIsA("Humanoid") then
- tar:FindFirstChildWhichIsA("Humanoid").PlatformStand = true
- mouse.Target.Anchored = true
- else
- mouse.Target.Anchored = true
- end
- elseif mouse.Target:IsA("MeshPart") or mouse.Target:IsA("Part") then
- local tar = mouse.Target.Parent
- if tar:FindFirstChildWhichIsA("Humanoid") then
- tar:FindFirstChildWhichIsA("Humanoid").PlatformStand = true
- mouse.Target.Anchored = true
- else
- mouse.Target.Anchored = true
- end
- end
- end
- wait(.001)
- part0:Destroy()
- end
- end)
- local char = lp.Character
- while true do
- char.Humanoid.MaxHealth = "inf"
- char.Humanoid.Health = "inf"
- wait(.25)
- end
Add Comment
Please, Sign In to add comment