Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- -----------------------------------------------------
- --Sonic's Schoolhouse V1.4, by PRGSPY.
- --With Textures Ripped by ManuB05
- --and alot of free audio
- -----------------------------------------------------
- local playere = game:GetService("Players").LocalPlayer
- local character = playere.Character
- local human = character:WaitForChild("Humanoid")
- local slides = {"rbxassetid://1775750905", "rbxassetid://1775750765", "rbxassetid://1775750896", "rbxassetid://1775750765", "rbxassetid://1775750905"}
- local messages = {'"No Running in the Halls." - The Principle of the Thing', "Only Insta-kill moves can flatten Me!", "If you don't get what you're looking for when you ask for help, try again!", "[N - O = P]E", "[N * A = H]", "Don't touch my quills, because it will hurt.", "The Textures used for this script were ripped by ManuB05.", "This script was originally made by PRGSPY.", "Click on me for help!"}
- local itemids = {243788599, 122278276, 68603151, 128160832, 26013203, 236441643, 42845853, 503955938, 738925737}
- local Mouse = playere:GetMouse()
- local UserInputService = game:GetService("UserInputService")
- local mam = nil
- local debris=game:GetService("Debris")
- local iteminsertdisabled = false
- local debugman = false
- x = {5, 0}
- y = {6, 0}
- eggs = {1.25, 0}
- --Making the Player Invisible, and invinicible
- repeat wait() until character:FindFirstChild("roblox", true) ~= nil and character.Head:FindFirstChild("face") ~= nil
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- v.Transparency = 1
- if v.Name == "Head" then
- v.Transparency = 0.99
- end
- end
- end
- wait(0.01)
- for q,t in pairs(character:GetChildren()) do
- if t.ClassName == "Accessory" or t.ClassName == "Hat" then
- t.Handle.Transparency = 1
- end
- end
- character.Head.face.Transparency = 1
- human.MaxHealth = math.huge
- human.Health = human.MaxHealth
- human.JumpPower = 100
- human.WalkSpeed = 64
- local ff = Instance.new("ForceField")
- ff.Parent = character
- ff.Visible = false
- character.Head.Died.SoundId = "rbxassetid://571879674"
- character.Head.Jumping.SoundId = "rbxassetid://1206872046"
- character.Head.Jumping.Volume = 3
- --Setting up the BillboardGui
- local floatie = Instance.new("BillboardGui")
- floatie.Parent = character.Head
- floatie.Adornee = character.Head
- floatie.Size = UDim2.new(unpack(x), unpack(y, 0))
- print("Main container created")
- local imageman = Instance.new("ImageLabel")
- imageman.Parent = floatie
- imageman.Image = "rbxassetid://1775750905"
- imageman.BackgroundTransparency = 1
- imageman.BorderSizePixel = 0
- imageman.Size = UDim2.new(unpack(eggs), unpack(eggs, 0))
- local clickie = Instance.new("ClickDetector")
- clickie.Parent = character.Head
- clickie.MaxActivationDistance = math.huge
- print("image created")
- local song = Instance.new("Sound")
- song.SoundId = "rbxassetid://1791879624"
- song.Name = "Song"
- song.Looped = true
- song.Volume = 2
- song.Parent = floatie
- local death = Instance.new("Sound")
- death.SoundId = "rbxassetid://571879674"
- death.Name = "ded"
- death.Looped = false
- death.Volume = 1
- death.Parent = floatie
- local hits = Instance.new("Sound")
- hits.SoundId = "rbxassetid://131864673"
- hits.Name = "bang"
- hits.Looped = false
- hits.Volume = 1
- hits.Parent = floatie
- local choose = Instance.new("Sound")
- choose.SoundId = "rbxassetid://130792936"
- choose.Name = "ins"
- choose.Looped = false
- choose.Volume = 3
- choose.Parent = floatie
- local ring = Instance.new("Sound")
- ring.SoundId = "rbxassetid://181453194"
- ring.Name = "dins"
- ring.Looped = false
- ring.Volume = 5
- ring.Parent = floatie
- --The Good Stuff
- function onTouched(hit)
- if hit.Parent:findFirstChild("Humanoid") and hit.Parent.name ~= playere.Name then
- hit.Parent.Humanoid:TakeDamage(hit.Parent.Humanoid.MaxHealth / 10)
- hit.Parent.Humanoid.Sit = true
- hits:Play()
- if hit.Parent.Humanoid.MaxHealth == math.huge then
- hit.Parent.Humanoid.Health = 0
- end
- if hit.Parent.Humanoid.Health == 0 then
- death:Play()
- if mam == nil then
- mam = Instance.new("Message")
- mam.Parent = game.Workspace
- mam.Text = "A bit of advice for ".. hit.Parent.name ..": " .. messages[math.random(1,#messages)]
- wait(3)
- if mam ~= nil then
- mam:Destroy()
- mam = nil
- end
- end
- end
- end
- end
- function createbus()
- fricc = Instance.new("Part")
- fricc.CFrame = CFrame.new(Vector3.new(-28.6299992, 6.12698269, -13.46)) * CFrame.Angles(-0, 0, -0)
- fricc.Transparency = 1
- fricc.TopSurface = Enum.SurfaceType.Smooth
- fricc.BottomSurface = Enum.SurfaceType.Smooth
- fricc.Size = Vector3.new(6, 6, 6)
- fricc.Friction = 0.30000001192093
- fricc.Shape = Enum.PartType.Block
- fricc.Name = "sweep"
- fricc.Parent = game.Workspace
- local floatie2 = Instance.new("BillboardGui")
- floatie2.Parent = fricc
- floatie2.Adornee = fricc
- floatie2.Size = UDim2.new(unpack(x), unpack(y, 0))
- local imagemanu = Instance.new("ImageLabel")
- imagemanu.Parent = floatie2
- imagemanu.Image = "rbxassetid://954619044"
- imagemanu.BackgroundTransparency = 1
- imagemanu.BorderSizePixel = 0
- local ecc = {1, 0}
- imagemanu.Size = UDim2.new(unpack(eggs), unpack(ecc, 0))
- return fricc
- end
- function FireProj(part, speed, duration, gravMultiplier)
- local dur = duration or 5
- local mouse = game:GetService("Players").LocalPlayer:GetMouse()
- local ShotCFrame = character.HumanoidRootPart.CFrame
- local ShotClone = part:Clone()
- ShotClone.CFrame = CFrame.new(ShotCFrame.p, mouse.Hit.p) + (ShotCFrame.lookVector * 4)
- ShotClone.Velocity = ShotClone.CFrame.lookVector * speed
- for _, child in ipairs(ShotClone:GetChildren()) do
- if child:IsA("BasePart") then
- local BodyVelocity = Instance.new("BodyForce")
- BodyVelocity.Force = Vector3.new(0, (workspace.Gravity * child:GetMass()) / gravMultiplier, 0)
- BodyVelocity.Parent = child
- end
- end
- local BodyVelocity = Instance.new("BodyForce")
- BodyVelocity.Force = Vector3.new(0, (workspace.Gravity * ShotClone:GetMass()) / gravMultiplier, 0)
- BodyVelocity.Parent = ShotClone
- game:GetService("Debris"):AddItem(ShotClone, dur)
- ShotClone.Parent = game:GetService("Workspace")
- return ShotClone
- end
- clickie.MouseClick:connect(function(player)
- for u,j in pairs(game.Workspace:GetChildren()) do
- if j.ClassName == "Message" then
- j.Destroy()
- end
- end
- local mem = Instance.new("Message")
- mem.Parent = game.Workspace
- mem.Text = "Reply to request for help by ".. player.name ..": " .. messages[math.random(1,#messages)]
- wait(3)
- mem:Destroy()
- end)
- Mouse.KeyDown:connect(function(key)
- if (key=="e") then
- song:Stop()
- end
- if (key=="q") then
- song:Play()
- end
- if (key=="t") then
- if imageman ~= nil then
- for i = 1,#slides do
- imageman.Image = slides[i]
- wait(0.1)
- end
- end
- end
- if (key=="y") then
- for u,j in pairs(game.Workspace:GetChildren()) do
- if j.ClassName == "Message" then
- j:Destroy()
- end
- end
- local mem = Instance.new("Message")
- mem.Parent = game.Workspace
- mem.Text = "A message from Sonic for those who need help: " .. messages[math.random(1,#messages)]
- wait(3)
- mem:Destroy()
- end
- if (key=="f") then
- for u,j in pairs(game.Workspace:GetChildren()) do
- if j.ClassName == "Message" then
- j:Destroy()
- end
- end
- end
- if (key=="r") and iteminsertdisabled == false then
- if script.ClassName == "LocalScript" then
- death:Play()
- local mrm = Instance.new("Message")
- mrm.Parent = playere.PlayerGui
- mrm.Text = "It would be nice if local scripts (like this script right now) could insert stuff, but they can't so this move is broken."
- wait(3)
- mrm:Destroy()
- else
- local itemid = itemids[math.random(1,#itemids)]
- iteminsertdisabled = true
- choose:Play()
- local gear = game:GetService("InsertService"):LoadAsset(itemid)
- local item = gear:FindFirstChildWhichIsA("Tool")
- item.Parent = playere.Backpack
- wait()
- gear:Destroy()
- print("Inserted Item")
- wait(15)
- iteminsertdisabled = false
- ring:Play()
- end
- end
- if (key=="f") then
- local e = createbus()
- local eh = FireProj(e, 150, 5, 2.125)
- eh.CFrame = eh.CFrame * CFrame.Angles(0, math.rad(90), 0)
- e:Destroy()
- local touched = nil
- touched = eh.Touched:connect(function(hit)
- if hit.Parent:FindFirstChildWhichIsA("Humanoid") ~= nil and hit.Parent:FindFirstChildWhichIsA("Humanoid") ~= human then
- local sweep = Instance.new("Sound")
- sweep.Parent = eh
- sweep.SoundId = "rbxassetid://1781430032"
- sweep.Volume = 2
- sweep.Pitch = math.random(0.9, 1.3)
- sweep:Play()
- hit.Parent.Humanoid.Sit = true
- end
- end)
- end
- end)
- character.HumanoidRootPart.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement