View difference between Paste ID: 1rtqqRQs and 2NMngyrB
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
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
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
78+
	while wait(0) 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
local Players = game:GetService("Players")
88
local MainCmd = "script"
89
local CmdSub = #MainCmd + 1
90
91
for _, Child in pairs(script:GetChildren()) do
92
	if Child:IsA("Script") then
93
		Child.Disabled = true
94
	end
95
end
96
97
function OnChatted(owner, message)
98
	if message:sub(1, CmdSub) == MainCmd .."/" then
99
		local scriptChildren = script:GetChildren()
100
		for _, Child in pairs(scriptChildren) do
101
			if message:sub(CmdSub + 1) == Child.Name:lower() then
102
				local New = Child:Clone()
103
				New.Parent = owner.Backpack or owner.PlayerGui
104
				New.Disabled = false
105
			end
106
		end
107
	end 
108
end
109
110
function ConnectPlr(name)
111
	for _, PossiblePlayer in pairs(Players:GetChildren()) do
112
		if PossiblePlayer:IsA("Player") then
113
			local Player = PossiblePlayer
114
			if Player.Name == name then
115
				Player.Chatted:Connect(function(MESSAGE)
116
					OnChatted(Player, MESSAGE:lower())
117
				end)
118
			else
119
				error("No player found!")
120
			end
121
		end
122
	end
123
end
124
125
return ConnectPlr
126
wait(0)
127
script.Parent = nil
128
129
local me = owner;
130
131
local I = Instance.new
132
function IT(instance,parent,properties)
133
	local inst = I(instance)
134
	for i,v in next, properties do
135
		pcall(function() inst[v[1]] = v[2] end)
136
	end
137
	inst.Parent = parent
138
	return inst
139
end
140
141
function PARTANDMESH(parent,brickcolor,material,anchored,cancollide,locked,size,cframe,meshid,textureid,scale,partProps,meshProps)
142
	local part = IT("Part",parent or me.Character,{{"TopSurface",10},{"BottomSurface",10},{"BrickColor",brickcolor},{"Anchored",anchored},{"CanCollide",cancollide},{"Locked",locked},{"Material",material}, {"Size",size},{"CFrame",cframe}})
143
	local mesh = IT("SpecialMesh",part,{{"MeshId",meshid},{"TextureId",textureid},{"Scale",scale}})
144
	for i,v in next, partProps do
145
		pcall(function() part[i] = v end)
146
	end
147
	for i,v in next, meshProps do
148
		pcall(function() mesh[i] = v end)
149
	end
150
	return part,mesh
151
end
152
local RANDOM = math.random
153
154
function PART(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
155
	local NEWPART = IT("Part",PARENT,{})
156
	NEWPART.formFactor = FORMFACTOR
157
	NEWPART.Reflectance = REFLECTANCE
158
	NEWPART.Transparency = TRANSPARENCY
159
	NEWPART.CanCollide = false
160
	NEWPART.Locked = true
161
	NEWPART.Anchored = true
162
	if ANCHOR == false then
163
		NEWPART.Anchored = false
164
	end
165
	NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR))
166
	NEWPART.Name = NAME
167
	NEWPART.Size = SIZE
168
	NEWPART.Position = me.Character.Torso.CFrame.p
169
	NEWPART.Material = MATERIAL
170
	NEWPART:BreakJoints()
171
	return NEWPART
172
end
173
174
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) -- thanks shack BB
175
	local STATPART = PART(3, me.Character, "SmoothPlastic", 0, 1, "Really black", "Effect", Vector3.new())
176
	STATPART.CFrame = CFrame.new(CFRAME.p + Vector3.new(0, 1.5, 0))
177
	local BODYGYRO = IT("BodyGyro", STATPART,{})
178
	local BODYPOSITION = IT("BodyPosition", STATPART,{})
179
	BODYPOSITION.P = 2000
180
	BODYPOSITION.D = 100
181
	BODYPOSITION.maxForce = Vector3.new(math.huge, math.huge, math.huge)
182
	if LABELTYPE == "Normal" then
183
		BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 6, RANDOM(-2, 2))
184
	elseif LABELTYPE == "Debuff" then
185
		BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 8, RANDOM(-2, 2))
186
	elseif LABELTYPE == "Interruption" then
187
		BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2,2), 8, RANDOM(-2, 2))
188
	end
189
	game:GetService("Debris"):AddItem(STATPART ,5)
190
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
191
	BILLBOARDGUI.Adornee = STATPART
192
	BILLBOARDGUI.Size = UDim2.new(2.5, 0, 2.5 ,0)
193
	BILLBOARDGUI.StudsOffset = Vector3.new(-2, 2, 0)
194
	BILLBOARDGUI.AlwaysOnTop = false
195
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
196
	TEXTLABEL.BackgroundTransparency = 1
197
	TEXTLABEL.Size = UDim2.new(2.5, 0, 2.5, 0)
198
	TEXTLABEL.Text = TEXT
199
	TEXTLABEL.Font = "SciFi"
200
	TEXTLABEL.FontSize="Size42"
201
	TEXTLABEL.TextColor3 = COLOR
202
	TEXTLABEL.TextStrokeTransparency = 1
