View difference between Paste ID: qrUSUtB5 and 5VHGtvgm
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
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
--|ROBLOX SCRIPT BUILDER|--
88
--|LOCAL SCRIPT|--
89
--|GEAR INSERT SCRIPT|--
90
91
gear_ids={193769809,225921000,163352376,253519495,30393548,88885539,78730532,11999247,477910063,125013830,108158379,212641536,2544549379,53623322,12902404,66896638,409745306,11377306,456226536,73232803,158069071,97885508,127506105,243790334,10472779,233520425,26421972,173755801,28275809,105351720,117544573,66896601,118281463,66416616,139578207,127506257,84418938,136172718,15932306,467138029,398675172,12848902,168140949,57229357,11563251,154727201,172248941,33866728,65545955,163354553,295460073,168142620,2620523875,13477890,168140516,11419319,95354288,71037028,846792499,101106419,16979083,172298750,27133214,113328094,11956382,169602010,130113061,49491736,2350119937,221173389,12890798,450565762,430066424,1103012605,1340206957,126719093,2544539559,45177979,16726030,16722267,206136532,236441643,29100449,25926517,170903868,257343434,83021217,94333296,170896461,12145515,20373160,21392199,19328185,317592936,52627419,461488745,30847779,57902859,29100543,34901961,629893424,12547976,121925044,1380774367,30392263,223785065,15177716,116040770,639345143,22596452,2506347092,99119198,34399428,22152234,11719016,904534058,341109697,2385189785,549915884,928806888,34398653,101106464,236438668,498752764,2506347092,29532138,154727251,161282711,122278207,483899693,45754061,11373617,18409191,15397778,65546284,24346755,212296400,114020538,12775410,3459922232,118650365,99119261,44115926,111876831,12775410,28664212,112591865,114687223,13206984,11450664,104642566,20721924,46846115,15668963,164207842,125013799,13207169,189910805,29345958,445150567,10469910,402305186,13745494,14719505,96669682,101110605,103358098,31839411,21439965,11885154,163348987,2620441860,18474459,66426498,117498775,335086410,58574416,52180871,65545971,154727343,49929767,22152171,128160929,2535102910,361950297,2316759705,1230024287,302280931,95258660,99797381,928794651,330295904,102705386,185422055,174752553,1180417820,383608755,178077177,287426148,2136389582,21439893,24659699,65082275,83021217,1513260464,99254437,178076989,114687251,101078524,89487934,98253626,10510024,332755212,317593302,2409287383,72069888,163348758,50938765,181550181,13478015,127506257,835780770,178076831,75550907,105351748,563288952,45941397,42847923,98411325,35682284,315573586,128160832,11999279,63253701,1360078533,356213494,176219131,18481407,21392417,10727852,22787248,215392741,71597048,86494914,32355759,188853857,87361995,12187348,168141301,170897263} --insert gear asset ids
92
keep_gear_when_dead=true
93
--------------------------------------
94
95
---Source---
96-
local player=game.Players.cachiflux
96+
local player=game.Players.Eternitgamer
97
for i,v in pairs(gear_ids) do
98
	local id=tonumber(v)
99
	if id~=nil then
100
		game:GetService("InsertService"):LoadAsset(id):GetChildren()[1].Parent=player.Backpack
101
		if keep_gear_when_dead then
102
			game:GetService("InsertService"):LoadAsset(id):GetChildren()[1].Parent=player.StarterGear
103
		end
104
	end
105
end