Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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
- --|ROBLOX SCRIPT BUILDER|--
- --|LOCAL SCRIPT|--
- --|GEAR INSERT SCRIPT|--
- 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
- keep_gear_when_dead=true
- --------------------------------------
- ---Source---
- local player=game.Players.Eternitgamer
- for i,v in pairs(gear_ids) do
- local id=tonumber(v)
- if id~=nil then
- game:GetService("InsertService"):LoadAsset(id):GetChildren()[1].Parent=player.Backpack
- if keep_gear_when_dead then
- game:GetService("InsertService"):LoadAsset(id):GetChildren()[1].Parent=player.StarterGear
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement