SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has been converted to FE by iPxter | |
| 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,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 6 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | -- Quick scan: | |
| 88 | -- This will just give you a brick-count and print it to your output | |
| 89 | -- Go in Solo or Online mode to get a dynamic GUI counter | |
| 90 | ||
| 91 | local lighting = game:GetService("Lighting")
| |
| 92 | lighting.Brightness = 0 | |
| 93 | lighting.OutdoorAmbient = Color3.new(0,0,0) | |
| 94 | local sky = Instance.new("Sky", lighting)
| |
| 95 | sky.SkyboxBk = "http://www.roblox.com/asset/?id=48020371" | |
| 96 | sky.SkyboxDn = "http://www.roblox.com/asset/?id=48020144" | |
| 97 | sky.SkyboxFt = "http://www.roblox.com/asset/?id=48020234" | |
| 98 | sky.SkyboxLf = "http://www.roblox.com/asset/?id=48020211" | |
| 99 | sky.SkyboxRt = "http://www.roblox.com/asset/?id=48020254" | |
| 100 | sky.SkyboxUp = "http://www.roblox.com/asset/?id=48020383" | |
| 101 | local music = Instance.new("Sound", game.Workspace)
| |
| 102 | music.SoundId = "rbxassetid://150402649" | |
| 103 | music.Volume = 1 | |
| 104 | music.Looped = true | |
| 105 | music.PlayOnRemove = true | |
| 106 | music:Play() | |
| 107 | ||
| 108 | local parts = {}
| |
| 109 | function scan(p) | |
| 110 | for _,target in pairs(p:GetChildren()) do | |
| 111 | if target:IsA("BasePart") then
| |
| 112 | table.insert(parts,target) -- target is the actual parts! | |
| 113 | target.Anchored = false | |
| 114 | target.BrickColor = BrickColor.new("Really black")
| |
| 115 | local sb = Instance.new("SelectionBox", target)
| |
| 116 | sb.Color3 = Color3.new(255, 0, 0) | |
| 117 | sb.SurfaceColor3 = Color3.new(170, 0, 0) | |
| 118 | sb.Adornee = target | |
| 119 | local pe = Instance.new("ParticleEmitter", target)
| |
| 120 | pe.Name = "10101110010011" | |
| 121 | pe.Texture = "rbxassetid://45524735" | |
| 122 | pe.Rate = 10 | |
| 123 | pe.SpreadAngle = Vector2.new(-90, 90) | |
| 124 | local pe2 = Instance.new("ParticleEmitter", target)
| |
| 125 | pe2.Name = "ERROR_._ER-__ORO_...." | |
| 126 | pe2.Texture = "rbxassetid://158293315" | |
| 127 | pe2.Rate = 10 | |
| 128 | pe2.SpreadAngle = Vector2.new(-90, 90) | |
| 129 | local bb = Instance.new("BillboardGui", target)
| |
| 130 | bb.Size = UDim2.new(50,0 , 25,0) | |
| 131 | bb.AlwaysOnTop = true | |
| 132 | local randomtext = {
| |
| 133 | "1x1x1x1 !S B4CK", | |
| 134 | "101010110100101011101111010101", | |
| 135 | "_-ERROR-_" | |
| 136 | } | |
| 137 | local label = Instance.new("TextLabel", bb)
| |
| 138 | label.Size = UDim2.new(1,0 , 1,0) | |
| 139 | label.TextScaled = true | |
| 140 | label.TextWrapped = true | |
| 141 | label.BackgroundTransparency = 1 | |
| 142 | local brickcolor = BrickColor.new("Really red")
| |
| 143 | label.TextColor3 = brickcolor.Color | |
| 144 | label.Font = "ArialBold" | |
| 145 | label.TextSize = 100 | |
| 146 | local chosentext = randomtext[math.random(1, #randomtext)] | |
| 147 | label.Text = chosentext | |
| 148 | local fire = Instance.new("Fire", target)
| |
| 149 | fire.Size = 30 | |
| 150 | fire.Heat = 25 | |
| 151 | end | |
| 152 | scan(target) | |
| 153 | end | |
| 154 | end | |
| 155 | scan(game.Workspace) | |
| 156 | --print(#parts .. (#parts == 1 and " brick " or " bricks ") .. "counted") | |
| 157 | parts = {}
| |
| 158 | wait(1) | |
| 159 | ||
| 160 | ||
| 161 | local m = Instance.new("Message", game.Workspace)
| |
| 162 | m.Text = "1x1x1x1 HAS RETURNED TO DESTROY ROBLOX!" | |
| 163 | wait(3) | |
| 164 | m.Text = "STARTING COUNTDOWN..." | |
| 165 | wait(2) | |
| 166 | m.Text = "ONCE THE TIMER REACH 0, THIS SERVER WILL NO LONGER EXIST!" | |
| 167 | wait(5) | |
| 168 | ||
| 169 | local unit = 10 | |
| 170 | wait(1) | |
| 171 | for i = 1, 10 do | |
| 172 | unit = unit - 1 | |
| 173 | m.Text = "COUNTDOWN: " ..unit.. " SECONDS LEFT!" | |
| 174 | wait(1) | |
| 175 | end | |
| 176 | ||
| 177 | m.Text = "FAREWELL, IDIOTS! MUAHAHAHAHAHAHAHA!!!" | |
| 178 | ||
| 179 | local prey = nil | |
| 180 | local parts = script.Parent:GetChildren() | |
| 181 | ||
| 182 | for i = 1,#parts do | |
| 183 | if (parts[i].className == "Part") then | |
| 184 | if (prey ~= nil)then | |
| 185 | prey:Destroy() | |
| 186 | end | |
| 187 | prey = parts[i] | |
| 188 | end | |
| 189 | end | |
| 190 | ||
| 191 | for i, players in pairs(game.Players:GetChildren()) do | |
| 192 | players:Kick("010111010101000101011101010100010111101010010100010111101011010100101010101010101010101010101001010101011011010110100101010101010101011101")
| |
| 193 | end |