View difference between Paste ID: jbEnXUP2 and T573QKVK
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9-
plr = game:service'Players'.LocalPlayer
9+
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13-
mouse = plr:GetMouse()
13+
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
--[[
87
88
Created by Sharkringan kthx 
89
90
--]]
91
92
wait(1/60)
93
94
plr = owner
95
char = plr.Character
96
root = char:FindFirstChild'HumanoidRootPart'
97
hum = char:FindFirstChildOfClass'Humanoid'
98
clones = {}
99
followplr = true
100
radius = 25
101
102
if char.Head:FindFirstChild'face' then
103
char.Head.face:Destroy()
104
end
105
106
for _, a in pairs(char:children()) do
107
if a:IsA'Part' then
108
a.Transparency = 1
109
elseif a:IsA'Accessory' then
110
a:Destroy()
111
end
112
end
113
114
eyes = Instance.new('Part', char)
115
eyes.Anchored = false
116
eyes.Name = "Eyes"
117
eyes.Size = Vector3.new(0.22, 0.052, 0.105)
118
eyesm = Instance.new('SpecialMesh', eyes)
119
eyesm.Scale = Vector3.new(0.039, 0.039, 0.039)
120
eyesm.MeshId = "rbxassetid://1300138314"
121
eyesm.TextureId = "rbxassetid://1300129774"
122
123
body = Instance.new('Part', char)
124
body.Anchored = false
125
body.Name = "Body"
126
body.Size = Vector3.new(0.07, 0.062, 0.078)
127
bodym = Instance.new('SpecialMesh', body)
128
bodym.Scale = Vector3.new(0.039, 0.039, 0.039)
129
bodym.MeshId = "rbxassetid://1300136843"
130
bodym.TextureId = "rbxassetid://1300137893"
131
132
weld1 = Instance.new('Weld', eyes)
133
weld1.Part0 = eyes
134
weld1.Part1 = root
135
weld1.C0 = CFrame.new(0,1.55,.2)
136
weld2 = Instance.new('Weld', body)
137
weld2.Part0 = body
138
weld2.Part1 = root
139
weld2.C0 = CFrame.new(0,2.1,0)
140
local music=Instance.new("Sound",char.Torso)
141
music.SoundId="rbxassetid://1319438783"
142
music.Volume = 2.5
143
music.Looped=true
144
music:Play()
145
TheWay1 = Instance.new('Sound', body)
146
TheWay1.SoundId = "rbxassetid://1320393438"
147
TheWay1.Volume = 3
148
TheWay1.Name = "TheWay1"
149
TheWay2 = Instance.new('Sound', body)
150
TheWay2.SoundId = "rbxassetid://1295525558"
151
TheWay2.Volume = 3
152
TheWay2.Name = "TheWay2"
153
Spit = Instance.new('Sound', body)
154
Spit.SoundId = "rbxassetid://1322795266"
155
Spit.Volume = 3
156
Spit.Name = "Spit"
157
Click = Instance.new('Sound', body)
158
Click.SoundId = "rbxassetid://1335379417"
159
Click.Volume = 3
160
161
num = 1
162
cooldown = false
163
rand = math.random(1,2)
164
165
for i = 1,10 do
166
wait()
167
char.Archivable = true
168
clone = char:Clone()
169
for _, a in pairs(clone:children()) do
170
if a.Name == "Right Arm" or a.Name == "UpperRightArm" then
171
a:Destroy()
172
elseif a.Name == 'Left Arm' or a.Name == 'UpperLeftArm' then
173
a:Destroy()
174
elseif a.Name == "Torso" or a.Name == "UpperTorso" then
175
	if a.Sound then 
176
		a.Sound:Remove()
177
	end
178
end
179
end
180
table.insert(clones,clone)
181
end
182
183
for _, a in pairs(clones) do
184
a.Parent = char
185
a:MoveTo(root.Position + Vector3.new(math.random(1,10),math.random(1,10),math.random(1,10)))
186
end
187
188
function sfx1()
189
for _, a in pairs(clones) do
190
rand = math.random(1,2)
191
if rand == 1 then
192
a.Body['TheWay1'].Pitch = math.random(0.9,1)
193
a.Body['TheWay1']:Play()
194
elseif rand == 2 then
195
a.Body['TheWay2'].Pitch = math.random(0.9,1)
196
a.Body['TheWay2']:Play()
197
end
198
wait(math.random(0.4,0.6))
199
end
200
end
201
202
function sfx2()
203
for _, a in pairs(clones) do
204
a.Body.Spit.Pitch = math.random(0.9,1)
205
a.Body.Spit:Play()
206
wait(math.random(0.4,0.6))
207
end
208
end
209
210
mouse.KeyDown:connect(function(k)
211
key = k:lower()
212
if key == "e" and not cooldown then
213
cooldown = true
214
sfx1()
215
wait(.7)
216
cooldown = false
217
elseif key == "r" and not cooldown then
218
cooldown = true
219
sfx2()
220
wait(.7)
221
cooldown = false
222
end
223
end)
224
225
plr.Chatted:connect(function(m)
226
if string.sub(m:lower(),1,15) == "bruddas, follow" then
227
for _,v in pairs(game:service'Players':GetPlayers()) do
228
if string.find(v.Name:lower(),string.sub(m:lower(),17,-1)) then
229
stalking = v
230
else
231
stalking = plr
232
end
233
end
234
elseif string.sub(m:lower(),1,16) == "bruddas, protect" then
235
for _,v in pairs(game:service'Players':GetPlayers()) do
236
if string.find(v.Name:lower(),string.sub(m:lower(),18,-1)) then
237
protecting = v
238
else
239
protecting = nil
240
end
241
end
242
end
243
end)
244
245
while wait(1) do
246
number = #clones
247
position = root.CFrame
248
protecting = false
249
if stalking == nil then
250
followplr = true
251
elseif stalking ~= nil then
252
followplr = false
253
end
254
for _, a in pairs(clones) do
255
if a:FindFirstChildOfClass'Humanoid' and followplr and not protecting then
256
a:FindFirstChildOfClass'Humanoid':MoveTo(root.Position + Vector3.new(math.random(-10,10),0,math.random(-10,10)))
257
end
258
end
259
if not protecting and not followplr and stalking ~= nil and stalking.Character:FindFirstChild'HumanoidRootPart' then
260
for _, a in pairs(clones) do
261
if a:FindFirstChildOfClass'Humanoid' then
262
a:FindFirstChildOfClass'Humanoid':MoveTo(stalking.Character.HumanoidRootPart.Position + Vector3.new(math.random(-10,10),0,math.random(-10,10)))
263
end
264
end
265
rand = math.random(1,10)
266
if rand == 5 then
267
for i = 1,3 do
268
random = clones[math.random(1,#clones)] 
269
rand = math.random(1,2)
270
if rand == 1 then
271
random.Body['TheWay1']:Play()
272
else
273
random.Body['TheWay2']:Play()
274
end
275
end
276
end
277
end
278
end