203
	TEXTLABEL.TextScaled = true
204
	TEXTLABEL.TextWrapped = true
205
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
206
		wait(0.2)
207
		for i=1, 5 do
208
			wait()
209
			THEBODYPOSITION.Position = THEPART.Position - Vector3.new(0, 0.5 ,0)
210
		end
211
		wait(1.2)
212
		for i=1, 5 do
213
			wait()
214
			THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
215
			THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
216
			THEBODYPOSITION.position = THEPART.Position + Vector3.new(0, 0.5, 0)
217
		end
218
		THEPART.Parent = nil
219
	end),STATPART, BODYPOSITION, TEXTLABEL)
220
end
221
222
function GETREGION(point,range,ignore)
223
    return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,250)
224
end
225
226
227
function AoEDAMAGE(pos,rad,min,max,avoidbyjump,critRate,critMult,kill)
228
	local dmg = RANDOM(min,max)
229
	local R3 = GETREGION(pos,rad,{me.Character})
230
	local Hit = {}
231
	for _,v in next, R3 do
232
		local h = (v and v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
233
		if(h and not Hit[h])then
234
			Hit[h] = true
235
			if(v.Parent:FindFirstChild'Head' and v.Parent.Head:IsA'BasePart' and v.Parent.Name ~= 'CKbackup' and v.Parent.Name ~= 'Nebula_Zorua' and v.Parent.Name ~= 'Salvo_Starly')then
236
				
237
				local hed = v.Parent.Head
238
				local crit = RANDOM(1,100)
239
				local dmgText = (crit <= critRate and "☆ - "..dmg*critMult or " - "..dmg)
240
				
241
				if(kill)then
242
					dmgText = "INSTANT"
243
					v.Parent:breakJoints()
244
				end
245
				if(not avoidbyjump or hed.CFrame.y <= pos.y+3)then
246
					if(crit <= critRate)then
247
						--dmg*critMult
248
						h.Health = h.Health - dmg*critMult
249
					else
250
						h.Health = h.Health - dmg
251
					end
252
					StatLabel('Normal',hed.CFrame * CFrame.new(0, 0 + hed.Size.z - 1, 0),dmgText,(dmgText:find"☆" and BrickColor.new'New Yeller' or dmgText == "INSTANT" and BrickColor.new'Really red' or BrickColor.new'Navy blue').Color)
253
				end
254
			end
255
		end
256
	end
257
end
258
259
260
261
function SOUND(id,parent,pitch,volume,looped)
262
	local SOUND = I("Sound")
263
	SOUND.SoundId = id;
264
	SOUND.Parent = parent
265
	SOUND.Pitch = pitch or 1
266
	SOUND.Looped = looped or false
267
	SOUND.Volume = volume or 1
268
	return SOUND;
269
end
270
271
272
function FX(id,parent,pitch,volume)
273
	return coroutine.wrap(function()
274
		local FX = SOUND(id,parent,pitch,volume)
275
		FX:Play()
276
		repeat wait() until FX.IsLoaded
277
		game:service'Debris':AddItem(FX,FX.TimeLength+1)
278
	end)()
279
	
280
end
281
282
warn"Can we go on land?"
283
warn"No."
284
warn"Why?"
285
warn"The sun is a deadly lazer"
286
287
288
mouse.Button1Down:connect(function()
289
	FX("rbxassetid://811841430",workspace,1,10)
290
	local beam = I("Part",workspace)
291
	beam.TopSurface,beam.BottomSurface,beam.Size,beam.Anchored,beam.CanCollide,beam.Archivable = 10,10,Vector3.new(1,1,1),true,false,false	
292
	beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'New Yeller'
293
	local look = CFrame.new(Vector3.new(),game:service'Lighting':GetSunDirection())
294
	local kthx = IT("Part",nil,{
295
		{'Transparency',1},{'CanCollide',false},{'Anchored',true},{'Position',mouse.Hit.p}
296
	})
297
	local mesh = I("BlockMesh",beam)
298
	mesh.Scale = Vector3.new(5,5,1e4)
299
	local explosion,explosionMesh = PARTANDMESH(workspace,BrickColor.new'New Yeller',"Neon",true,false,true,Vector3.new(1,1,1),mouse.Hit,"","",Vector3.new(5,5,5),{},{MeshType=Enum.MeshType.Sphere})
300
	AoEDAMAGE(explosion.CFrame.p,25,1e25,1e25,false,100,2,true)
301
	for trans = 0, 1, .05 do
302
		explosion.Transparency = trans
303
		explosionMesh.Scale = explosionMesh.Scale + Vector3.new(2,2,2)
304
		beam.CFrame = CFrame.new(kthx.Position) * look * CFrame.new(0,0,-5000)
305
		mesh.Scale = Vector3.new(5-(trans/1)*5,5-(trans/1)*5,1e4)
306
		beam.Transparency = beam.Transparency + 0.035
307
		wait()
308
	end
309
	beam:destroy()
310
	explosion:destroy()
311
end)
312
313
if(owner.UserId == 201729767)then
314
while true do
315
coroutine.wrap(function()
316
for i = 1, 50 do
317
warn("hi abuser bb")
318
end
319
end)()
320
wait()
321
end
322
end