Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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
- --F = Mask On/ Mask Off (Hides your name)--
- --Q = Chill--
- --Z = Bypassed Audio--
- --Windows95/FR34KY @V3rm
- debounce = 0;
- --Vouch if you're going to use it.
- --Thanks,
- --Yeah, im kinda terrible at scripting.
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local mouse = player:GetMouse()
- --game.Players.LocalPlayer.Character.Shirt.ShirtTemplate='rbxassetid://473465498'
- local player=game.Players.LocalPlayer;
- local char=game.Players.LocalPlayer.Character;
- local humanoid = player.Character.Humanoid;
- Tool=Instance.new('Tool', game.Players.LocalPlayer.Backpack);
- Tool.GripRight=Vector3.new(0.865, 0.105, -0.49);
- Tool.GripUp=Vector3.new(-0.023, 0.985, 0.171);
- Tool.GripPos=Vector3.new(0.064, -0.3, 0.9);
- Tool.GripForward=Vector3.new(0.485, 0.14, -0.863); --0.485, 0.14, -0.863
- Tool.Name='Shotgun';
- Handle=Instance.new('Part', Tool);
- Handle.Name = 'Handle';
- Handle.BrickColor=BrickColor.new('Really black')
- Handle.Size=Vector3.new(0.26, 1.11, 4.85);
- Handle.Position=Vector3.new(-18.53, 0.555, -16.825)
- gunfire=Instance.new('Part', Tool)
- gunfire.Name='GunFire'
- gunfire.Size=Vector3.new(0.2, 0.2, 0.2)
- gunfire.Transparency=1
- gunfire.Position=Vector3.new(-18.56, 1.1, -19.35)
- gunfirefx=Instance.new('BillboardGui', gunfire)
- gunfirefx.Enabled=false
- gunfirefx.Adornee = gunfire
- gunfirefx.Size=UDim2.new(1.1, 0, 1.1, 0)
- gunfirefx2=Instance.new('ImageLabel', gunfirefx)
- gunfirefx2.Image='http://www.roblox.com/asset/?id=117472237'
- gunfirefx2.BackgroundTransparency=1
- gunfirefx2.Size=UDim2.new(1.2, 0, 1.2, 0)
- c4mesh=Instance.new('SpecialMesh', Handle);
- c4mesh.MeshType = 'FileMesh';
- c4mesh.MeshId='http://www.roblox.com/asset/?id=94219391';
- c4mesh.TextureId='http://www.roblox.com/asset/?id=65508886';
- c4mesh.Scale=Vector3.new(0.75, 0.75, 0.75);
- light=Instance.new('PointLight', Handle);
- light.Color = Color3.new(255, 255, 0)
- light.Range=10;
- light.Enabled=false;
- --Weld Connector
- local prev
- local parts = Tool:GetChildren()
- for i = 1,#parts do
- if (parts[i].className == "Part") then
- if (prev ~= nil)then
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- end
- prev = parts[i]
- end
- end
- --end
- local Prepare=Instance.new("Animation", player.Character);
- Prepare.AnimationId="http://www.roblox.com/asset?id=168086975";
- local playAnim = humanoid:LoadAnimation(Prepare)
- local Prepare3=Instance.new("Animation", player.Character);
- Prepare3.AnimationId="http://www.roblox.com/asset?id=94331086";
- local Prepare2Play = humanoid:LoadAnimation(Prepare3)
- local Prepare2=Instance.new("Animation", player.Character);
- Prepare2.AnimationId="http://www.roblox.com/asset?id=94242777";
- local playAnim6 = humanoid:LoadAnimation(Prepare)
- standed=true
- local shoot=Instance.new("Animation", player.Character);
- shoot.AnimationId="http://www.roblox.com/Asset?ID=94332152";
- local playAnim2 = humanoid:LoadAnimation(shoot)
- local reload=Instance.new("Animation", player.Character);
- reload.AnimationId="http://www.roblox.com/Asset?ID=94245658";
- local playAnim3 = humanoid:LoadAnimation(reload)
- reloadsound=Instance.new('Sound', char.Torso)
- reloadsound.Volume=4
- reloadsound.SoundId='rbxassetid://255061173'
- equip=Instance.new('Sound', char.Torso)
- equip.Volume=4
- equip.SoundId='rbxassetid://131045401'
- equip2=Instance.new('Sound', char.Torso)
- equip2.Volume=4
- equip2.SoundId='rbxassetid://131045429'
- function equipped(mouse)
- function Shoot()
- if standed==false then
- if debounce == 0 then
- debounce = 1
- if mouse.Target ~= nil then
- if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil and mouse.Target.Name ~= "Head" then
- mouse.Target.Parent.Humanoid:TakeDamage(100)
- hit=Instance.new('Sound', mouse.Target.Parent.Torso)
- hit.Volume=7
- hit.SoundId='rbxassetid://159970596'
- hit:Play()
- elseif mouse.Target.Parent.Parent:findFirstChild("Humanoid") ~= nil then
- mouse.Target.Parent.Parent.Humanoid:TakeDamage(100)
- hit=Instance.new('Sound', mouse.Target.Parent.Parent.Torso)
- hit.Volume=7
- hit.SoundId='rbxassetid://159970596'
- hit:Play()
- elseif mouse.Target.Name == "Part" then
- Hit = mouse.hit
- if Hit==nil then return end
- I = Instance.new("Part")
- I.Parent = game.Workspace
- I.CFrame = Hit
- I.Anchored=true
- I.Transparency=1
- I.Anchored=true
- I.CanCollide=false
- Pa=Instance.new('ParticleEmitter', I)
- Pa.Size = NumberSequence.new(0.2)
- Pa.Speed = NumberRange.new(40)
- Pa.Lifetime=NumberRange.new(0.4)
- Pa.RotSpeed = NumberRange.new(-255, 250)
- Pa.Texture = 'rbxassetid://316915922'
- Pa.LightEmission = 0
- Pa.EmissionDirection='Back'
- Pa.VelocitySpread = 250
- Pa.Rate = 500
- --
- Pa2=Instance.new('ParticleEmitter', I)
- Pa2.Size = NumberSequence.new(0.2)
- Pa2.Speed = NumberRange.new(40)
- Pa2.Lifetime=NumberRange.new(0.4)
- Pa2.RotSpeed = NumberRange.new(-255, 250)
- Pa2.Texture = 'rbxassetid://316915922'
- Pa2.LightEmission = 0
- Pa2.EmissionDirection='Back'
- Pa2.VelocitySpread = 250
- Pa2.Rate = 1000
- --
- Pa3=Instance.new('ParticleEmitter', I)
- Pa3.Size = NumberSequence.new(0.2)
- Pa3.Speed = NumberRange.new(40)
- Pa3.Lifetime=NumberRange.new(0.4)
- Pa3.RotSpeed = NumberRange.new(-255, 250)
- Pa3.Texture = 'rbxassetid://316915922'
- Pa3.LightEmission = 0
- Pa3.EmissionDirection='Back'
- Pa3.VelocitySpread = 250
- Pa3.Rate = 1000
- --
- Pa4=Instance.new('ParticleEmitter', I)
- Pa4.Size = NumberSequence.new(0.4)
- Pa4.Speed = NumberRange.new(40)
- Pa4.Lifetime=NumberRange.new(0.4)
- Pa4.RotSpeed = NumberRange.new(-255, 250)
- Pa4.Texture = 'rbxassetid://316915922'
- Pa4.LightEmission = 0
- Pa4.EmissionDirection='Back'
- Pa4.VelocitySpread = 250
- Pa4.Rate = 1000
- wait(0.1)
- Pa.Enabled=false
- Pa2.Enabled=false
- Pa3.Enabled=false
- Pa4.Enabled=false
- hit=Instance.new('Sound', I)
- hit.Volume=5
- hit.SoundId='rbxassetid://159970596'
- hit:Play()
- hit2=Instance.new('Sound', I)
- hit2.Volume=14
- hit2.SoundId='rbxassetid://516789356'
- hit2:Play()
- end
- end
- playAnim2:Play()
- Prepare2Play:Stop()
- light.Enabled=true;
- gunfirefx.Enabled=true
- shootsound=Instance.new('Sound', char.Torso)
- shootsound.Volume=6
- shootsound.SoundId='rbxassetid://331409731'
- shootsound:Play()
- wait(0.01)
- light.Enabled=false;
- gunfirefx.Enabled=false
- wait(1)
- Prepare2Play:Play()
- if hit then
- wait(0.6)
- I:Destroy()
- else
- print'hh'
- end
- debounce = 0
- end
- end end
- mouse.Button1Down:connect(Shoot)
- end
- Tool.Equipped:connect(equipped)
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local mouse = player:GetMouse()
- local reload=Instance.new("Animation", player.Character);
- reload.AnimationId="http://www.roblox.com/Asset?ID=94245658";
- local playAnim3 = humanoid:LoadAnimation(reload)
- reloading=false
- mouse.KeyDown:connect(function(key)
- if key == "r" then
- if reloading==true then
- playAnim:Stop()
- playAnim3:Play()
- Tool.GripForward=Vector3.new(-0.501, 0.137, -0.855);
- Prepare2Play:Stop()
- reloadsound:Play()
- wait(0.2)
- playAnim3:Stop()
- Prepare2Play:Play()
- end end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- if reloading==true then
- if standed==false then
- standed=true
- Prepare2Play:Stop()
- equip2:Play()
- wait()
- playAnim:Play()
- Tool.GripForward=Vector3.new(0.485, 0.14, -0.863); --0.485, 0.14, -0.863
- elseif standed==true then
- standed=false
- playAnim:Stop()
- wait()
- Prepare2Play:Play()
- equip:Play()
- Tool.GripForward=Vector3.new(-0.501, 0.137, -0.855);
- end end end
- end)
- stfu=false
- function equipped()
- wait()
- stfu=true
- wait()
- playAnim:Play()
- equip:Play()
- reloading=true
- end
- function unequipped()
- wait()
- playAnim:Stop()
- reloading=false
- Prepare2Play:Stop()
- stfu=false
- end
- Tool.Equipped:connect(equipped)
- Tool.Unequipped:connect(unequipped)
- --STFU
- stfuu=Instance.new('Sound', char.Torso)
- stfuu.Volume=3
- stfuu.Pitch=6.8
- stfuu.SoundId='rbxassetid://261303790'
- mouse.KeyDown:connect(function(key)
- if key == "z" then
- if stfu==true then
- stfuu:Play()
- game:GetService("Chat"):Chat(char.Head, "SHUT THE FUCK UP U CUNT", Enum.ChatColor.Red)
- wait(2)
- end end
- end)
- ---
- --Masked
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local mouse = player:GetMouse()
- equipsound = Instance.new('Sound', player.Character.Torso)
- equipsound.Volume=3
- equipsound.SoundId='rbxassetid://153647514'
- local anim5 = Instance.new("Animation", player.Character)
- anim5.AnimationId = "http://www.roblox.com/asset/?id=28492456"
- local playAnim10 = humanoid:LoadAnimation(anim5)
- plyr = player
- --p = game:GetService("InsertService"):LoadAsset(304085055)
- --p.Name='IsMasked'
- --p.Parent = game.Workspace
- ismasked=false
- maskhat=Instance.new('Hat', game.Workspace)
- maskhat.Name='IsMasked'
- maskhat.AttachmentForward=Vector3.new(0, 0, 0.1);
- maskhat.AttachmentPos=Vector3.new(0, 0.8, -0.05);
- maskhat.AttachmentRight=Vector3.new(1, 0, 0);
- maskhat.AttachmentUp=Vector3.new(0, 1, 0);
- maskhandle=Instance.new('Part', maskhat)
- maskhandle.Name='Handle';
- maskhandle.Anchored=false
- maskhandle.Size=Vector3.new(1.33, 1, 1.7)
- maskmeshh=Instance.new('SpecialMesh', maskhandle)
- maskmeshh.MeshType='FileMesh'
- maskmeshh.MeshId='http://www.roblox.com/asset/?id=304084512'
- maskmeshh.TextureId='http://www.roblox.com/asset/?id=304083165'
- wait(0.001)
- game.Workspace.IsMasked.Parent = plyr.Character
- maskhandle.Transparency=1
- mouse.KeyDown:connect(function(key)
- if key == "f" then
- if ismasked==false then
- ismasked=true
- Handle.Transparency=1
- playAnim10:Play()
- wait(0.5)
- playAnim10:Stop()
- equipsound:Play()
- Handle.Transparency=0
- player.Character.Humanoid.DisplayDistanceType='None'
- maskhandle.Transparency=0
- elseif ismasked==true then
- ismasked=false
- Handle.Transparency=1
- playAnim10:Play()
- wait(0.5)
- playAnim10:Stop()
- equipsound:Play()
- player.Character.Humanoid.DisplayDistanceType='Viewer'
- maskhandle.Transparency=1
- Handle.Transparency=0
- end
- end
- end)
- --Masking
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement