Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- 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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- corl = owner
- mouse = corl:GetMouse()
- char = corl.Character
- mas = char
- mas2 = char.Head
- Figure = char
- local head = char:WaitForChild("Head")
- local Torso = char:WaitForChild("Torso")
- local LArm = char:WaitForChild("Left Arm")
- local RArm = char:WaitForChild("Right Arm")
- local LLeg = char:WaitForChild("Left Leg")
- local RLeg = char:WaitForChild("Right Leg")
- local humanoid = char:WaitForChild("Humanoid")
- local rootpart = char:WaitForChild("HumanoidRootPart")
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName ~= "Humanoid" and v.ClassName ~= "Tool" and v.ClassName ~= "Part" and v.ClassName ~= "LocalScript" and v.ClassName ~= "Script" then
- v.Parent = nil
- end
- end
- for i,v in pairs(char.Head:GetChildren()) do
- v.Parent = nil
- end
- mas = char
- BodyColors0 = Instance.new("BodyColors")
- Pants1 = Instance.new("Pants")
- Shirt2 = Instance.new("Shirt")
- Accessory3 = Instance.new("Accessory")
- Part4 = Instance.new("Part")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Vector3Value6 = Instance.new("Vector3Value")
- Accessory7 = Instance.new("Accessory")
- Part8 = Instance.new("Part")
- SpecialMesh9 = Instance.new("SpecialMesh")
- Vector3Value10 = Instance.new("Vector3Value")
- Accessory11 = Instance.new("Accessory")
- Part12 = Instance.new("Part")
- SpecialMesh13 = Instance.new("SpecialMesh")
- Vector3Value14 = Instance.new("Vector3Value")
- Accessory15 = Instance.new("Accessory")
- Part16 = Instance.new("Part")
- SpecialMesh17 = Instance.new("SpecialMesh")
- Vector3Value18 = Instance.new("Vector3Value")
- Camera19 = Instance.new("Camera")
- Accessory20 = Instance.new("Accessory")
- Part21 = Instance.new("Part")
- SpecialMesh22 = Instance.new("SpecialMesh")
- Vector3Value23 = Instance.new("Vector3Value")
- CharacterMesh24 = Instance.new("CharacterMesh")
- CharacterMesh25 = Instance.new("CharacterMesh")
- CharacterMesh26 = Instance.new("CharacterMesh")
- CharacterMesh27 = Instance.new("CharacterMesh")
- CharacterMesh28 = Instance.new("CharacterMesh")
- BodyColors0.Parent = mas
- BodyColors0.HeadColor = BrickColor.new("Light orange")
- BodyColors0.HeadColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- BodyColors0.LeftArmColor = BrickColor.new("Light orange")
- BodyColors0.LeftArmColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- BodyColors0.LeftLegColor = BrickColor.new("Light orange")
- BodyColors0.LeftLegColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- BodyColors0.RightArmColor = BrickColor.new("Light orange")
- BodyColors0.RightArmColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- BodyColors0.RightLegColor = BrickColor.new("Light orange")
- BodyColors0.RightLegColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- BodyColors0.TorsoColor = BrickColor.new("Light orange")
- BodyColors0.TorsoColor3 = Color3.new(0.917647, 0.721569, 0.572549)
- Pants1.Name = "Pants"
- Pants1.Parent = mas
- Pants1.PantsTemplate = "http://www.roblox.com/asset/?id=454842607"
- Shirt2.Name = "Shirt"
- Shirt2.Parent = mas
- Shirt2.ShirtTemplate = "http://www.roblox.com/asset/?id=546456982"
- Accessory3.Name = "BlackCircles"
- Accessory3.Parent = mas
- Accessory3.AttachmentPoint = CFrame.new(0, -0.25, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory3.AttachmentPos = Vector3.new(0, -0.25, 0)
- Part4.Name = "Handle"
- Part4.Parent = Accessory3
- Part4.CFrame = CFrame.new(30.8596439, 35.5824966, -70.7954941, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
- Part4.Position = Vector3.new(30.8596439, 35.5824966, -70.7954941)
- Part4.Size = Vector3.new(1, 1.60000002, 1)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part4.Locked = true
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.FormFactor = Enum.FormFactor.Plate
- Part4.formFactor = Enum.FormFactor.Plate
- SpecialMesh5.Parent = Part4
- SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=1095510"
- SpecialMesh5.TextureId = "http://www.roblox.com/asset/?id=1095511"
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- Vector3Value6.Name = "OriginalSize"
- Vector3Value6.Parent = Part4
- Vector3Value6.Value = Vector3.new(1, 1.60000002, 1)
- Accessory7.Name = "Dust Mask"
- Accessory7.Parent = mas
- Accessory7.AttachmentPoint = CFrame.new(0, 0.5, 0.100000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory7.AttachmentPos = Vector3.new(0, 0.5, 0.100000001)
- Part8.Name = "Handle"
- Part8.Parent = Accessory7
- Part8.CFrame = CFrame.new(30.8596439, 34.8324966, -70.8955002, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
- Part8.Position = Vector3.new(30.8596439, 34.8324966, -70.8955002)
- Part8.Size = Vector3.new(1, 0.800000012, 1)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.CanCollide = false
- Part8.Locked = true
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.FormFactor = Enum.FormFactor.Plate
- Part8.formFactor = Enum.FormFactor.Plate
- SpecialMesh9.Parent = Part8
- SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=20928923"
- SpecialMesh9.Scale = Vector3.new(1, 1, 1.04999995)
- SpecialMesh9.TextureId = "http://www.roblox.com/asset/?id=20928919"
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh
- Vector3Value10.Name = "OriginalSize"
- Vector3Value10.Parent = Part8
- Vector3Value10.Value = Vector3.new(1, 0.800000012, 1)
- Accessory11.Name = "HolidayReefCrown"
- Accessory11.Parent = mas
- Part12.Name = "Handle"
- Part12.Parent = Accessory11
- Part12.CFrame = CFrame.new(30.8596439, 35.3324966, -70.7954941, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
- Part12.Position = Vector3.new(30.8596439, 35.3324966, -70.7954941)
- Part12.Size = Vector3.new(1.89999771, 0.599999845, 2.00000024)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.CanCollide = false
- Part12.Locked = true
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.FormFactor = Enum.FormFactor.Custom
- Part12.formFactor = Enum.FormFactor.Custom
- SpecialMesh13.Parent = Part12
- SpecialMesh13.MeshId = "http://www.roblox.com/asset/?id=138937497"
- SpecialMesh13.Scale = Vector3.new(0.75, 0.75, 0.75)
- SpecialMesh13.TextureId = "http://www.roblox.com/asset/?id=138937524 "
- SpecialMesh13.MeshType = Enum.MeshType.FileMesh
- Vector3Value14.Name = "OriginalSize"
- Vector3Value14.Parent = Part12
- Vector3Value14.Value = Vector3.new(1.89999771, 0.599999845, 2.00000024)
- Accessory15.Name = "ImASpyCap"
- Accessory15.Parent = mas
- Accessory15.AttachmentPoint = CFrame.new(0, -0.0500000007, 0.25, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory15.AttachmentPos = Vector3.new(0, -0.0500000007, 0.25)
- Part16.Name = "Handle"
- Part16.Parent = Accessory15
- Part16.CFrame = CFrame.new(30.8596439, 35.3824959, -71.0454941, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
- Part16.Position = Vector3.new(30.8596439, 35.3824959, -71.0454941)
- Part16.Size = Vector3.new(1, 1.51999998, 1)
- Part16.BottomSurface = Enum.SurfaceType.Smooth
- Part16.CanCollide = false
- Part16.Locked = true
- Part16.TopSurface = Enum.SurfaceType.Smooth
- Part16.FormFactor = Enum.FormFactor.Symmetric
- Part16.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh17.Parent = Part16
- SpecialMesh17.MeshId = "http://www.roblox.com/asset/?id=276974287"
- SpecialMesh17.Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995)
- SpecialMesh17.TextureId = "http://www.roblox.com/asset/?id=276974480"
- SpecialMesh17.MeshType = Enum.MeshType.FileMesh
- Vector3Value18.Name = "OriginalSize"
- Vector3Value18.Parent = Part16
- Vector3Value18.Value = Vector3.new(1, 1.51999998, 1)
- Camera19.Name = "ThumbnailCamera"
- Camera19.Parent = Accessory15
- Camera19.CFrame = CFrame.new(-3.8269012, 4.72886562, -4.90989113, 0.673442185, 0.129288942, -0.727846146, -0, 0.984587193, 0.174894422, 0.739239931, -0.117781281, 0.663062513)
- Camera19.CoordinateFrame = CFrame.new(-3.8269012, 4.72886562, -4.90989113, 0.673442185, 0.129288942, -0.727846146, -0, 0.984587193, 0.174894422, 0.739239931, -0.117781281, 0.663062513)
- Camera19.Focus = CFrame.new(-2.37120771, 4.37907648, -6.23601723, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera19.focus = CFrame.new(-2.37120771, 4.37907648, -6.23601723, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory20.Name = "LongHairHeadBand Black"
- Accessory20.Parent = mas
- Accessory20.AttachmentForward = Vector3.new(-0, -0.0995037183, -0.995037198)
- Accessory20.AttachmentPoint = CFrame.new(0, 0.899999976, 0, 1, 0, 0, 0, 0.995037198, 0.0995037183, 0, -0.0995037183, 0.995037198)
- Accessory20.AttachmentPos = Vector3.new(0, 0.899999976, 0)
- Accessory20.AttachmentUp = Vector3.new(0, 0.995037198, -0.0995037183)
- Part21.Name = "Handle"
- Part21.Parent = Accessory20
- Part21.CFrame = CFrame.new(30.8596439, 34.4369621, -70.8850479, 1, -7.83231258e-09, 7.83188625e-10, 7.87137289e-09, 0.995037198, -0.0995037183, 4.24105195e-14, 0.0995037183, 0.995037198)
- Part21.Orientation = Vector3.new(5.71000004, 0, 0)
- Part21.Position = Vector3.new(30.8596439, 34.4369621, -70.8850479)
- Part21.Rotation = Vector3.new(5.71000004, 0, 0)
- Part21.Size = Vector3.new(1, 2.4000001, 2)
- Part21.BottomSurface = Enum.SurfaceType.Smooth
- Part21.CanCollide = false
- Part21.Locked = true
- Part21.TopSurface = Enum.SurfaceType.Smooth
- Part21.FormFactor = Enum.FormFactor.Plate
- Part21.formFactor = Enum.FormFactor.Plate
- SpecialMesh22.Parent = Part21
- SpecialMesh22.MeshId = "http://www.roblox.com/asset/?id=13070796"
- SpecialMesh22.TextureId = "http://www.roblox.com/asset/?id=14765363"
- SpecialMesh22.MeshType = Enum.MeshType.FileMesh
- Vector3Value23.Name = "OriginalSize"
- Vector3Value23.Parent = Part21
- Vector3Value23.Value = Vector3.new(1, 2.4000001, 2)
- CharacterMesh24.Parent = mas
- CharacterMesh24.BodyPart = Enum.BodyPart.RightLeg
- CharacterMesh24.MeshId = 27111882
- CharacterMesh25.Parent = mas
- CharacterMesh25.BodyPart = Enum.BodyPart.Torso
- CharacterMesh25.MeshId = 27111894
- CharacterMesh26.Parent = mas
- CharacterMesh26.BodyPart = Enum.BodyPart.LeftLeg
- CharacterMesh26.MeshId = 27111857
- CharacterMesh27.Parent = mas
- CharacterMesh27.BodyPart = Enum.BodyPart.LeftArm
- CharacterMesh27.MeshId = 27111419
- CharacterMesh28.Name = "Roblox 2.0 Right Arm"
- CharacterMesh28.Parent = mas
- CharacterMesh28.BodyPart = Enum.BodyPart.RightArm
- CharacterMesh28.MeshId = 27111864
- SpecialMesh0 = Instance.new("SpecialMesh")
- Decal1 = Instance.new("Decal")
- SpecialMesh0.Parent = head
- SpecialMesh0.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal1.Name = "face"
- Decal1.Parent = head
- Decal1.Texture = "http://www.roblox.com/asset/?id=26424652"
Add Comment
Please, Sign In to add comment