SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has convert to FE by who i don't know? | |
| 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,game,owner = owner,game | |
| 6 | local RealPlayer = Player | |
| 7 | do | |
| 8 | print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
| |
| 9 | local rp = RealPlayer | |
| 10 | script.Parent = rp.Character | |
| 11 | ||
| 12 | --RemoteEvent for communicating | |
| 13 | local Event = Instance.new("RemoteEvent")
| |
| 14 | Event.Name = "UserInput_Event" | |
| 15 | ||
| 16 | --Fake event to make stuff like Mouse.KeyDown work | |
| 17 | local function fakeEvent() | |
| 18 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
| |
| 19 | t.connect = t.Connect | |
| 20 | return t | |
| 21 | end | |
| 22 | ||
| 23 | --Creating fake input objects with fake variables | |
| 24 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 25 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 26 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 27 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 28 | end} | |
| 29 | --Merged 2 functions into one by checking amount of arguments | |
| 30 | CAS.UnbindAction = CAS.BindAction | |
| 31 | ||
| 32 | --This function will trigger the events that have been :Connect()'ed | |
| 33 | local function te(self,ev,...) | |
| 34 | local t = m[ev] | |
| 35 | if t and t._fakeEvent then | |
| 36 | for _,f in pairs(t.Functions) do | |
| 37 | f(...) | |
| 38 | end | |
| 39 | end | |
| 40 | end | |
| 41 | m.TrigEvent = te | |
| 42 | UIS.TrigEvent = te | |
| 43 | ||
| 44 | Event.OnServerEvent:Connect(function(plr,io) | |
| 45 | if plr~=rp then return end | |
| 46 | m.Target = io.Target | |
| 47 | m.Hit = io.Hit | |
| 48 | if not io.isMouse then | |
| 49 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 50 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 51 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 52 | end | |
| 53 | for _,t in pairs(CAS.Actions) do | |
| 54 | for _,k in pairs(t.Keys) do | |
| 55 | if k==io.KeyCode then | |
| 56 | t.Function(t.Name,io.UserInputState,io) | |
| 57 | end | |
| 58 | end | |
| 59 | end | |
| 60 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 61 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 62 | end | |
| 63 | end) | |
| 64 | Event.Parent = NLS([==[ | |
| 65 | local Player = game:GetService("Players").LocalPlayer
| |
| 66 | local Event = script:WaitForChild("UserInput_Event")
| |
| 67 | ||
| 68 | local Mouse = Player:GetMouse() | |
| 69 | local UIS = game:GetService("UserInputService")
| |
| 70 | local input = function(io,a) | |
| 71 | if a then return end | |
| 72 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 73 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 74 | end | |
| 75 | UIS.InputBegan:Connect(input) | |
| 76 | UIS.InputEnded:Connect(input) | |
| 77 | ||
| 78 | local h,t | |
| 79 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 80 | --If player is not moving their mouse, client won't fire events | |
| 81 | while wait(1/30) do | |
| 82 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 83 | h,t=Mouse.Hit,Mouse.Target | |
| 84 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 85 | end | |
| 86 | end]==],Player.Character) | |
| 87 | ||
| 88 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 89 | --Real game object | |
| 90 | local _rg = game | |
| 91 | ||
| 92 | --Metatable for fake service | |
| 93 | local fsmt = {
| |
| 94 | __index = function(self,k) | |
| 95 | local s = rawget(self,"_RealService") | |
| 96 | if s then return s[k] end | |
| 97 | end, | |
| 98 | __newindex = function(self,k,v) | |
| 99 | local s = rawget(self,"_RealService") | |
| 100 | if s then s[k]=v end | |
| 101 | end, | |
| 102 | __call = function(self,...) | |
| 103 | local s = rawget(self,"_RealService") | |
| 104 | if s then return s(...) end | |
| 105 | end | |
| 106 | } | |
| 107 | local function FakeService(t,RealService) | |
| 108 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
| 109 | return setmetatable(t,fsmt) | |
| 110 | end | |
| 111 | ||
| 112 | --Fake game object | |
| 113 | local g = {
| |
| 114 | GetService = function(self,s) | |
| 115 | return self[s] | |
| 116 | end, | |
| 117 | Players = FakeService({
| |
| 118 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
| |
| 119 | },"Players"), | |
| 120 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 121 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 122 | } | |
| 123 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
| 124 | g.service = g.GetService | |
| 125 | ||
| 126 | g.RunService = FakeService({
| |
| 127 | RenderStepped = _rg:GetService("RunService").Heartbeat,
| |
| 128 | BindToRenderStep = function(self,name,_,fun) | |
| 129 | ||
| 130 | end, | |
| 131 | UnbindFromRenderStep = function(self,name) | |
| 132 | self._btrs[name]:Disconnect() | |
| 133 | end, | |
| 134 | },"RunService") | |
| 135 | ||
| 136 | setmetatable(g,{
| |
| 137 | __index=function(self,s) | |
| 138 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
| 139 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
| 140 | end, | |
| 141 | __newindex = fsmt.__newindex, | |
| 142 | __call = fsmt.__call | |
| 143 | }) | |
| 144 | --Changing owner to fake player object to support owner:GetMouse() | |
| 145 | game,owner = g,g.Players.LocalPlayer | |
| 146 | end | |
| 147 | -- made by TheFlamingBlaster | |
| 148 | print("Script stealer by TheFlamingBlaster successfully started up.")
| |
| 149 | print("December 30th, 2016.")
| |
| 150 | print("Click on a player to freeze them, hit c to run their currently running scripts under yourself.")
| |
| 151 | print("This only works with localscripts")
| |
| 152 | print("This won't allow you to get the code of the scripts.")
| |
| 153 | ||
| 154 | local plr = game.Players.LocalPlayer | |
| 155 | function exe(cmd) | |
| 156 | game:GetService'Players'.LocalPlayer.PlayerGui.SB_DataTransfer.SB_CommandRemote.Value = cmd | |
| 157 | end | |
| 158 | local mouse = plr:GetMouse() | |
| 159 | local adornees | |
| 160 | local destroyit = false | |
| 161 | local lasttarget | |
| 162 | local currenttarget | |
| 163 | local changed = {}
| |
| 164 | mouse.Button1Down:connect(function() | |
| 165 | if mouse.Target then | |
| 166 | if mouse.Target.Parent.ClassName == "Model" then | |
| 167 | currenttarget = mouse.Target.Parent | |
| 168 | lasttarget = mouse.Target.Parent | |
| 169 | adornees = Instance.new("Model",plr.Character)
| |
| 170 | for i,v in pairs(mouse.Target.Parent:GetChildren()) do | |
| 171 | local s = Instance.new("SelectionBox",adornees)
| |
| 172 | if v:IsA("Part") then
| |
| 173 | if v.Name == "Torso" then | |
| 174 | local lasso = Instance.new("SelectionPartLasso",adornees)
| |
| 175 | lasso.Humanoid = plr.Character.Humanoid | |
| 176 | lasso.Part = v | |
| 177 | end | |
| 178 | s.Adornee = v | |
| 179 | if v.Anchored == false then | |
| 180 | table.insert(changed,v) | |
| 181 | v.Anchored = true | |
| 182 | end | |
| 183 | end | |
| 184 | ||
| 185 | end | |
| 186 | destroyit = true | |
| 187 | end | |
| 188 | end | |
| 189 | end) | |
| 190 | game:GetService('UserInputService').InputBegan:connect(function(input,processed)
| |
| 191 | if mouse.Target and destroyit == true then | |
| 192 | if input.KeyCode == Enum.KeyCode.C then | |
| 193 | --currenttarget:Destroy() | |
| 194 | for i,v in pairs(currenttarget:GetChildren()) do | |
| 195 | if v:IsA("LocalScript") then
| |
| 196 | local c = v | |
| 197 | c.Parent = plr.Character | |
| 198 | c.Name = "Stolen" | |
| 199 | exe('local a = '..v:GetFullName()..':Clone() a.Parent = getfenv().owner.Character print(a.Parent)')
| |
| 200 | print(c.Parent) | |
| 201 | end | |
| 202 | end | |
| 203 | adornees:Destroy() | |
| 204 | end | |
| 205 | end | |
| 206 | end) | |
| 207 | mouse.Button1Up:connect(function() | |
| 208 | if destroyit == true then | |
| 209 | currenttarget = nil | |
| 210 | for i,v in pairs(changed) do | |
| 211 | v.Anchored = false | |
| 212 | end | |
| 213 | changed = {}
| |
| 214 | adornees:Destroy() | |
| 215 | destroyit = false | |
| 216 | end | |
| 217 | end) |