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 by Mokiros, Edited by StarzoZero")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- 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 te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(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
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a 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 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) 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
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __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 _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg: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(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- --Bacon Hair Server Destroyer Gui
- --The Bacon everybody and bacon player functions are just for annoyance and lag.
- --If you want to DESTROY the server press the red button.
- -- Objects
- local BaconGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- local TextBox = Instance.new("TextBox")
- local TextButton_2 = Instance.new("TextButton")
- local TextButton_3 = Instance.new("TextButton")
- -- Properties
- BaconGui.Name = "BaconGui"
- BaconGui.Parent = game.Players.LocalPlayer.PlayerGui
- Frame.Parent = BaconGui
- Frame.BackgroundColor3 = Color3.new(0.0392157, 0.698039, 1)
- Frame.BackgroundTransparency = 0.30000001192093
- Frame.Position = UDim2.new(0.58486408, 0, 0.363475174, 0)
- Frame.Size = UDim2.new(0.314474642, 0, 0.501773059, 0)
- Frame.Active = true
- Frame.Draggable = true
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.new(0.384314, 0.415686, 1)
- TextButton.BackgroundTransparency = 0.30000001192093
- TextButton.Position = UDim2.new(0, 0, 0.349999994, 0)
- TextButton.Size = UDim2.new(0.5, 0, 0.150000006, 0)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "Bacon Spam Player"
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextWrapped = true
- TextButton.MouseButton1Click:connect(function()
- BaconStrikePlayer(TextBox.Text)
- end)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Size = UDim2.new(1, 0, 0, 100)
- TextLabel.Font = Enum.Font.SourceSansLight
- TextLabel.Text = "Bacon Server Destroyer Gui"
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- TextBox.Parent = Frame
- TextBox.BackgroundColor3 = Color3.new(0.603922, 0.376471, 1)
- TextBox.BackgroundTransparency = 0.30000001192093
- TextBox.Position = UDim2.new(0, 0, 0.5, 0)
- TextBox.Size = UDim2.new(0.5, 0, 0, 50)
- TextBox.Font = Enum.Font.SourceSans
- TextBox.Text = "Player Name Here!"
- TextBox.TextScaled = true
- TextBox.TextSize = 14
- TextBox.TextWrapped = true
- TextButton_2.Parent = Frame
- TextButton_2.BackgroundColor3 = Color3.new(0.384314, 0.415686, 1)
- TextButton_2.BackgroundTransparency = 0.30000001192093
- TextButton_2.Position = UDim2.new(0.5, 0, 0.349999994, 0)
- TextButton_2.Size = UDim2.new(0.5, 0, 0.330000013, 0)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.Text = "Bacon Spam All Players"
- TextButton_2.TextScaled = true
- TextButton_2.TextSize = 14
- TextButton_2.TextWrapped = true
- TextButton_2.MouseButton1Click:connect(function()
- BaconStrikeServer()
- end)
- TextButton_3.Parent = Frame
- TextButton_3.BackgroundColor3 = Color3.new(1, 0, 0.14902)
- TextButton_3.BackgroundTransparency = 0.30000001192093
- TextButton_3.Position = UDim2.new(0, 0, 0.680000007, 0)
- TextButton_3.Size = UDim2.new(1, 0, 0.319999993, 0)
- TextButton_3.Font = Enum.Font.SourceSans
- TextButton_3.Text = "Bacon Spam Every Single Part In The Server With Particles"
- TextButton_3.TextScaled = true
- TextButton_3.TextSize = 14
- TextButton_3.TextWrapped = true
- TextButton_3.MouseButton1Click:connect(function()
- BaconStrikeEverySinglePartInTheWholeServer()
- end)
- --BaconStrikePlayer
- function BaconStrikePlayer(player)
- if TextBox.Text ~= "Player Name Here!" then
- for i=1, 3000 do
- BaconHair = Instance.new("Part", workspace)
- BaconHair.Size = Vector3.new(1, 1, 2)
- BaconHairMesh = Instance.new("SpecialMesh", BaconHair)
- BaconHairMesh.MeshId = "http://roblox.com/asset/?id=83293901"
- BaconHairMesh.Scale = Vector3.new(1, 1.05, 1)
- BaconHairMesh.TextureId = "http://roblox.com/asset/?id=83284747"
- BaconHairMesh.VertexColor = Vector3.new(1.2, 1.4, 1.4)
- if player == "me" then
- BaconHair.Position = game.Players.LocalPlayer.Character.Torso.Position
- else
- BaconHair.Position = game.Players[player].Character.Torso.Position
- end
- wait(0.0001)
- end
- end
- end
- --BaconStrikeServer
- function BaconStrikeServer()
- MakeBaconSong()
- MakeBaconSound(workspace)
- for i=1, 6000 do
- BaconHair = Instance.new("Part", workspace)
- BaconHair.Size = Vector3.new(1, 1, 2)
- BaconHairMesh = Instance.new("SpecialMesh", BaconHair)
- BaconHairMesh.MeshId = "http://roblox.com/asset/?id=83293901"
- BaconHairMesh.Scale = Vector3.new(1, 1.05, 1)
- BaconHairMesh.TextureId = "http://roblox.com/asset/?id=83284747"
- BaconHairMesh.VertexColor = Vector3.new(1.2, 1.4, 1.4)
- Rando = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
- BaconHair.Position = Rando.Character.Torso.Position
- wait(0.0001)
- end
- end
- --BaconStrikeAllPartsInServer
- function BaconStrikeEverySinglePartInTheWholeServer()
- MakeBaconSong()
- for index, child in pairs(workspace:GetChildren()) do
- if child.ClassName == "Part" then
- MakeBaconSound(child)
- for i=1, 600 do
- BaconHair = Instance.new("Part", workspace)
- BaconHair.Size = Vector3.new(1, 1, 2)
- BaconHairMesh = Instance.new("SpecialMesh", BaconHair)
- BaconHairMesh.MeshId = "http://roblox.com/asset/?id=83293901"
- BaconHairMesh.Scale = Vector3.new(1, 1.05, 1)
- BaconHairMesh.TextureId = "http://roblox.com/asset/?id=83284747"
- BaconHairMesh.VertexColor = Vector3.new(1.2, 1.4, 1.4)
- BaconHairParticleMaker = Instance.new("ParticleEmitter", BaconHair)
- BaconHairParticleMaker.Size = NumberSequence.new(0.5)
- BaconHairParticleMaker.Texture = "rbxassetid://963303510"
- BaconHairParticleMaker.Transparency = NumberSequence.new(0.7, 0,7)
- BaconHairParticleMaker.Lifetime = NumberRange.new(5000, 5000)
- BaconHairParticleMaker.Rate = 500.000
- BaconHairParticleMaker.RotSpeed = NumberRange.new(100, 100)
- BaconHairParticleMaker.Speed = NumberRange.new(5, 5)
- BaconHairParticleMaker.SpreadAngle = Vector2.new(0, 1000)
- BaconHair.Position = child.Position
- end
- end
- end
- end
- --BaconSong
- function MakeBaconSong()
- if workspace:FindFirstChild("baconsong") then
- no = workspace:FindFirstChild("baconsong")
- no:Destroy()
- end
- baconsong = Instance.new("Sound", workspace)
- baconsong.Name = "baconsong"
- baconsong.SoundId = "rbxassetid://183031794"
- baconsong:Play()
- end
- --BaconSound
- function MakeBaconSound(parent)
- BaconSound = Instance.new("Sound", parent)
- BaconSound.Looped = true
- BaconSound.SoundId = "rbxassetid://1052934249"
- BaconSound:Play()
- end
Add Comment
Please, Sign In to add comment