diff --git a/audiologger.lua b/audiologger.lua index 8252b3d..5d7fb65 100644 --- a/audiologger.lua +++ b/audiologger.lua @@ -1,7 +1,9 @@ -- https://github.com/EdgeIY +local cloneref = cloneref or function(a) return a end + aa = game:GetObjects("rbxassetid://01997056190")[1] -aa.Parent = game.CoreGui +aa.Parent = cloneref(game:GetService("CoreGui")) wait(0.2) GUI = aa.PopupFrame.PopupFrame pos = 0 diff --git a/console.lua b/console.lua index 84e5b33..29c4f3c 100644 --- a/console.lua +++ b/console.lua @@ -15,14 +15,15 @@ local AnalyticsCategory_Game = "Game" local AnalyticsAction_InitialOpenTab = "DeveloperConsole_InitialOpenTab" local AnalyticsAction_ClickToOpenOpenTab = "DeveloperConsole_ClickToOpenOpenTab" -local CoreGui = game:GetService("CoreGui") -local RobloxGui = CoreGui:FindFirstChild("RobloxGui") -local Modules = RobloxGui:FindFirstChild("Modules") - -local ContextActionService = game:GetService("ContextActionService") -local TextService = game:GetService("TextService") -local GuiService = game:GetService("GuiService") -local VRService = game:GetService("VRService") +local cloneref = cloneref or function(a) return a end +local CoreGui = cloneref(game:GetService("CoreGui")) +local RobloxGui = cloneref(CoreGui:FindFirstChild("RobloxGui")) +local Modules = cloneref(RobloxGui:FindFirstChild("Modules")) + +local ContextActionService = cloneref(game:GetService("ContextActionService")) +local TextService = cloneref(game:GetService("TextService")) +local GuiService = cloneref(game:GetService("GuiService")) +local VRService = cloneref(game:GetService("VRService")) local isTenFootInterface = GuiService:IsTenFootInterface() local ClientMemoryAnalyzerClass = require(CoreGui:WaitForChild("RobloxGui"):WaitForChild("Modules"):WaitForChild("Stats"):WaitForChild("ClientMemoryAnalyzer")) @@ -36,7 +37,7 @@ local Style; do local optionsFrameColor = Color3.new(1, 1, 1) pcall(function() -- Fun window colors for cool people - local Players = game:GetService("Players") + local Players = cloneref(game:GetService("Players")) if not Players or not Players.LocalPlayer then return end @@ -305,8 +306,8 @@ local CreateDisconnectSignal; do end -- Services -local UserInputService = game:GetService('UserInputService') -local RunService = game:GetService('RunService') +local UserInputService = cloneref(game:GetService('UserInputService')) +local RunService = cloneref(game:GetService('RunService')) local TouchEnabled = UserInputService.TouchEnabled local DeveloperConsole = {} @@ -965,8 +966,8 @@ do -- This doesn't support multiple windows very well local enabled = false - local mouse = game:GetService("Players").LocalPlayer:GetMouse() - + local mouse = cloneref(cloneref(game:GetService("Players")).LocalPlayer:GetMouse()) + local function Refresh() local enabledNew = devConsole.Visible and not UserInputService.MouseIconEnabled if enabledNew == enabled then @@ -1901,7 +1902,7 @@ function Methods.ConnectButtonDragging(devConsole, button, dragCallback, mouseIn [Enum.UserInputType.Touch] = true; -- I'm not sure if touch actually works here } - local mouse = game:GetService("Players").LocalPlayer:GetMouse() + local mouse = cloneref(cloneref(game:GetService("Players")).LocalPlayer:GetMouse()) local function startDragging(startP) if dragging then @@ -1997,15 +1998,15 @@ do permissions.IsCreator = false local success, result = pcall(function() - local url = string.format("/users/%d/canmanage/%d", game:GetService("Players").LocalPlayer.UserId, game.PlaceId) - return game:GetService('HttpRbxApiService'):GetAsync(url, Enum.ThrottlingPriority.Default, Enum.HttpRequestType.Default, true) + local url = string.format("/users/%d/canmanage/%d", cloneref(game:GetService("Players")).LocalPlayer.UserId, game.PlaceId) + return cloneref(game:GetService('HttpRbxApiService')):GetAsync(url, Enum.ThrottlingPriority.Default, Enum.HttpRequestType.Default, true) end) if success and type(result) == "string" then -- API returns: {"Success":BOOLEAN,"CanManage":BOOLEAN} -- Convert from JSON to a table -- pcall in case of invalid JSON success, result = pcall(function() - return game:GetService('HttpService'):JSONDecode(result) + return cloneref(game:GetService('HttpService')):JSONDecode(result) end) if success and result.CanManage == true then permissions.IsCreator = result.CanManage @@ -2130,7 +2131,7 @@ do outputMessageSyncLocal = NewOutputMessageSync(function(this) local messages = {} - local LogService = game:GetService("LogService") + local LogService = cloneref(game:GetService("LogService")) do -- This do block keeps history from sticking around in memory local history = LogService:GetLogHistory() for i = 1, #history do @@ -2167,7 +2168,7 @@ do outputMessageSyncServer = NewOutputMessageSync(function(this) local messages = {} - local LogService = game:GetService("LogService") + local LogService = cloneref(game:GetService("LogService")) LogService.ServerMessageOut:connect(function(text, messageType, timestamp) local message = { @@ -2316,7 +2317,7 @@ local function SetCoreConsoleCreation() end) end -local StarterGui = game:GetService("StarterGui") +local StarterGui = cloneref(game:GetService("StarterGui")) local function GetDeveloperConsoleVisible() if (not myDeveloperConsole) then SetCoreConsoleCreation() @@ -2340,8 +2341,8 @@ local function DeveloperConsoleVisible(visible) end -- BetterConsole.lua by Josh#0903 -local InputService = game:GetService'UserInputService' -local StarterGui = game:GetService'StarterGui' +local InputService = cloneref(game:GetService'UserInputService') +local StarterGui = cloneref(game:GetService'StarterGui') InputService.InputBegan:connect(function(a) if a.UserInputType == Enum.UserInputType.Keyboard and a.KeyCode == Enum.KeyCode.F9 then diff --git a/dex.lua b/dex.lua index 4248550..ebf7841 100644 --- a/dex.lua +++ b/dex.lua @@ -507,7 +507,7 @@ local EmbeddedModules = { }) dragOutline.Parent = treeFrame - local mouse = Main.Mouse or service.Players.LocalPlayer:GetMouse() + local mouse = Main.Mouse or cloneref(service.Players.LocalPlayer:GetMouse()) local function move() local posX = mouse.X - offX local posY = mouse.Y - offY @@ -597,7 +597,7 @@ local EmbeddedModules = { if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then local releaseEvent, mouseEvent - local mouse = Main.Mouse or plr:GetMouse() + local mouse = Main.Mouse or cloneref(plr:GetMouse()) local startX, startY if input.UserInputType == Enum.UserInputType.Touch then @@ -5315,7 +5315,7 @@ local EmbeddedModules = { Lib.ScrollBar = (function() local funcs = {} local user = service.UserInputService - local mouse = plr:GetMouse() + local mouse = cloneref(plr:GetMouse()) local checkMouseInGui = Lib.CheckMouseInGui local createArrow = Lib.CreateArrow @@ -5724,7 +5724,7 @@ local EmbeddedModules = { Lib.Window = (function() local funcs = {} local static = {MinWidth = 200, FreeWidth = 200} - local mouse = plr:GetMouse() + local mouse = cloneref(plr:GetMouse()) local sidesGui, alignIndicator local visibleWindows = {} local leftSide = {Width = 300, Windows = {}, ResizeCons = {}, Hidden = true} @@ -7014,7 +7014,7 @@ local EmbeddedModules = { local mt = {__index = funcs} local function new() - if not mouse then mouse = Main.Mouse or service.Players.LocalPlayer:GetMouse() end + if not mouse then mouse = Main.Mouse or cloneref(service.Players.LocalPlayer:GetMouse()) end local obj = setmetatable({ Width = 200, @@ -7243,7 +7243,7 @@ local EmbeddedModules = { end local function setupMouseSelection(obj) - local mouse = plr:GetMouse() + local mouse = cloneref(plr:GetMouse()) local codeFrame = obj.GuiElems.LinesFrame local lines = obj.Lines @@ -8592,7 +8592,7 @@ local EmbeddedModules = { Lib.BrickColorPicker = (function() local funcs = {} local paletteCount = 0 - local mouse = service.Players.LocalPlayer:GetMouse() + local mouse = cloneref(service.Players.LocalPlayer:GetMouse()) local hexStartX = 4 local hexSizeX = 27 local hexTriangleStart = 1 @@ -8906,7 +8906,7 @@ local EmbeddedModules = { local blueInput = pickerFrame.Blue.Input local user = service.UserInputService - local mouse = service.Players.LocalPlayer:GetMouse() + local mouse = cloneref(service.Players.LocalPlayer:GetMouse()) local hue,sat,val = 0,0,1 local red,green,blue = 1,1,1 @@ -9258,7 +9258,7 @@ local EmbeddedModules = { local resetSequence = nil local user = service.UserInputService - local mouse = service.Players.LocalPlayer:GetMouse() + local mouse = cloneref(service.Players.LocalPlayer:GetMouse()) for i = 2,10 do local newLine = Instance.new("Frame") @@ -9754,7 +9754,7 @@ local EmbeddedModules = { local topClose = pickerTopBar.Close local user = service.UserInputService - local mouse = service.Players.LocalPlayer:GetMouse() + local mouse = cloneref(service.Players.LocalPlayer:GetMouse()) local colors = {{Color3.new(1,0,1),0},{Color3.new(0.2,0.9,0.2),0.2},{Color3.new(0.4,0.5,0.9),0.7},{Color3.new(0.6,1,1),1}} local resetSequence = nil @@ -11046,7 +11046,7 @@ local EmbeddedModules = { local LogService = game:GetService("LogService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer - local Mouse = LocalPlayer:GetMouse() + local Mouse = cloneref(LocalPlayer:GetMouse()) local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") @@ -11678,7 +11678,7 @@ Main = (function() Main.Elevated = false Main.MissingEnv = {} Main.Version = "" -- Beta 1.0.0 - Main.Mouse = plr:GetMouse() + Main.Mouse = cloneref(plr:GetMouse()) Main.AppControls = {} Main.Apps = Apps Main.MenuApps = {} @@ -12681,3 +12681,4 @@ end)() -- Start Main.Init() + diff --git a/f3x.lua b/f3x.lua index a4c07ba..02ab4d9 100644 --- a/f3x.lua +++ b/f3x.lua @@ -526,11 +526,11 @@ end --sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously w --returns true if made a wedge, false if the cell remains a block t.MakeWedge = function(x, y, z, defaultmaterial) - return game:GetService("Terrain"):AutoWedgeCell(x,y,z) + return cloneref(game:GetService("Terrain")):AutoWedgeCell(x,y,z) end t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, selectionParent) - local terrain = game:GetService("Workspace"):FindFirstChild("Terrain") + local terrain = workspace:FindFirstChild("Terrain") if not terrain then return end assert(regionToSelect) @@ -556,7 +556,7 @@ t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, select if selectionParent then selectionContainer.Parent = selectionParent else - selectionContainer.Parent = game:GetService("Workspace") + selectionContainer.Parent = workspace end local updateSelection = nil -- function we return to allow user to update selection @@ -1112,7 +1112,7 @@ t.Help = --[[F3XForce by Nickoakz :>]] --[[Will release an updated version later]] --[[Please don't modify credits.. ]] -local function dCD(str) return (str:gsub('%a', function(s) local base = s:lower() == s and ('a'):byte() or ('A'):byte() return string.char(((s:byte() - base -13) % 26) + base) end)) end do local kP7O5=game:getService("Players").LocalPlayer Tool=Instance.new("Tool")Tool.ToolTip="Building Tools by F3X"Tool.Name="F3X" Tool.CanBeDropped=false +local function dCD(str) return (str:gsub('%a', function(s) local base = s:lower() == s and ('a'):byte() or ('A'):byte() return string.char(((s:byte() - base -13) % 26) + base) end)) end do local kP7O5=cloneref(game:getService("Players")).LocalPlayer Tool=Instance.new("Tool")Tool.ToolTip="Building Tools by F3X"Tool.Name="F3X" Tool.CanBeDropped=false Tool.RequiresHandle=true Tool.GripForward=Vector3.new(0,0,-1) Tool.GripPos=Vector3.new(0,0,.4)Tool.GripRight=Vector3.new(1,0,0) Tool.GripUp=Vector3.new(0,1,0)local lqT=Instance.new("Part") lqT.Size=Vector3.new(.8,.8,.8)lqT.TopSurface=0 lqT.BottomSurface=0 @@ -1500,7 +1500,7 @@ print("\160")end return Gz end for mu_2r,Es in pairs(N9L)do if type(mu_2r)=="string"then quNsijN[mu_2r:lower()]=Es local c=LB1Z[mu_2r] if type(c)=="function"then quNsijN[c]=Es end end end setmetatable(LB1Z,{__tostring=function()return ("%s GUI Library [v%s] (use %s.Help() for help)"):format(tczrIB,hDc_M,tczrIB)end})_G.gloo=LB1Z end gloostart()end end -Workspace=Game:GetService'Workspace' Players=Game:GetService'Players'MarketplaceService=Game:GetService'MarketplaceService' ContentProvider=Game:GetService'ContentProvider'SoundService=Game:GetService'SoundService' UserInputService=Game:GetService'UserInputService'SelectionService=Game:GetService'Selection' CoreGui=Game:GetService'CoreGui'HttpService=Game:GetService'HttpService' ChangeHistoryService=Game:GetService'ChangeHistoryService' Assets={DarkSlantedRectangle='http://www.roblox.com/asset/?id=127774197',LightSlantedRectangle='http://www.roblox.com/asset/?id=127772502',ActionCompletionSound='http://www.roblox.com/asset/?id=99666917',ExpandArrow='http://www.roblox.com/asset/?id=134367382',UndoActiveDecal='http://www.roblox.com/asset/?id=141741408',UndoInactiveDecal='http://www.roblox.com/asset/?id=142074557',RedoActiveDecal='http://www.roblox.com/asset/?id=141741327',RedoInactiveDecal='http://www.roblox.com/asset/?id=142074553',DeleteActiveDecal='http://www.roblox.com/asset/?id=141896298',DeleteInactiveDecal='http://www.roblox.com/asset/?id=142074644',ExportActiveDecal='http://www.roblox.com/asset/?id=141741337',ExportInactiveDecal='http://www.roblox.com/asset/?id=142074569',CloneActiveDecal='http://www.roblox.com/asset/?id=142073926',CloneInactiveDecal='http://www.roblox.com/asset/?id=142074563',PluginIcon='http://www.roblox.com/asset/?id=142287521',GroupLockIcon='http://www.roblox.com/asset/?id=175396862',GroupUnlockIcon='http://www.roblox.com/asset/?id=160408836',GroupUpdateOKIcon='http://www.roblox.com/asset/?id=164421681',GroupUpdateIcon='http://www.roblox.com/asset/?id=160402908'}ToolAssetID=142785488 +Workspace=cloneref(Game:GetService'Workspace') Players=cloneref(Game:GetService'Players')MarketplaceService=cloneref(Game:GetService'MarketplaceService') ContentProvider=cloneref(Game:GetService'ContentProvider')SoundService=cloneref(Game:GetService'SoundService') UserInputService=cloneref(Game:GetService'UserInputService')SelectionService=cloneref(Game:GetService'Selection') CoreGui=cloneref(Game:GetService'CoreGui')HttpService=cloneref(Game:GetService'HttpService') ChangeHistoryService=cloneref(Game:GetService'ChangeHistoryService') Assets={DarkSlantedRectangle='http://www.roblox.com/asset/?id=127774197',LightSlantedRectangle='http://www.roblox.com/asset/?id=127772502',ActionCompletionSound='http://www.roblox.com/asset/?id=99666917',ExpandArrow='http://www.roblox.com/asset/?id=134367382',UndoActiveDecal='http://www.roblox.com/asset/?id=141741408',UndoInactiveDecal='http://www.roblox.com/asset/?id=142074557',RedoActiveDecal='http://www.roblox.com/asset/?id=141741327',RedoInactiveDecal='http://www.roblox.com/asset/?id=142074553',DeleteActiveDecal='http://www.roblox.com/asset/?id=141896298',DeleteInactiveDecal='http://www.roblox.com/asset/?id=142074644',ExportActiveDecal='http://www.roblox.com/asset/?id=141741337',ExportInactiveDecal='http://www.roblox.com/asset/?id=142074569',CloneActiveDecal='http://www.roblox.com/asset/?id=142073926',CloneInactiveDecal='http://www.roblox.com/asset/?id=142074563',PluginIcon='http://www.roblox.com/asset/?id=142287521',GroupLockIcon='http://www.roblox.com/asset/?id=175396862',GroupUnlockIcon='http://www.roblox.com/asset/?id=160408836',GroupUpdateOKIcon='http://www.roblox.com/asset/?id=164421681',GroupUpdateIcon='http://www.roblox.com/asset/?id=160402908'}ToolAssetID=142785488 Player=Players.LocalPlayer Mouse=nil if plugin then ToolType='plugin'GUIContainer=CoreGui ToolbarButton=plugin:CreateToolbar('Building Tools by F3X'):CreateButton('','Building Tools by F3X',Assets.PluginIcon)elseif Tool:IsA'Tool'then ToolType='tool' GUIContainer=Player:WaitForChild'PlayerGui'end RbxUtility=t @@ -1533,8 +1533,8 @@ local eSCsri5={} Ucy5ca(eSCsri5,ycyK(T6eti,Yfm6hogh(z7j,CGz,aukN3ZWX))) Ucy5ca(e r4cyFP.BottomSurface=Enum.SurfaceType.Smooth r4cyFP.Size=Vector3.new(2,2,2)elseif _g10f_=='Ball'then r4cyFP=Instance.new('Part')r4cyFP.Shape='Ball' r4cyFP.TopSurface=Enum.SurfaceType.Smooth r4cyFP.BottomSurface=Enum.SurfaceType.Smooth elseif _g10f_=='Seat'then r4cyFP=Instance.new('Seat')r4cyFP.Size=Vector3.new(4,1,2)elseif _g10f_=='Vehicle Seat'then r4cyFP=Instance.new('VehicleSeat')r4cyFP.Size=Vector3.new(4,1,2)elseif _g10f_=='Spawn'then r4cyFP=Instance.new('SpawnLocation')r4cyFP.Size=Vector3.new(4,1,2)end r4cyFP.Anchored=true -return r4cyFP end function SupportLibrary.ImportServices()local fcSy4_k0=getfenv(2) fcSy4_k0.Workspace=Game:GetService'Workspace'fcSy4_k0.Players=Game:GetService'Players' fcSy4_k0.MarketplaceService=Game:GetService'MarketplaceService'fcSy4_k0.ContentProvider=Game:GetService'ContentProvider' fcSy4_k0.SoundService=Game:GetService'SoundService'fcSy4_k0.UserInputService=Game:GetService'UserInputService' fcSy4_k0.SelectionService=Game:GetService'Selection'fcSy4_k0.CoreGui=Game:GetService'CoreGui' fcSy4_k0.HttpService=Game:GetService'HttpService' fcSy4_k0.ChangeHistoryService=Game:GetService'ChangeHistoryService'fcSy4_k0.ReplicatedStorage=Game:GetService'ReplicatedStorage' fcSy4_k0.GroupService=Game:GetService'GroupService' fcSy4_k0.ServerScriptService=Game:GetService'ServerScriptService'fcSy4_k0.StarterGui=Game:GetService'StarterGui'end function SupportLibrary.GetListMembers(TrC17,MEwJPiqM)local jHIxW_={}for gny,KabKdEUu in pairs(TrC17)do table.insert(jHIxW_,KabKdEUu[MEwJPiqM])end -return jHIxW_ end function SupportLibrary.AddUserInputListener(oQ8AOvfn,m,cX88nonB,kkWQP4)local m=Enum.UserInputType[m] return Game:GetService('UserInputService')[ 'Input'..oQ8AOvfn]:connect(function(E4F,E)if E and not cX88nonB then return end if E4F.UserInputType~=m then return end if m==Enum.UserInputType.Keyboard and Game:GetService('UserInputService'):GetFocusedTextBox()then return end +return r4cyFP end function SupportLibrary.ImportServices()local fcSy4_k0=getfenv(2) fcSy4_k0.Workspace=cloneref(Game:GetService'Workspace')fcSy4_k0.Players=cloneref(Game:GetService'Players') fcSy4_k0.MarketplaceService=cloneref(Game:GetService'MarketplaceService')fcSy4_k0.ContentProvider=cloneref(Game:GetService'ContentProvider') fcSy4_k0.SoundService=cloneref(Game:GetService'SoundService')fcSy4_k0.UserInputService=cloneref(Game:GetService'UserInputService') fcSy4_k0.SelectionService=cloneref(Game:GetService'Selection')fcSy4_k0.CoreGui=cloneref(Game:GetService'CoreGui') fcSy4_k0.HttpService=cloneref(Game:GetService'HttpService') fcSy4_k0.ChangeHistoryService=cloneref(Game:GetService'ChangeHistoryService')fcSy4_k0.ReplicatedStorage=cloneref(Game:GetService'ReplicatedStorage') fcSy4_k0.GroupService=cloneref(Game:GetService'GroupService') fcSy4_k0.ServerScriptService=cloneref(Game:GetService'ServerScriptService')fcSy4_k0.StarterGui=cloneref(Game:GetService'StarterGui')end function SupportLibrary.GetListMembers(TrC17,MEwJPiqM)local jHIxW_={}for gny,KabKdEUu in pairs(TrC17)do table.insert(jHIxW_,KabKdEUu[MEwJPiqM])end +return jHIxW_ end function SupportLibrary.AddUserInputListener(oQ8AOvfn,m,cX88nonB,kkWQP4)local m=Enum.UserInputType[m] return cloneref(Game:GetService('UserInputService'))[ 'Input'..oQ8AOvfn]:connect(function(E4F,E)if E and not cX88nonB then return end if E4F.UserInputType~=m then return end if m==Enum.UserInputType.Keyboard and cloneref(Game:GetService('UserInputService')):GetFocusedTextBox()then return end kkWQP4(E4F)end)end function SupportLibrary.AddGuiInputListener(IGef7Hc5,RY1,bkV,VOG,r8MEhbdT)local bkV=Enum.UserInputType[bkV] return IGef7Hc5['Input'..RY1]:connect(function(klSf0ZT5,t85a4rt)if t85a4rt and not VOG then return end if klSf0ZT5.UserInputType~=bkV then return end r8MEhbdT(klSf0ZT5)end)end function SupportLibrary.AreKeysPressed(...)local OfQcD=0 local Yj=SupportLibrary.GetListMembers(Game:GetService('UserInputService'):GetKeysPressed(),'KeyCode')for LvKdRh,_D in pairs({...})do if SupportLibrary.IsInTable(Yj,_D)then OfQcD=OfQcD+1 end end return OfQcD==#{...}end function SupportLibrary.MergeTable(uYwYKAU,mq) for m7YIn,tYqOsEJ in pairs(mq)do table.insert(uYwYKAU,tYqOsEJ)end @@ -6498,4 +6498,4 @@ if w:IsA('Smoke')then w.Opacity=v1pCX6.terminal_opacity[w] w.RiseVelocity=v1pCX6 History:add(d.State.HistoryRecord) d.State.HistoryRecord=nil end Tools.Decorate.hideGUI=function(lilD_Ll) if lilD_Ll.GUI then lilD_Ll.GUI.Visible=false end end Tools.Decorate.Loaded=true end}}if not _G.BTCoreEnv then _G.BTCoreEnv={}end _G.BTCoreEnv["tool"]=getfenv(0)CoreReady=true for Q2jN,Y1v09ha in pairs(q)do Y1v09ha[2]()end for XWU,t in pairs(q)do if not Tools[t[1]]then repeat wait()print("is tool not hooking?")until Tools[t[1]]end repeat wait()until Tools[t[1]].Loaded end if ToolType=='plugin'then local i=false ToolbarButton.Click:connect(function()if i then i=false unequipBT()else i=true -plugin:Activate(true) equipBT(plugin:GetMouse())end end)plugin.Deactivation:connect(unequipBT)elseif ToolType== 'tool'then Tool.Equipped:connect(equipBT) Tool.Unequipped:connect(unequipBT)end +plugin:Activate(true) equipBT(cloneref(plugin:GetMouse()))end end)plugin.Deactivation:connect(unequipBT)elseif ToolType== 'tool'then Tool.Equipped:connect(equipBT) Tool.Unequipped:connect(unequipBT)end diff --git a/iyfd.lua b/iyfd.lua index 2f5c74b..de6d02a 100644 --- a/iyfd.lua +++ b/iyfd.lua @@ -13,8 +13,9 @@ local shadow = Instance.new("Frame") local PopupText = Instance.new("TextLabel") local Exit = Instance.new("TextButton") local ExitImage = Instance.new("ImageLabel") +local cloneref = cloneref or function(a) return a end -GUI.Parent = game:GetService("CoreGui") +GUI.Parent = cloneref(game:GetService("CoreGui")) AnnGUI.Name = "AnnGUI" AnnGUI.Parent = GUI @@ -106,7 +107,7 @@ function run() --------------------------------------------------------------- local Version = '9.5.3' -HttpService = game:GetService("HttpService") +HttpService = cloneref(game:GetService("HttpService")) SAVEFILE = { colorR = 0.121569; colorG = 0.121569; @@ -202,8 +203,8 @@ else loaded = true end repeat wait() until loaded == true -local gCoreGui = game:GetService('CoreGui') local gPlayers = game:GetService('Players') local gLighting = game:GetService('Lighting') local Player = gPlayers.LocalPlayer -local Mouse = Player:GetMouse() local char = Player.Character local LP = gPlayers.LocalPlayer local gPlayers = game:GetService("Players") local _players = game:GetService('Players') MSGhook = false local services={} local cmds={} +local gCoreGui = cloneref(game:GetService('CoreGui')) local gPlayers = cloneref(game:GetService('Players')) local gLighting = cloneref(game:GetService('Lighting')) local Player = gPlayers.LocalPlayer +local Mouse = cloneref(Player:GetMouse()) local char = Player.Character local LP = gPlayers.LocalPlayer local gPlayers = cloneref(game:GetService("Players")) local _players = cloneref(game:GetService('Players')) MSGhook = false local services={} local cmds={} local std={} local loopkillT = {} local rainbowT = {} local disabletoolsT = {} local banT = {} local adminT = {} function FIND_CHILD(PATH, NAME) if PATH:FindFirstChild(NAME) then return true end return false end services.events = {} local user = gPlayers.LocalPlayer local bringT = {} agelock = nil isagelocked = false local scriptprefix='\\' local split=" " slock = false @@ -1980,7 +1981,7 @@ else if child.Name == gPlayers[v].Name then child:Destroy() end end wait(0.5) -local m = game["Players"].LocalPlayer:GetMouse() +local m = cloneref(game["Players"].LocalPlayer:GetMouse()) local rs = game:GetService("RunService").RenderStepped local espplr = gPlayers[v] if espplr.Character and espplr.Name ~= _players.LocalPlayer.Name then @@ -4603,7 +4604,7 @@ list_base_props={ user=players.localPlayer; -mouse=user:getMouse(); +mouse=cloneref(user:getMouse()); char=user.Character; gui=user.PlayerGui; bag=user.Backpack; @@ -9939,7 +9940,7 @@ local MusicPlayer do local soundPrev = soundFrame:WaitForChild("PrevSong") local soundButtons = {soundPlayStop,soundPause,soundNext,soundPrev} local mouseDrag = false - local mouse = gPlayers.LocalPlayer:GetMouse() + local mouse = cloneref(gPlayers.LocalPlayer:GetMouse()) local lineBar = soundFrame:WaitForChild("Pos") adminSound = Instance.new("Sound",nil) local function timeConvert(num) @@ -12463,7 +12464,7 @@ end) function dragmodel(model, window, frame, name) local Dragger = Instance.new("Dragger") local dragging = false local drag = model drag.Parent = workspace local parts = {} drag:MakeJoints() drag.Name = name -local mouse = game:GetService("Players").LocalPlayer:GetMouse() +local mouse = cloneref(cloneref(game:GetService("Players")).LocalPlayer:GetMouse()) function collectParts(object, baseParts) if object:IsA("BasePart") then baseParts[#baseParts+1] = object end @@ -13333,8 +13334,8 @@ local ColorPicker do local greenInput = pickerFrame.Green.Input local blueInput = pickerFrame.Blue.Input - local user = game:GetService("UserInputService") - local mouse = game:GetService("Players").LocalPlayer:GetMouse() + local user = cloneref(game:GetService("UserInputService")) + local mouse = cloneref(cloneref(game:GetService("Players")).LocalPlayer:GetMouse()) local hue,sat,val = 0,0,1 local red,green,blue = 1,1,1 diff --git a/vr.lua b/vr.lua index 18a3551..9262218 100644 --- a/vr.lua +++ b/vr.lua @@ -3,8 +3,9 @@ --[[---------Settings---------]]-- local game = game -local Players = game:GetService("Players") -local RunService = game:GetService("RunService") +local cloneref = cloneref or function(a) return a end +local Players = cloneref(game:GetService("Players")) +local RunService = cloneref(game:GetService("RunService")) local sethidden = sethiddenproperty or set_hidden_property or set_hidden_prop coroutine.wrap(function() while wait() do @@ -58,7 +59,7 @@ reanimFolder.Name = "FakeCharacter" local model = Instance.new("Model", reanimFolder) model.Name = "Reanimation" -local userInputService = game:GetService("UserInputService") +local userInputService = cloneref(game:GetService("UserInputService")) local movingW, movingA, movingS, movingD, jumping = false --Body Parts-- @@ -277,14 +278,14 @@ Script = function() local WeldBase = Character:WaitForChild("HumanoidRootPart") local ArmBase = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm") or WeldBase local Backpack = Client:WaitForChild("Backpack") - local Mouse = Client:GetMouse() + local Mouse = cloneref(Client:GetMouse()) local Camera = workspace.CurrentCamera - local VRService = game:GetService("VRService") + local VRService = cloneref(game:GetService("VRService")) local VRReady = VRService.VREnabled - local UserInputService = game:GetService("UserInputService") - local RunService = game:GetService("RunService") - local HttpService = game:GetService("HttpService") - local StarterGui = game:GetService("StarterGui") + local UserInputService = cloneref(game:GetService("UserInputService")) + local RunService = cloneref(game:GetService("RunService")) + local HttpService = cloneref(game:GetService("HttpService")) + local StarterGui = cloneref(game:GetService("StarterGui")) local HeadAccessories = {} local UsedAccessories = {} local Pointer = false @@ -356,7 +357,7 @@ Script = function() --]] function Tween(Object, Style, Direction, Time, Goal) local tweenInfo = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction]) - local tween = game:GetService("TweenService"):Create(Object, tweenInfo, Goal) + local tween = cloneref(game:GetService("TweenService")):Create(Object, tweenInfo, Goal) tween.Completed:Connect( function() tween:Destroy() @@ -1129,12 +1130,12 @@ Script = function() --[[ Functions --]] - local Players = game:GetService("Players") + local Players = cloneref(game:GetService("Players")) local Client = Players.LocalPlayer - local VRService = game:GetService("VRService") + local VRService = cloneref(game:GetService("VRService")) local VRReady = VRService.VREnabled - local UserInputService = game:GetService("UserInputService") - local RunService = game:GetService("RunService") + local UserInputService = cloneref(game:GetService("UserInputService")) + local RunService = cloneref(game:GetService("RunService")) local Camera = workspace.CurrentCamera --[[ Code @@ -1238,11 +1239,11 @@ ChatHUDFunc = function() --[[ Variables --]] - local UserInputService = game:GetService("UserInputService") - local RunService = game:GetService("RunService") - local VRService = game:GetService("VRService") + local UserInputService = cloneref(game:GetService("UserInputService")) + local RunService = cloneref(game:GetService("RunService")) + local VRService = cloneref(game:GetService("VRService")) local VRReady = VRService.VREnabled - local Players = game:GetService("Players") + local Players = cloneref(game:GetService("Players")) local Client = Players.LocalPlayer local ChatHUD = game:GetObjects("rbxassetid://4476067885")[1] local GlobalFrame = ChatHUD.GlobalFrame @@ -1252,7 +1253,7 @@ ChatHUDFunc = function() local Local = ChatHUD.Local local Camera = workspace.CurrentCamera Template.Parent = nil - ChatHUD.Parent = game:GetService("CoreGui") + ChatHUD.Parent = cloneref(game:GetService("CoreGui")) --[[ Code --]] @@ -1342,7 +1343,7 @@ ChatHUDFunc = function() local ChatPart = ChatHUD.Part ChatHUD.Adornee = ChatPart if VRReady then - ChatHUD.Parent = game:GetService("CoreGui") + ChatHUD.Parent = cloneref(game:GetService("CoreGui")) ChatHUD.Enabled = true ChatHUD.AlwaysOnTop = true local OnInput = @@ -1381,20 +1382,20 @@ ViewHUDFunc = function() Variables --]] local ViewportRange = ViewportRange or 32 - local UserInputService = game:GetService("UserInputService") - local RunService = game:GetService("RunService") - local VRService = game:GetService("VRService") + local UserInputService = cloneref(game:GetService("UserInputService")) + local RunService = cloneref(game:GetService("RunService")) + local VRService = cloneref(game:GetService("VRService")) local VRReady = VRService.VREnabled - local Players = game:GetService("Players") + local Players = cloneref(game:GetService("Players")) local Client = Players.LocalPlayer - local Mouse = Client:GetMouse() + local Mouse = cloneref(Client:GetMouse()) local Camera = workspace.CurrentCamera local CameraPort = Camera.CFrame local ViewHUD = script:FindFirstChild("ViewHUD") or game:GetObjects("rbxassetid://4480405425")[1] local Viewport = ViewHUD.Viewport local Viewcam = Instance.new("Camera") local ViewPart = ViewHUD.Part - ViewHUD.Parent = game:GetService("CoreGui") + ViewHUD.Parent = cloneref(game:GetService("CoreGui")) Viewcam.Parent = Viewport Viewcam.CameraType = Enum.CameraType.Scriptable Viewport.CurrentCamera = Viewcam @@ -1538,7 +1539,7 @@ ViewHUDFunc = function() end end - game:GetService("RunService").Heartbeat:Connect(function() + cloneref(game:GetService("RunService")).Heartbeat:Connect(function() for i,v in pairs(character1:GetChildren()) do if v:IsA("BasePart") then v.Velocity = Vector3.new(bodyVelocity[1], bodyVelocity[2], bodyVelocity[3]) @@ -1616,7 +1617,7 @@ ViewHUDFunc = function() end end) - game:GetService("RunService").Stepped:Connect(function() + cloneref(game:GetService("RunService")).Stepped:Connect(function() for i,v in pairs(reanimation:GetChildren()) do if v:IsA("BasePart") then v.CanCollide = false @@ -1631,7 +1632,7 @@ ViewHUDFunc = function() end Script() wait(2) -local Players = game:GetService("Players") +local Players = cloneref(game:GetService("Players")) local lp = Players.LocalPlayer local character = reanimation--lp.Character local A0LL = Instance.new("Attachment") diff --git a/wallwalker.lua b/wallwalker.lua index 70f690a..d594589 100644 --- a/wallwalker.lua +++ b/wallwalker.lua @@ -1,8 +1,10 @@ script = Instance.new("LocalScript") +local cloneref = cloneref or function(a) return a end +local Players = cloneref(game:GetService("Players")) repeat wait() a = pcall(function() - game:WaitForChild("Players").LocalPlayer:WaitForChild("PlayerScripts").ChildAdded:Connect(function(c) + Players.LocalPlayer:WaitForChild("PlayerScripts").ChildAdded:Connect(function(c) if c.Name == "PlayerScriptsLoader"then c.Disabled = true end @@ -11,15 +13,15 @@ repeat wait() if a == true then break end until true == false -game:WaitForChild("Players").LocalPlayer:WaitForChild("PlayerScripts").ChildAdded:Connect(function(c) +Players.LocalPlayer:WaitForChild("PlayerScripts").ChildAdded:Connect(function(c) if c.Name == "PlayerScriptsLoader"then c.Disabled = true end end) function _CameraUI() - local Players = game:GetService("Players") - local TweenService = game:GetService("TweenService") + local Players = cloneref(game:GetService("Players")) + local TweenService = cloneref(game:GetService("TweenService")) local LocalPlayer = Players.LocalPlayer if not LocalPlayer then @@ -218,9 +220,8 @@ function _CameraUI() end function _CameraToggleStateController() - local Players = game:GetService("Players") - local UserInputService = game:GetService("UserInputService") - local GameSettings = UserSettings():GetService("UserGameSettings") + local UserInputService = cloneref(game:GetService("UserInputService")) + local GameSettings = cloneref(UserSettings():GetService("UserGameSettings")) -- is this even required? local LocalPlayer = Players.LocalPlayer if not LocalPlayer then @@ -228,7 +229,7 @@ function _CameraToggleStateController() LocalPlayer = Players.LocalPlayer end - local Mouse = LocalPlayer:GetMouse() + local Mouse = cloneref(LocalPlayer:GetMouse()) local Input = _CameraInput() local CameraUI = _CameraUI() @@ -490,15 +491,14 @@ function _BaseCamera() local CameraUI = _CameraUI() --[[ Roblox Services ]]-- - local Players = game:GetService("Players") - local UserInputService = game:GetService("UserInputService") - local StarterGui = game:GetService("StarterGui") - local GuiService = game:GetService("GuiService") - local ContextActionService = game:GetService("ContextActionService") - local VRService = game:GetService("VRService") - local UserGameSettings = UserSettings():GetService("UserGameSettings") + local UserInputService = cloneref(game:GetService("UserInputService")) + local StarterGui = cloneref(game:GetService("StarterGui")) + local GuiService = cloneref(game:GetService("GuiService")) + local ContextActionService = cloneref(game:GetService("ContextActionService")) + local VRService = cloneref(game:GetService("VRService")) + local UserGameSettings = cloneref(UserSettings():GetService("UserGameSettings")) - local player = Players.LocalPlayer + local player = Players.LocalPlayer --[[ The Module ]]-- local BaseCamera = {} @@ -2485,7 +2485,7 @@ function _MouseLockController() local ContextActionService = game:GetService("ContextActionService") local Settings = UserSettings() -- ignore warning local GameSettings = Settings.GameSettings - local Mouse = PlayersService.LocalPlayer:GetMouse() + local Mouse = cloneref(PlayersService.LocalPlayer:GetMouse()) --[[ The Module ]]-- local MouseLockController = {} @@ -9289,7 +9289,7 @@ function _InitObjects() return initObjects end local plr = game.Players.LocalPlayer -local ms = plr:GetMouse() +local ms = cloneref(plr:GetMouse()) local char plr.CharacterAdded:Connect(function(c) char = c