SHOW:
|
|
- or go back to the newest paste.
| 1 | - | plr = game.Players.LocalPlayer |
| 1 | + | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
|
| 2 | - | mouse = plr:GetMouse() |
| 2 | + | print("FE Compatibility: by WaverlyCole & Mokiros")
|
| 3 | InternalData = {}
| |
| 4 | do | |
| 5 | script.Parent = owner.Character | |
| 6 | local Event = Instance.new("RemoteEvent")
| |
| 7 | Event.Name = "UserInput" | |
| 8 | local function NewFakeEvent() | |
| 9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
| |
| 10 | return Fake | |
| 11 | end | |
| 12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
| |
| 13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
| |
| 14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 17 | local function TriggerEvent(self,Event,...) | |
| 18 | local Trigger = Mouse[Event] | |
| 19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
| 20 | Trigger.Function(...) | |
| 21 | end | |
| 22 | end | |
| 23 | Mouse.TrigEvent = TriggerEvent | |
| 24 | UserInputService.TrigEvent = TriggerEvent | |
| 25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 26 | if FiredBy.Name ~= owner.Name then end | |
| 27 | if Input.MouseEvent then | |
| 28 | Mouse.Target = Input.Target | |
| 29 | Mouse.Hit = Input.Hit | |
| 30 | else | |
| 31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
| 34 | end | |
| 35 | for _,Action in pairs(ContextActionService.Actions) do | |
| 36 | for _,Key in pairs(Action.Keys) do | |
| 37 | if Key==Input.KeyCode then | |
| 38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
| 39 | end | |
| 40 | end | |
| 41 | end | |
| 42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
| 43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 44 | end | |
| 45 | end) | |
| 46 | InternalData["Mouse"] = Mouse | |
| 47 | InternalData["ContextActionService"] = ContextActionService | |
| 48 | InternalData["UserInputService"] = UserInputService | |
| 49 | Event.Parent = NLS([[ | |
| 50 | local Player = owner | |
| 51 | local Event = script:WaitForChild("UserInput")
| |
| 52 | local UserInputService = game:GetService("UserInputService")
| |
| 53 | local Mouse = Player:GetMouse() | |
| 54 | local Input = function(Input,gameProcessedEvent) | |
| 55 | if gameProcessedEvent then return end | |
| 56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 57 | end | |
| 58 | UserInputService.InputBegan:Connect(Input) | |
| 59 | UserInputService.InputEnded:Connect(Input) | |
| 60 | local Hit,Target | |
| 61 | while wait(1/30) do | |
| 62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 63 | Hit,Target = Mouse.Hit,Mouse.Target | |
| 64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 65 | end | |
| 66 | end | |
| 67 | ]],owner.Character) | |
| 68 | end | |
| 69 | RealGame = game;game = setmetatable({},{
| |
| 70 | __index = function (self,Index) | |
| 71 | local Sandbox = function (Thing) | |
| 72 | if Thing:IsA("Player") then
| |
| 73 | local RealPlayer = Thing | |
| 74 | return setmetatable({},{
| |
| 75 | __index = function (self,Index) | |
| 76 | local Type = type(RealPlayer[Index]) | |
| 77 | if Type == "function" then | |
| 78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 79 | return function (self) | |
| 80 | return InternalData["Mouse"] | |
| 81 | end | |
| 82 | end | |
| 83 | return function (self,...) | |
| 84 | return RealPlayer[Index](RealPlayer,...) | |
| 85 | end | |
| 86 | else | |
| 87 | if Index == "PlrObj" then | |
| 88 | return RealPlayer | |
| 89 | end | |
| 90 | return RealPlayer[Index] | |
| 91 | end | |
| 92 | end; | |
| 93 | __tostring = function(self) | |
| 94 | return RealPlayer.Name | |
| 95 | end | |
| 96 | }) | |
| 97 | end | |
| 98 | end | |
| 99 | if RealGame[Index] then | |
| 100 | local Type = type(RealGame[Index]) | |
| 101 | if Type == "function" then | |
| 102 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 103 | return function (self,Service) | |
| 104 | if Service:lower() == "players" then | |
| 105 | return setmetatable({},{
| |
| 106 | __index = function (self2,Index2) | |
| 107 | local RealService = RealGame:GetService(Service) | |
| 108 | local Type2 = type(Index2) | |
| 109 | if Type2 == "function" then | |
| 110 | return function (self,...) | |
| 111 | return RealService[Index2](RealService,...) | |
| 112 | end | |
| 113 | else | |
| 114 | if Index2:lower() == "localplayer" then | |
| 115 | return Sandbox(owner) | |
| 116 | end | |
| 117 | return RealService[Index2] | |
| 118 | end | |
| 119 | end; | |
| 120 | __tostring = function(self) | |
| 121 | return RealGame:GetService(Service).Name | |
| 122 | end | |
| 123 | }) | |
| 124 | elseif Service:lower() == "contextactionservice" then | |
| 125 | return InternalData["ContextActionService"] | |
| 126 | elseif Service:lower() == "contextactionservice" then | |
| 127 | return InternalData["UserInputService"] | |
| 128 | elseif Service:lower() == "runservice" then | |
| 129 | return setmetatable({},{
| |
| 130 | __index = function(self2,Index2) | |
| 131 | local RealService = RealGame:GetService(Service) | |
| 132 | local Type2 = type(Index2) | |
| 133 | if Type2 == "function" then | |
| 134 | return function (self,...) | |
| 135 | return RealService[Index2](RealService,...) | |
| 136 | end | |
| 137 | else | |
| 138 | if Index2:lower() == "bindtorenderstep" then | |
| 139 | return function (self,Name,Priority,Function) | |
| 140 | return RealGame:GetService("RunService").Stepped:Connect(Function)
| |
| 141 | end | |
| 142 | end | |
| 143 | if Index2:lower() == "renderstepped" then | |
| 144 | return RealService["Stepped"] | |
| 145 | end | |
| 146 | return RealService[Index2] | |
| 147 | end | |
| 148 | end | |
| 149 | }) | |
| 150 | else | |
| 151 | return RealGame:GetService(Service) | |
| 152 | end | |
| 153 | end | |
| 154 | end | |
| 155 | return function (self,...) | |
| 156 | return RealGame[Index](RealGame,...) | |
| 157 | end | |
| 158 | else | |
| 159 | if game:GetService(Index) then | |
| 160 | return game:GetService(Index) | |
| 161 | end | |
| 162 | return RealGame[Index] | |
| 163 | end | |
| 164 | else | |
| 165 | return nil | |
| 166 | end | |
| 167 | end | |
| 168 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
| |
| 169 | print("Complete! Running...")
| |
| 170 | ||
| 171 | ||
| 172 | --//Paste script below this line. | |
| 173 | ||
| 174 | plr = owner | |
| 175 | part = nil | |
| 176 | bp = nil | |
| 177 | particles = nil | |
| 178 | function clerp(a,b,c,d) | |
| 179 | for i = 0,d,.01 do | |
| 180 | a.CFrame = CFrame.new(b:lerp(c,i)) | |
| 181 | wait() | |
| 182 | end | |
| 183 | end | |
| 184 | function slerp(a2,b2,c2,d2) | |
| 185 | for i2 = 0,d2,.01 do | |
| 186 | a2.CFrame = CFrame.new(b2:lerp(c2,i2)) | |
| 187 | wait() | |
| 188 | end | |
| 189 | end | |
| 190 | mouse.KeyDown:connect(function(key) | |
| 191 | if key == "e" and plr.Character.Parent == workspace then | |
| 192 | plr.Character.Parent = workspace.Camera | |
| 193 | plr.Character.Archivable = true | |
| 194 | Instance.new("ForceField",plr.Character).Visible = false
| |
| 195 | for y,t in pairs(plr.Character:GetChildren()) do | |
| 196 | if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
| |
| 197 | t.Transparency = 1 | |
| 198 | if t.Name == "Head" and t:FindFirstChild("face") then
| |
| 199 | t.face.Transparency = 1 | |
| 200 | end | |
| 201 | elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
| |
| 202 | t.Handle.Transparency = 1 | |
| 203 | end | |
| 204 | end | |
| 205 | elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then | |
| 206 | plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p) | |
| 207 | elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then | |
| 208 | if plr.Character.Torso.Anchored == true then | |
| 209 | for y,t in pairs(plr.Character:GetChildren()) do | |
| 210 | if t:IsA("Part") then
| |
| 211 | t.Anchored = false | |
| 212 | end | |
| 213 | end | |
| 214 | else | |
| 215 | for y,t in pairs(plr.Character:GetChildren()) do | |
| 216 | if t:IsA("Part") then
| |
| 217 | t.Anchored = true | |
| 218 | end | |
| 219 | end | |
| 220 | end | |
| 221 | elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then | |
| 222 | local clone = part:Clone() | |
| 223 | clone.Parent = workspace | |
| 224 | clone.Anchored = false | |
| 225 | clone:ClearAllChildren() | |
| 226 | clone.CanCollide = true | |
| 227 | bp.Parent = clone | |
| 228 | particles.Parent = clone | |
| 229 | if part.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 230 | part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
| |
| 231 | end | |
| 232 | part:Destroy() | |
| 233 | part = clone | |
| 234 | elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then | |
| 235 | plr.Character.Parent = workspace | |
| 236 | plr.Character.Archivable = false | |
| 237 | plr.Character:FindFirstChildOfClass("ForceField"):Remove()
| |
| 238 | for y,t in pairs(plr.Character:GetChildren()) do | |
| 239 | if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
| |
| 240 | t.Transparency = 0 | |
| 241 | if t.Name == "Head" and t:FindFirstChild("face") then
| |
| 242 | t.face.Transparency = 0 | |
| 243 | end | |
| 244 | elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
| |
| 245 | t.Handle.Transparency = 0 | |
| 246 | end | |
| 247 | end | |
| 248 | end | |
| 249 | end) | |
| 250 | mouse.Button1Down:connect(function() | |
| 251 | if plr.Character.Parent == workspace.Camera then | |
| 252 | if mouse ~= nil then | |
| 253 | if mouse.Target ~= nil then | |
| 254 | part = mouse.Target | |
| 255 | bp = Instance.new("BodyPosition",part)
| |
| 256 | bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 257 | bp.Position = part.Position | |
| 258 | particles = Instance.new("ParticleEmitter",part)
| |
| 259 | particles.Color = ColorSequence.new(Color3.new(0,0,0)) | |
| 260 | particles.Size = NumberSequence.new(1) | |
| 261 | particles.Texture = "rbxassetid://292289455" | |
| 262 | particles.VelocitySpread = 360 | |
| 263 | particles.Speed = NumberRange.new(0) | |
| 264 | particles.RotSpeed = NumberRange.new(0) | |
| 265 | particles.Rotation = NumberRange.new(0) | |
| 266 | particles.Rate = 250 | |
| 267 | particles.Lifetime = NumberRange.new(.2,.4) | |
| 268 | particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
| |
| 269 | dwn = true | |
| 270 | end | |
| 271 | end | |
| 272 | while dwn == true do | |
| 273 | wait() | |
| 274 | bp.Position = mouse.hit.p | |
| 275 | if part then | |
| 276 | if part.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 277 | part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
| |
| 278 | end | |
| 279 | end | |
| 280 | end | |
| 281 | end | |
| 282 | end) | |
| 283 | mouse.Button1Up:connect(function() | |
| 284 | dwn = false | |
| 285 | if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
| |
| 286 | if bp then bp:Destroy() end | |
| 287 | if particles then particles:Destroy() end | |
| 288 | end) | |
| 289 | base = Instance.new("ScreenGui",plr.PlayerGui)
| |
| 290 | bbg = Instance.new("BillboardGui",plr.Character.Head)
| |
| 291 | bbg.Size = UDim2.new(0,200,0,50) | |
| 292 | bbg.StudsOffset = Vector3.new(0,3,0) | |
| 293 | bbgTl = Instance.new("TextLabel",bbg)
| |
| 294 | bbgTl.BackgroundTransparency = 1 | |
| 295 | bbgTl.Size = UDim2.new(10,0,1,0) | |
| 296 | bbgTl.Position = UDim2.new(-4.5,0,0,0) | |
| 297 | bbgTl.Font = "Code" | |
| 298 | bbgTl.Text = " " | |
| 299 | bbgTl.TextSize = 25 | |
| 300 | bbgTl.TextStrokeColor3 = Color3.new(1,1,1) | |
| 301 | bbgTl.TextColor3 = Color3.new(0,0,0) | |
| 302 | bbgTl.TextStrokeTransparency = 0 | |
| 303 | bbgTl.TextWrapped = true | |
| 304 | plr.Chatted:connect(function(msg) | |
| 305 | bbgTl.Text = msg | |
| 306 | wait(5) | |
| 307 | if bbgTl.Text == msg then | |
| 308 | bbgTl.Text = " " | |
| 309 | end | |
| 310 | end) | |
| 311 | touchCounter = 0 | |
| 312 | while wait() do | |
| 313 | if plr.Character.Parent == workspace.Camera then | |
| 314 | local c = plr.Character:Clone() | |
| 315 | c:MakeJoints() | |
| 316 | for y,t in pairs(c:GetChildren()) do | |
| 317 | if t:IsA("Part") then
| |
| 318 | t.CanCollide = false | |
| 319 | t.Anchored = true | |
| 320 | t.Transparency = .5 | |
| 321 | t.TopSurface = "Smooth" | |
| 322 | t.BottomSurface = "Smooth" | |
| 323 | t.RightSurface = "Smooth" | |
| 324 | t.LeftSurface = "Smooth" | |
| 325 | t.FrontSurface = "Smooth" | |
| 326 | t.BackSurface = "Smooth" | |
| 327 | t.BrickColor = BrickColor.new("Really black")
| |
| 328 | if t.Name == "Head" and t:FindFirstChild("face") then
| |
| 329 | t.face:Remove() | |
| 330 | elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
| |
| 331 | t.roblox:Remove() | |
| 332 | elseif t.Name == "HumanoidRootPart" then | |
| 333 | t:Remove() | |
| 334 | end | |
| 335 | else | |
| 336 | t:Remove() | |
| 337 | end | |
| 338 | end | |
| 339 | c.Parent = workspace | |
| 340 | game.Debris:AddItem(c,.05) | |
| 341 | end | |
| 342 | end |