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;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end wait(1)
- --==MAKING CHARACTER INVISIBLE, FUNCTIONS==--
- local char = game.Players.LocalPlayer.Character
- local pose = "idle"
- local mouse = game.Players.LocalPlayer:GetMouse()
- local BeamStart = nil
- char.Humanoid.WalkSpeed = 0
- char.Animate.Disabled = true
- char.Humanoid:LoadAnimation(char.Animate.idle.Animation1):Play()
- char.Humanoid.WalkSpeed = 22
- function makeBloodParticle(parent)
- local par = Instance.new("ParticleEmitter",parent)
- par.Texture = "http://www.roblox.com/asset/?id=469953941"
- par.RotSpeed = NumberRange.new(1)
- par.Acceleration = Vector3.new(0,-30,0)
- par.Lifetime = NumberRange.new(50)
- par.Rate = 999
- end
- function cleanHead()
- local things = char:GetChildren()
- for i=1, #things do
- if things[i].ClassName == "Accessory" then
- local t = things[i]
- t.Parent = nil
- end
- end
- char.Head:findFirstChildOfClass("Decal").Parent = nil
- end
- function cleanShirt()
- local things = char:GetChildren()
- for i=1, #things do
- if things[i].ClassName == "Shirt" then
- local t = things[i]
- t.Parent = nil
- end
- end
- end
- function cleanPants()
- local things = char:GetChildren()
- for i=1, #things do
- if things[i].ClassName == "Pants" then
- local t = things[i]
- t.Parent = nil
- end
- end
- end
- function cleanPackage()
- local things = char:GetChildren()
- for i=1, #things do
- if things[i].ClassName == "CharacterMesh" then
- local t = things[i]
- t.Parent = nil
- end
- end
- end
- function invisible()
- local things = char:GetChildren()
- for i=1, #things do
- if things[i].ClassName == "Part" then
- local t = things[i]
- t.Transparency = 1
- end
- end
- end
- function rig(motor,C0,C1)
- motor.C0 = C0
- motor.C1 = C1
- end
- function newPart(size,color,material,shape,weldPart,position,parent,ltm)
- local part = Instance.new("Part",parent)
- part.CanCollide = false
- part.Color = color
- part.Material = material
- part.Shape = shape
- part.Size = size
- part.LocalTransparencyModifier = ltm
- local partWeld = Instance.new("Weld",part)
- partWeld.Part0 = weldPart
- partWeld.Part1 = part
- partWeld.C1 = position
- end
- function newMeshPart(size,color,material,shape,weldPart,position,parent)
- local part = Instance.new("Part",parent)
- part.CanCollide = false
- part.Color = color
- part.Material = material
- part.Size = size
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshType = shape
- local partWeld = Instance.new("Weld",part)
- partWeld.Part0 = weldPart
- partWeld.Part1 = part
- partWeld.C1 = position
- end
- cleanHead()
- cleanShirt()
- cleanPants()
- cleanPackage()
- invisible()
- --==NAME TAG==--
- local name = Instance.new("BillboardGui",char.Head)
- name.Size = UDim2.new(3,0,1,0)
- name.LightInfluence = 0
- name.StudsOffset = Vector3.new(0,2,0)
- local nameText = Instance.new("TextLabel",name)
- nameText.Size = UDim2.new(1,0,1,0)
- nameText.BackgroundTransparency = 1
- nameText.TextScaled = true
- nameText.TextStrokeTransparency = 0
- nameText.TextColor3 = Color3.new(0,0,0)
- nameText.TextStrokeColor3 = Color3.new(255,0,0)
- nameText.Text = "Deimos"
- --==CHARATCER==--
- local dm = Instance.new("Model",char)
- dm.Name = "DeimosModel"
- newMeshPart(Vector3.new(1,.8,1.5),Color3.fromRGB(170,170,170),Enum.Material.Metal,Enum.MeshType.Sphere,char["Left Leg"],CFrame.new(0,1,.25)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(1,.8,1.5),Color3.fromRGB(170,170,170),Enum.Material.Metal,Enum.MeshType.Sphere,char["Right Leg"],CFrame.new(0,1,.25)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(2,1.5,1.5),Color3.fromRGB(50,50,50),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
- newMeshPart(Vector3.new(2.1,1.45,1.45),Color3.fromRGB(140,140,140),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
- newMeshPart(Vector3.new(.3,1.55,1.55),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
- newMeshPart(Vector3.new(1.5,1.5,1.5),Color3.fromRGB(50,50,50),Enum.Material.Metal,Enum.MeshType.Sphere,char["Torso"],CFrame.new(0,-.8,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(2,.6,.6),Color3.fromRGB(240,240,240),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
- newMeshPart(Vector3.new(.3,1.6,1.6),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(1,0,-.1)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
- newMeshPart(Vector3.new(1.8,2.4,1.8),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(.2,2.2,1.6),Color3.fromRGB(0,0,0),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,.15)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(1.6,.2,1.6),Color3.fromRGB(0,0,0),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,.15)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(1,1,1),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Right Arm"],CFrame.new(0,1,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(1,1,1),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Left Arm"],CFrame.new(0,1,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(.3,1.8,1.8),Color3.fromRGB(25,25,25),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Head"],CFrame.new(.7,0,.1)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-15),math.rad(90)),dm)
- newMeshPart(Vector3.new(1.6,1,.6),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.8,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(1.4,.4,2),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.6,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
- newMeshPart(Vector3.new(.5,.7,.3),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.6,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(45),math.rad(0)),dm)
- newMeshPart(Vector3.new(.51,.3,.31),Color3.fromRGB(100,100,100),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.35,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(45),math.rad(0)),dm)
- newMeshPart(Vector3.new(.5,.7,.3),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.6,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-45),math.rad(0)),dm)
- newMeshPart(Vector3.new(.51,.3,.31),Color3.fromRGB(100,100,100),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.35,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-45),math.rad(0)),dm)
- --==MUSIC, SOUNDS==--
- local music = Instance.new("Sound",char.Torso)
- music.SoundId = "rbxassetid://281580184"
- music.Volume = 1
- music.Looped = true
- music:Play()
- local shootSound = Instance.new("Sound",char.Head)
- shootSound.SoundId = "rbxassetid://165946560"
- --==RIGGING==--
- rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
- rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
- --==RIGHT GUN==--
- local part = Instance.new("Part",dm)
- part.CanCollide = false
- part.Size = Vector3.new(.8,2,2)
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.MeshId = "rbxassetid://453175434"
- mesh.TextureId = "rbxassetid://453175461"
- mesh.Scale = Vector3.new(.023,.023,.023)
- local bs1 = Instance.new("Attachment",part)
- bs1.Position = Vector3.new(0, 0.6, 1.8)
- BeamStart = bs1
- local partWeld = Instance.new("Weld",part)
- partWeld.Part0 = char["Right Arm"]
- partWeld.Part1 = part
- partWeld.C1 = CFrame.new(0,0,-1.4)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(180),math.rad(0))
- local s1 = Instance.new("Part",dm)
- s1.Transparency = 1
- s1.CanCollide = false
- s1.Size = Vector3.new(.8,.5,.5)
- s1.BrickColor = BrickColor.new('New Yeller')
- local mesh = Instance.new("SpecialMesh",s1)
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- mesh.Scale = Vector3.new(.3,.6,.3)
- local partWeld = Instance.new("Weld",s1)
- partWeld.Part0 = part
- partWeld.Part1 = s1
- partWeld.C1 = CFrame.new(0,-2,.6)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0))
- --==LEFT GUN==--
- local part = Instance.new("Part",dm)
- part.CanCollide = false
- part.Size = Vector3.new(.8,2,2)
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.MeshId = "rbxassetid://453175434"
- mesh.TextureId = "rbxassetid://453175461"
- mesh.Scale = Vector3.new(.023,.023,.023)
- local bs2 = Instance.new("Attachment",part)
- bs2.Position = Vector3.new(0, 0.6, 1.8)
- local partWeld = Instance.new("Weld",part)
- partWeld.Part0 = char["Left Arm"]
- partWeld.Part1 = part
- partWeld.C1 = CFrame.new(0,0,-1.4)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(180),math.rad(0))
- local s2 = Instance.new("Part",dm)
- s2.Transparency = 1
- s2.CanCollide = false
- s2.Size = Vector3.new(.8,.5,.5)
- s2.BrickColor = BrickColor.new('New Yeller')
- local mesh = Instance.new("SpecialMesh",s2)
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- mesh.Scale = Vector3.new(.3,.6,.3)
- local partWeld = Instance.new("Weld",s1)
- partWeld.Part0 = part
- partWeld.Part1 = s2
- partWeld.C1 = CFrame.new(0,-2,.6)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0))
- local d = false
- local shooting = false
- mouse.Button1Down:connect(function()
- shooting = true
- end)
- mouse.Button1Up:connect(function()
- shooting = false
- end)
- while true do
- wait(.01)
- if d == false and shooting == true then
- if BeamStart == bs1 then
- d = true
- shootSound:Play()
- local mp = Instance.new("Part",game.Workspace)
- mp.Locked = true
- mp.Name = "MousePos"
- mp.CFrame = mouse.Hit
- mp.Anchored = true
- mp.Transparency = 1
- mp.Size = Vector3.new(1,1,1)
- local be = Instance.new("Attachment",mp)
- local beam = Instance.new("Beam",mp)
- beam.FaceCamera = true
- beam.Attachment0 = BeamStart
- beam.Attachment1 = be
- rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
- s1.Transparency = 0
- beam.Width0 = .3
- beam.Width1 = .3
- wait(.01)
- rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-135),math.rad(0),math.rad(0)))
- s1.Transparency = .3
- beam.Width0 = .2
- beam.Width1 = .2
- wait(.01)
- rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
- s1.Transparency = .6
- beam.Width0 = .1
- beam.Width1 = .1
- wait(.01)
- rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
- s1.Transparency = 1
- mp.Parent = nil
- BeamStart = bs2
- d = false
- elseif BeamStart == bs2 then
- d = true
- shootSound:Play()
- local mp = Instance.new("Part",game.Workspace)
- mp.Locked = true
- mp.Name = "MousePos"
- mp.CFrame = mouse.Hit
- mp.Anchored = true
- mp.Transparency = 1
- mp.Size = Vector3.new(1,1,1)
- local be = Instance.new("Attachment",mp)
- local beam = Instance.new("Beam",mp)
- beam.FaceCamera = true
- beam.Attachment0 = BeamStart
- beam.Attachment1 = be
- rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
- s2.Transparency = 0
- beam.Width0 = .3
- beam.Width1 = .3
- wait(.01)
- rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-135),math.rad(0),math.rad(0)))
- s2.Transparency = .3
- beam.Width0 = .2
- beam.Width1 = .2
- wait(.01)
- rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
- s2.Transparency = .6
- beam.Width0 = .1
- beam.Width1 = .1
- wait(.01)
- rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
- s2.Transparency = 1
- mp.Parent = nil
- BeamStart = bs1
- d = false
- end
- local target = mouse.Target
- if target ~= nil then
- local h = target.Parent:findFirstChildOfClass("Humanoid")
- if h ~= nil then
- h.Health = 0
- h.MaxHealth = 1
- makeBloodParticle(target)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement