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
- local player = game:GetService("Players").LocalPlayer
- local char = player.Character
- local mouse = player:GetMouse()
- local knife = true
- local phone = false
- local rs = char.Torso["Right Shoulder"]
- local activated = false
- local Revolver = false
- local readyts = true
- local dmg = false
- local hum = char.Humanoid
- local chara = false
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local RJ = char.HumanoidRootPart.RootJoint
- local spinSpecial = false
- local slash = false
- --------------------------------------------------------[[Settings]]
- char.Humanoid.MaxHealth = 200
- char.Humanoid.Health = 200
- --------------------------------------------------------[[Tools,Sounds]]
- local Knife = Instance.new("Part",char)
- Knife.Size = Vector3.new(0.2,3,0.8)
- Knife.CanCollide = false
- mesh = Instance.new("SpecialMesh")
- mesh.Parent = Knife
- mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
- mesh.TextureId = "http://www.roblox.com/asset/?id=358682478"
- weld = Instance.new("Weld")
- weld.Parent = char
- weld.Part0 = char["Right Arm"]
- weld.Part1 = Knife
- weld.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
- local realKnife = Instance.new("Part",char)
- realKnife.Size = Vector3.new(0.2,3,0.8)
- realKnife.CanCollide = false
- meshaa = Instance.new("SpecialMesh")
- meshaa.Parent = realKnife
- meshaa.MeshId = "http://www.roblox.com/asset/?id=121944778"
- meshaa.TextureId = "http://www.roblox.com/asset/?id=362719969"
- realKnife.Transparency = 1
- weldsa = Instance.new("Weld")
- weldsa.Parent = char
- weldsa.Part0 = char["Right Arm"]
- weldsa.Part1 = realKnife
- weldsa.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
- local SlashSound = Instance.new("Sound", Knife)
- SlashSound.SoundId = "rbxassetid://394934205"
- local DamageSound = Instance.new("Sound",Knife)
- DamageSound.SoundId = "rbxassetid://388826051"
- local Pp = Instance.new("Part",char)
- Pp.Size = Vector3.new(0.6,1.1,0.2)
- Pp.CanCollide = false
- Pp.Transparency = 1
- meshphon = Instance.new("SpecialMesh",Pp)
- meshphon.MeshId = "http://www.roblox.com/asset/?id=268471347"
- meshphon.TextureId = "http://www.roblox.com/asset/?id=270166778"
- meshphon.Scale = Vector3.new(1.8,1.8,1)
- weld2 = Instance.new("Weld")
- weld2.Parent = char
- weld2.Part0 = char["Right Arm"]
- weld2.Part1 = Pp
- weld2.C0 = CFrame.new(0,-0.6,-1) * CFrame.Angles(2,0,3.14)
- local revol = Instance.new("Part",char)
- revol.Size = Vector3.new(0.2,1.83,1.03)
- revol.CanCollide = false
- revol.Transparency = 1
- local shotSound = Instance.new("Sound",revol)
- shotSound.SoundId = "rbxassetid://145080998"
- shotSound.PlaybackSpeed = 3
- meshrevol = Instance.new("SpecialMesh",revol)
- meshrevol.MeshId = "http://www.roblox.com/asset/?id=79401392"
- meshrevol.TextureId = "rbxassetid://97889459"
- meshrevol.Scale = Vector3.new(1.6,1.6,1.6)
- meshrevol.VertexColor = Vector3.new(1,0.9,0)
- weld3 = Instance.new("Weld")
- weld3.Parent = char
- weld3.Part0 = char["Right Arm"]
- weld3.Part1 = revol
- weld3.C0 = CFrame.new(0,-1.4,-0.3) * CFrame.Angles(3.14,0,0)
- music = Instance.new("Sound")
- music.Parent = char
- music.SoundId = "rbxassetid://399570826"
- music.Volume = 2
- music.PlaybackSpeed = 1.15
- music.Looped = true
- laugh = Instance.new("Sound")
- laugh.Parent = char
- laugh.SoundId = "rbxassetid://319332735"
- laugh.Volume = 4
- --------------------------------------------------------[[Gui]]
- local menu = Instance.new("ScreenGui")
- menu.Parent = player.PlayerGui
- local Frame = Instance.new("ImageLabel", menu)
- Frame.Image = "rbxassetid://48656662"
- Frame.Size = UDim2.new(0,200,0,300)
- Frame.BackgroundTransparency = 1
- Frame.Position = UDim2.new(0,10,0,200)
- Frame.Visible = false
- local button = Instance.new("TextButton", Frame)
- button.Size = UDim2.new(1,-10,0,30)
- button.Position = UDim2.new(0,10,0,10)
- button.BackgroundTransparency = 1
- button.Text = "Revolver(Yellow Soul)"
- button.BorderSizePixel = 0
- button.TextColor3 = Color3.new(255,255,255)
- button.TextStrokeTransparency = 0
- button.Font = "SciFi"
- button.TextScaled = true
- --------------------------------------------------------[[Gui Scripts]]
- button.MouseButton1Click:connect(function()
- if Revolver == true then
- Revolver = false
- button.TextColor3 = Color3.new(255,255,255)
- elseif Revolver == false then
- Revolver = true
- button.TextColor3 = Color3.new(255,255,0)
- end
- end)
- --------------------------------------------------------[[Animations]]
- slash = Instance.new("Animation",workspace)
- slash.AnimationId = "http://www.roblox.com/asset/?id=186934753"
- shoot = Instance.new("Animation",workspace)
- shoot.AnimationId = "http://www.roblox.com/Asset?ID=95383980"
- --------------------------------------------------------[[Damage Functions]]
- function DamageObject(hit)
- local char=hit.Parent
- if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
- local h=char:FindFirstChild("Humanoid")
- if h and h.Health > 0 then
- DamageSound:Play()
- h:TakeDamage(35)
- if h.Health == 0 then
- end
- dmg = true
- wait(1.5)
- end
- end
- end
- function shot(hit)
- local char=hit.Parent
- if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
- local h=char:FindFirstChild("Humanoid")
- if h and h.Health > 0 then
- h:TakeDamage(10)
- if h.Health == 0 then
- end
- end
- end
- end
- function CharaDmg(hit)
- local char=hit.Parent
- if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
- local h=char:FindFirstChild("Humanoid")
- if h and h.Health > 0 then
- DamageSound:Play()
- h:TakeDamage(105)
- if h.Health == 0 then
- end
- dmg = true
- wait(1.5)
- end
- end
- end
- --------------------------------------------------------[[Normal Actions]]
- mouse.KeyDown:connect(function(key)
- Key = key:lower()
- if Key == "z" and knife == true and phone == false and chara == false then -- Normal Slash
- knife = false
- dmg = false
- local slashstart = char.Humanoid:LoadAnimation(slash)
- Knife.Touched:connect(DamageObject)
- slashstart:Play()
- SlashSound:Play()
- wait(0.76)
- knife = true
- elseif Key == "c" and knife == true and phone == false and chara == false then -- Phone
- knife = false
- phone = true
- Knife.Transparency = 1
- for i = 1,5 do
- rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
- wait()
- end
- Frame.Visible = true
- Pp.Transparency = 0
- local menu = Instance.new("ScreenGui")
- menu.Parent = player.PlayerGui
- local button = Instance.new("TextButton", menu)
- elseif Key == "c" and knife == false and phone == true and Revolver == false and chara == false then -- phone Gui
- knife = true
- phone = false
- for i = 1,5 do
- rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
- wait()
- end
- Frame.Visible = false
- Knife.Transparency = 0
- Pp.Transparency = 1
- elseif Key == "c" and Revolver == true and phone == true and chara == false then
- phone = false
- revol.Transparency = 0
- Pp.Transparency = 1
- Frame.Visible = false
- for i = 1,5 do
- rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
- wait()
- end
- elseif Key == "c" and Revolver == true and phone == false and chara == false then
- phone = true
- Frame.Visible = true
- revol.Transparency = 1
- Pp.Transparency = 0
- for i = 1,5 do
- rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
- wait()
- end
- elseif Key == "z" and Revolver == true then -- Revolver Script
- local shootstart = char.Humanoid:LoadAnimation(shoot)
- if (not readyts) then return end
- readyts = false
- targ = mouse.Target
- if (targ == nil) then
- readyts = true
- return
- end
- hum = targ.Parent:findFirstChild("Humanoid")
- Hit = mouse.hit
- shootstart:Play()
- shotSound:Play()
- local P = Instance.new("Part",char)
- P.Name = "BulletTrail"
- local Place0 = revol.CFrame
- P.formFactor = 0
- P.Size = Vector3.new(0,0,(Place0.p - Hit.p).magnitude)
- P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
- P.Anchored = true
- P.CanCollide = false
- P.BrickColor = BrickColor.new("White")
- P.Touched:connect(shot)
- for count = 1, 10 do
- P.Transparency = count/10
- wait()
- end
- P:remove()
- readyts = true
- elseif Key == "b" and chara == false and phone == false and Revolver == false then -- Chara Mode
- dmg = false
- chara = true
- local eye = Instance.new("Part")
- eye.Parent = game.Workspace
- eye.Size = Vector3.new(0,0,0)
- eye.BrickColor = BrickColor.new("Bright red")
- eye.Transparency = 0.3
- eye.Anchored = true
- eye.CanCollide = false
- eye.CFrame = char.Head.CFrame * CFrame.new(0.1,0.2,-0.6)
- local mesh = Instance.new("SpecialMesh")
- mesh.Parent = eye
- mesh.MeshType = "Sphere"
- char.Torso.Anchored = true
- char.Head.face.Parent = char.Humanoid
- local charaface = Instance.new("Decal")
- charaface.Parent = char.Head
- charaface.Texture = "http://www.roblox.com/asset/?id=435233416"
- char.Humanoid.MaxHealth = 1000
- char.Humanoid.Health = 1000
- laugh:Play()
- for i = 1,20 do
- mesh.Scale = mesh.Scale + Vector3.new(2,0,0)
- eye.Transparency = eye.Transparency + 0.035
- wait()
- end
- char.Torso.Anchored = false
- char.Humanoid.WalkSpeed = 32
- Knife.Touched:connect(CharaDmg)
- realKnife.Transparency = 0
- Knife.Transparency = 1
- music:Play()
- elseif Key == "z" and chara == true and knife == true then -- Chara Slash
- knife = false
- local slashstart = char.Humanoid:LoadAnimation(slash)
- slashstart:Play()
- SlashSound:Play()
- wait(0.1)
- knife = true
- elseif Key == "b" and chara == true then
- chara = false
- realKnife.Transparency = 1
- Knife.Transparency = 0
- music:Stop()
- char.Humanoid.WalkSpeed = 16
- char.Humanoid.MaxHealth = 200
- char.Humanoid.Health = 200
- char.Humanoid.face.Parent = char.Head
- char.Head.Decal:Destroy()
- elseif Key == "f" and knife == true and phone == false and Revolver == false and spinSpecial == false and chara == false then
- spinSpecial = true
- rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
- LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
- LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
- RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
- SlashSound:Play()
- Knife.Touched:connect(DamageObject)
- for i = 1,24 do
- dmg = false
- Knife.Touched:connect(DamageObject)
- RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
- wait(0.008)
- end
- dmg = true
- spinSpecial = false
- LH.C0 = LH.C0 * CFrame.new(0,-1,0)
- RH.C0 = RH.C0 * CFrame.new(0,-1,0)
- LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
- RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
- rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
- LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
- elseif Key == "f" and knife == true and chara == true and spinSpecial == false then
- spinSpecial = true
- rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
- LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
- LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
- RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
- SlashSound:Play()
- Knife.Touched:connect(CharaDmg)
- for i = 1,24 do
- dmg = false
- Knife.Touched:connect(CharaDmg)
- RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
- wait(0.008)
- end
- dmg = true
- spinSpecial = false
- LH.C0 = LH.C0 * CFrame.new(0,-1,0)
- RH.C0 = RH.C0 * CFrame.new(0,-1,0)
- LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
- RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
- rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
- LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
- end
- end)
Add Comment
Please, Sign In to add comment