View difference between Paste ID: 6JKHMhyD and vfWvdDE4
SHOW: | | - or go back to the newest paste.
1
-- Instructions:
2
--[[
3
Any local variables with :
4
 = LocalPlayer:
5
	Must be replaced with "owner". So if your local variable is game.Players.LocalPlayer , replace it with owner
6
 = :GetMouse():
7
	Remove the variable entirely.
8
9
then paste this over the desired script
10
--]]
11
12
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
13
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
14
do
15
    print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
16
    script.Parent = Player.Character
17
 
18
    --RemoteEvent for communicating
19
    local Event = Instance.new("RemoteEvent")
20
    Event.Name = "UserInput_Event"
21
    --Fake event to make stuff like Mouse.KeyDown work
22
    local function fakeEvent()
23
        local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
24
        t.connect = t.Connect
25
        return t
26
    end
27
    --Creating fake input objects with fake variables
28
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
29
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
30
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
31
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
32
    end}
33
    --Merged 2 functions into one by checking amount of arguments
34
    CAS.UnbindAction = CAS.BindAction
35
 
36
    --This function will trigger the events that have been :Connect()'ed
37
    local function te(self,ev,...)
38
        local t = m[ev]
39
        if t and t._fakeEvent and t.Function then
40
            t.Function(...)
41
        end
42
    end
43
    m.TrigEvent = te
44
    UIS.TrigEvent = te
45
    Event.OnServerEvent:Connect(function(plr,io)
46
        if plr~=Player then return end
47
        if io.isMouse then
48
            m.Target = io.Target
49
            m.Hit = io.Hit
50
        else
51
            local b = io.UserInputState == Enum.UserInputState.Begin
52
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
53
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
54
            end
55
            for _,t in pairs(CAS.Actions) do
56
                for _,k in pairs(t.Keys) do
57
                    if k==io.KeyCode then
58
                        t.Function(t.Name,io.UserInputState,io)
59
                    end
60
                end
61
            end
62
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
63
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
64
        end
65
    end)
66
    Event.Parent = NLS([==[
67
    local Player = game:GetService("Players").LocalPlayer
68
    local Event = script:WaitForChild("UserInput_Event")
69
    local UIS = game:GetService("UserInputService")
70
    local input = function(io,a)
71
        if a then return end
72
        --Since InputObject is a client-side instance, we create and pass table instead
73
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
74
    end
75
    UIS.InputBegan:Connect(input)
76
    UIS.InputEnded:Connect(input)
77
    local Mouse = Player:GetMouse()
78
    local h,t
79
    --Give the server mouse data 30 times every second, but only if the values changed
80
    --If player is not moving their mouse, client won't fire events
81
    while wait(1/30) do
82
        if h~=Mouse.Hit or t~=Mouse.Target then
83
            h,t=Mouse.Hit,Mouse.Target
84
            Event:FireServer({isMouse=true,Target=t,Hit=h})
85
        end
86
    end]==],Player.Character)
87
    Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
88
end
89
-- End of FE converter
90
local lp = owner
91
local ch = owner.Character
92
name = owner.Name
93-
if owner.UserId==710232008 then
93+
if owner.UserId==225869729 then
94
	name="CHL"
95
end
96
if ch then
97
	local b = Instance.new("BillboardGui",ch.Head)
98
	b.Size = UDim2.new(0,200,0,50)
99
	b.ExtentsOffsetWorldSpace = Vector3.new(0,5,0)
100
	b.MaxDistance = 75
101
	local TextL= Instance.new("TextLabel",b)
102
	TextL.Size =UDim2.new(0,200,0,50)
103
	TextL.Text = name.." but with laser beams."
104
	TextL.TextColor3 = Color3.fromRGB(255, 255, 0)
105
 	TextL.BackgroundTransparency = 1
106
	TextL.TextScaled = true
107
	TextL.Font = Enum.Font.Arcade
108
	
