SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 2 | - | local Player = game.Players.localPlayer |
| 2 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
| 3 | - | local Character = Player.Character |
| 3 | + | do |
| 4 | - | local Torso = Character.Torso |
| 4 | + | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
|
| 5 | script.Parent = Player.Character | |
| 6 | ||
| 7 | --RemoteEvent for communicating | |
| 8 | local Event = Instance.new("RemoteEvent")
| |
| 9 | Event.Name = "UserInput_Event" | |
| 10 | ||
| 11 | --Fake event to make stuff like Mouse.KeyDown work | |
| 12 | local function fakeEvent() | |
| 13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 14 | t.connect = t.Connect | |
| 15 | - | GasMask = true |
| 15 | + | return t |
| 16 | end | |
| 17 | - | if GasMask == true then |
| 17 | + | |
| 18 | - | o1 = Instance.new("Model")
|
| 18 | + | --Creating fake input objects with fake variables |
| 19 | - | o2 = Instance.new("Part")
|
| 19 | + | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
|
| 20 | - | o3 = Instance.new("SpecialMesh")
|
| 20 | + | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
|
| 21 | - | o4 = Instance.new("Part")
|
| 21 | + | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
|
| 22 | - | o5 = Instance.new("Part")
|
| 22 | + | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
|
| 23 | - | o6 = Instance.new("Part")
|
| 23 | + | end} |
| 24 | - | o7 = Instance.new("SpecialMesh")
|
| 24 | + | --Merged 2 functions into one by checking amount of arguments |
| 25 | - | o8 = Instance.new("Part")
|
| 25 | + | CAS.UnbindAction = CAS.BindAction |
| 26 | - | o9 = Instance.new("Part")
|
| 26 | + | |
| 27 | - | o10 = Instance.new("SpecialMesh")
|
| 27 | + | --This function will trigger the events that have been :Connect()'ed |
| 28 | - | o11 = Instance.new("Part")
|
| 28 | + | local function te(self,ev,...) |
| 29 | - | o12 = Instance.new("Part")
|
| 29 | + | local t = m[ev] |
| 30 | - | o13 = Instance.new("SpecialMesh")
|
| 30 | + | if t and t._fakeEvent and t.Function then |
| 31 | - | o14 = Instance.new("Part")
|
| 31 | + | t.Function(...) |
| 32 | - | o15 = Instance.new("Part")
|
| 32 | + | end |
| 33 | - | o16 = Instance.new("Part")
|
| 33 | + | end |
| 34 | - | o17 = Instance.new("Part")
|
| 34 | + | m.TrigEvent = te |
| 35 | - | o1.Name = "MODEL" |
| 35 | + | UIS.TrigEvent = te |
| 36 | - | o2.Name = "Middle" |
| 36 | + | |
| 37 | - | o2.Parent = o1 |
| 37 | + | Event.OnServerEvent:Connect(function(plr,io) |
| 38 | - | o2.BrickColor = BrickColor.new("Pastel brown")
|
| 38 | + | if plr~=Player then return end |
| 39 | - | o2.Transparency = 1 |
| 39 | + | if io.isMouse then |
| 40 | - | o2.Position = Vector3.new(-13.5356159, 3.71991396, 50.2649117) |
| 40 | + | m.Target = io.Target |
| 41 | - | o2.Rotation = Vector3.new(-5.66336393, -89.7626114, -5.66246414) |
| 41 | + | m.Hit = io.Hit |
| 42 | - | o2.Anchored = true |
| 42 | + | else |
| 43 | - | o2.FormFactor = Enum.FormFactor.Custom |
| 43 | + | local b = io.UserInputState == Enum.UserInputState.Begin |
| 44 | - | o2.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) |
| 44 | + | if io.UserInputType == Enum.UserInputType.MouseButton1 then |
| 45 | - | o2.CFrame = CFrame.new(-13.5356159, 3.71991396, 50.2649117, 1.75646369e-006, 1.74156298e-007, -0.999991417, -1.04150445e-007, 1, 1.60883403e-007, 0.999999762, 9.62157287e-008, 1.6223396e-006) |
| 45 | + | return m:TrigEvent(b and "Button1Down" or "Button1Up") |
| 46 | - | o2.BottomSurface = Enum.SurfaceType.Smooth |
| 46 | + | end |
| 47 | - | o2.TopSurface = Enum.SurfaceType.Smooth |
| 47 | + | for _,t in pairs(CAS.Actions) do |
| 48 | - | o2.Color = Color3.new(1, 0.8, 0.6) |
| 48 | + | for _,k in pairs(t.Keys) do |
| 49 | - | o3.Parent = o2 |
| 49 | + | if k==io.KeyCode then |
| 50 | - | o3.Scale = Vector3.new(6.25, 6.25, 6.25) |
| 50 | + | t.Function(t.Name,io.UserInputState,io) |
| 51 | - | o3.MeshType = Enum.MeshType.FileMesh |
| 51 | + | end |
| 52 | - | o4.Name = "Lense 1" |
| 52 | + | end |
| 53 | - | o4.Parent = o1 |
| 53 | + | end |
| 54 | - | o4.Material = Enum.Material.Metal |
| 54 | + | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
| 55 | - | o4.Transparency = 0.050000011920929 |
| 55 | + | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) |
| 56 | - | o4.Position = Vector3.new(-12.900528, 3.77991295, 50.5080605) |
| 56 | + | end |
| 57 | - | o4.Rotation = Vector3.new(-180, 20.6807137, -179.999985) |
| 57 | + | end) |
| 58 | - | o4.Anchored = true |
| 58 | + | Event.Parent = NLS([==[ |
| 59 | - | o4.CanCollide = false |
| 59 | + | local Player = game:GetService("Players").LocalPlayer
|
| 60 | - | o4.FormFactor = Enum.FormFactor.Custom |
| 60 | + | local Event = script:WaitForChild("UserInput_Event")
|
| 61 | - | o4.Shape = Enum.PartType.Cylinder |
| 61 | + | |
| 62 | - | o4.Size = Vector3.new(0.200000003, 0.320000023, 0.939999998) |
| 62 | + | local UIS = game:GetService("UserInputService")
|
| 63 | - | o4.CFrame = CFrame.new(-12.900528, 3.77991295, 50.5080605, -0.935553849, 3.06141374e-007, 0.353159934, 3.19927466e-007, 1, 2.01617603e-008, -0.353163034, 1.1997561e-007, -0.935561478) |
| 63 | + | local input = function(io,a) |
| 64 | - | o4.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
| 64 | + | if a then return end |
| 65 | - | o4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
| 65 | + | --Since InputObject is a client-side instance, we create and pass table instead |
| 66 | - | o4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
| 66 | + | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
|
| 67 | - | o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
| 67 | + | end |
| 68 | - | o4.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
| 68 | + | UIS.InputBegan:Connect(input) |
| 69 | - | o4.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
| 69 | + | UIS.InputEnded:Connect(input) |
| 70 | - | o5.Name = "Lense2" |
| 70 | + | |
| 71 | - | o5.Parent = o1 |
| 71 | + | local Mouse = Player:GetMouse() |
| 72 | - | o5.Material = Enum.Material.Metal |
| 72 | + | local h,t |
| 73 | - | o5.Transparency = 0.050000011920929 |
| 73 | + | --Give the server mouse data 30 times every second, but only if the values changed |
| 74 | - | o5.Position = Vector3.new(-12.8961124, 3.77492094, 50.0302277) |
| 74 | + | --If player is not moving their mouse, client won't fire events |
| 75 | - | o5.Rotation = Vector3.new(-180, -23.8323021, -179.999985) |
| 75 | + | while wait(1/30) do |
| 76 | - | o5.Anchored = true |
| 76 | + | if h~=Mouse.Hit or t~=Mouse.Target then |
| 77 | - | o5.CanCollide = false |
| 77 | + | h,t=Mouse.Hit,Mouse.Target |
| 78 | - | o5.FormFactor = Enum.FormFactor.Custom |
| 78 | + | Event:FireServer({isMouse=true,Target=t,Hit=h})
|
| 79 | - | o5.Shape = Enum.PartType.Cylinder |
| 79 | + | end |
| 80 | - | o5.Size = Vector3.new(0.200000003, 0.330000043, 0.99000001) |
| 80 | + | end]==],Player.Character) |
| 81 | - | o5.CFrame = CFrame.new(-12.8961124, 3.77492094, 50.0302277, -0.914722979, 2.85652249e-007, -0.404061079, 2.36339361e-007, 1, 1.37493373e-007, 0.404064298, 2.15865228e-008, -0.914730668) |
| 81 | + | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS |
| 82 | - | o5.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
| 82 | + | |
| 83 | - | o5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
| 83 | + | |
| 84 | - | o5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
| 84 | + | |
| 85 | - | o5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
| 85 | + | |
| 86 | - | o5.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
| 86 | + | |
| 87 | - | o5.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
| 87 | + | |
| 88 | - | o6.Name = "Handle" |
| 88 | + | local Player = Owner |
| 89 | - | o6.Parent = o1 |
| 89 | + | |
| 90 | - | o6.Material = Enum.Material.Metal |
| 90 | + | |
| 91 | - | o6.BrickColor = BrickColor.new("Really black")
|
| 91 | + | |
| 92 | - | o6.Position = Vector3.new(-12.8799381, 3.69992495, 50.2599869) |
| 92 | + | |
| 93 | - | o6.Rotation = Vector3.new(-90, 9.97842108e-006, -89.9999008) |
| 93 | + | |
| 94 | - | o6.Anchored = true |
| 94 | + | |
| 95 | - | o6.CanCollide = false |
| 95 | + | |
| 96 | - | o6.FormFactor = Enum.FormFactor.Plate |
| 96 | + | |
| 97 | - | o6.Size = Vector3.new(1, 0.400000006, 1) |
| 97 | + | Music.Pitch = 1 |
| 98 | - | o6.CFrame = CFrame.new(-12.8799381, 3.69992495, 50.2599869, 1.75646369e-006, 0.999991417, 1.74156298e-007, -1.04150445e-007, -1.60883403e-007, 1, 0.999999762, -1.6223396e-006, 9.62157287e-008) |
| 98 | + | |
| 99 | - | o6.BottomSurface = Enum.SurfaceType.Weld |
| 99 | + | |
| 100 | - | o6.TopSurface = Enum.SurfaceType.Smooth |
| 100 | + | |
| 101 | - | o6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) |
| 101 | + | local Player = Owner |
| 102 | - | o7.Parent = o6 |
| 102 | + | |
| 103 | - | o7.MeshId = "http://www.roblox.com/asset/?id=5158270" |
| 103 | + | local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
|
| 104 | - | o7.Scale = Vector3.new(0.140000001, 0.170000002, 0.100000001) |
| 104 | + | |
| 105 | - | o7.MeshType = Enum.MeshType.FileMesh |
| 105 | + | game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if player.Name == "jacob_savagelol" then --Between the "jacob_savagelol"s, put your Roblox username. local clonedgui = billboardgui:Clone() clonedgui.TextLabel.Text = "Testing" clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255,255,0) clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head |