109
end
110
mouse.KeyDown:Connect(function(key)
111
	if key=="q" or key=="z" then
112
		local part0 = Instance.new("Part",game.Workspace)
113
		part0.Name="Laser Beam"
114
		part0.Position = lp.Character.Head.Position + Vector3.new(0,5,0)
115
		part0.Orientation = mouse.Hit.lookVector
116
		part0.Size = Vector3.new(1,1,1)
117
		part0.Shape = "Ball"
118
		part0.Transparency = 1
119
		part0.Anchored = false
120
		part0.CanCollide = false
121
		
122
		local at1  = Instance.new("Attachment",part0)
123
		at1.Position = Vector3.new(.5,.5,0)
124
		local at2  = Instance.new("Attachment",part0)
125
		at2.Position = Vector3.new(.5,-.5,0)
126
		local trail = Instance.new("Trail",part0)
127
		trail.Lifetime = 10
128
		trail.MaxLength = 0
129
		trail.Attachment0 = at1
130
		trail.Attachment1 = at2
131
		
132
		local at3  = Instance.new("Attachment",part0)
133
		at3.Position = Vector3.new(-.5,.5,0)
134
		local at4  = Instance.new("Attachment",part0)
135
		at4.Position = Vector3.new(-.5,-.5,0)
136
		local trail0 = Instance.new("Trail",part0)
137
		trail0.Lifetime = 10
138
		trail0.MaxLength = 0
139
		trail0.Attachment0 = at3
140
		trail0.Attachment1 = at4
141
		
142
		local trail1 = Instance.new("Trail",part0)
143
		trail1.Lifetime = 10
144
		trail1.MaxLength = 0
145
		trail1.Attachment0 = at3
146
		trail1.Attachment1 = at1
147
		
148
		local trail2 = Instance.new("Trail",part0)
149
		trail2.Lifetime = 10
150
		trail2.MaxLength = 0
151
		trail2.Attachment0 = at2
152
		trail2.Attachment1 = at4
153
		
154
		trail.Transparency = NumberSequence.new(0,0)
155
		trail0.Transparency = NumberSequence.new(0,0)
156
		trail1.Transparency = NumberSequence.new(0,0)
157
		trail2.Transparency = NumberSequence.new(0,0)
158
		wait(.001)
159
160
		part0.CFrame = mouse.Hit
161
		trail.MaxLength = 100
162
		trail0.MaxLength = 100
163
		trail1.MaxLength = 100
164
		trail2.MaxLength = 100
165
		local target = mouse.Target
166
		if game.PlaceId==843495510 or mouse.Target.Parent.Name=="Zombie" or mouse.Target.Parent.Name=="Default Dummy" then
167
			if mouse.Target==nil or mouse.Target.Name=="Laser Beam"  then
168
			elseif mouse.Target.Parent:IsA("Accessory") then
169
				local tar = mouse.Target.Parent.Parent
170
				if tar:FindFirstChildWhichIsA("Humanoid") then
171
					if tar:FindFirstChildWhichIsA("Humanoid").Health==0 then
172
					else
173
						tar:FindFirstChildWhichIsA("Humanoid").Health = 0
174
					end
175
				elseif tar:FindFirstChild("Head") then
176
					tar:FindFirstChild("Head"):Destroy()
177
				elseif tar:FindFirstChild("UpperTorso") then
178
					tar:FindFirstChild("UpperTorso"):Destroy()
179
				elseif tar:FindFirstChild("Torso") then
180
					tar:FindFirstChild("Torso"):Destroy()
181
					end
182
				print(tar.Name.." died.")
183
			elseif mouse.Target:IsA("MeshPart") or mouse.Target:IsA("Part") then
184
				local tar = mouse.Target.Parent
185
				if tar:FindFirstChildWhichIsA("Humanoid") then
186
					if tar:FindFirstChildWhichIsA("Humanoid").Health==0 then
187
					else
188
						tar:FindFirstChildWhichIsA("Humanoid").Health = 0
189
						print(tar.Name.." died.")
190
					end
191
				elseif tar:FindFirstChild("Head") then
192
					tar:FindFirstChild("Head"):Destroy()
193
					print(tar.Name.." died.")
194
				elseif tar:FindFirstChild("UpperTorso") then
195
					tar:FindFirstChild("UpperTorso"):Destroy()
196
					print(tar.Name.." died.")
197
				elseif tar:FindFirstChild("Torso") then
198
					tar:FindFirstChild("Torso"):Destroy()
199
					print(tar.Name.." died.")
200
				end
201
			end
202
		elseif game.PlaceId==843468296 then
203
			if mouse.Target==nil or mouse.Target.Name=="Laser Beam" then
204
			elseif mouse.Target.Parent:IsA("Accessory") then
205
				local tar = mouse.Target.Parent.Parent
206
				if tar:FindFirstChildWhichIsA("Humanoid") then
207-
					tar:FindFirstChildWhichIsA("Humanoid").PlatformStand = true
207+
					tar:FindFirstChildWhichIsA("Humanoid").Sit = true
208-
					mouse.Target.Anchored = true
208+
209-
				else
209+
210-
					mouse.Target.Anchored = true
210+
211
			elseif mouse.Target:IsA("MeshPart") or mouse.Target:IsA("Part") then
212
				local tar = mouse.Target.Parent
213
				if tar:FindFirstChildWhichIsA("Humanoid") then
214
					tar:FindFirstChildWhichIsA("Humanoid").Sit = true
215
216-
					tar:FindFirstChildWhichIsA("Humanoid").PlatformStand = true
216+
217-
					mouse.Target.Anchored = true
217+
218-
				else
218+
219-
					mouse.Target.Anchored = true
219+
220
		wait(.001)
221
		part0:Destroy()
222
	end
223
end)
224
local char = lp.Character
225
while true do
226
	char.Humanoid.MaxHealth = "inf"
227
	char.Humanoid.Health = "inf"
228
	wait(.25)
229
end