danielaust

Friska

Apr 15th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. 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
  6.  
  7. local player = game:GetService("Players").LocalPlayer
  8. local char = player.Character
  9. local mouse = player:GetMouse()
  10. local knife = true
  11. local phone = false
  12. local rs = char.Torso["Right Shoulder"]
  13. local activated = false
  14. local Revolver = false
  15. local readyts = true
  16. local dmg = false
  17. local hum = char.Humanoid
  18. local chara = false
  19. local LS = char.Torso["Left Shoulder"]
  20. local RH = char.Torso["Right Hip"]
  21. local LH = char.Torso["Left Hip"]
  22. local RJ = char.HumanoidRootPart.RootJoint
  23. local spinSpecial = false
  24. local slash = false
  25. --------------------------------------------------------[[Settings]]
  26. char.Humanoid.MaxHealth = 200
  27. char.Humanoid.Health = 200
  28. --------------------------------------------------------[[Tools,Sounds]]
  29. local Knife = Instance.new("Part",char)
  30. Knife.Size = Vector3.new(0.2,3,0.8)
  31. Knife.CanCollide = false
  32. mesh = Instance.new("SpecialMesh")
  33. mesh.Parent = Knife
  34. mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
  35. mesh.TextureId = "http://www.roblox.com/asset/?id=358682478"
  36. weld = Instance.new("Weld")
  37. weld.Parent = char
  38. weld.Part0 = char["Right Arm"]
  39. weld.Part1 = Knife
  40. weld.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
  41. local realKnife = Instance.new("Part",char)
  42. realKnife.Size = Vector3.new(0.2,3,0.8)
  43. realKnife.CanCollide = false
  44. meshaa = Instance.new("SpecialMesh")
  45. meshaa.Parent = realKnife
  46. meshaa.MeshId = "http://www.roblox.com/asset/?id=121944778"
  47. meshaa.TextureId = "http://www.roblox.com/asset/?id=362719969"
  48. realKnife.Transparency = 1
  49. weldsa = Instance.new("Weld")
  50. weldsa.Parent = char
  51. weldsa.Part0 = char["Right Arm"]
  52. weldsa.Part1 = realKnife
  53. weldsa.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
  54. local SlashSound = Instance.new("Sound", Knife)
  55. SlashSound.SoundId = "rbxassetid://394934205"
  56. local DamageSound = Instance.new("Sound",Knife)
  57. DamageSound.SoundId = "rbxassetid://388826051"
  58. local Pp = Instance.new("Part",char)
  59. Pp.Size = Vector3.new(0.6,1.1,0.2)
  60. Pp.CanCollide = false
  61. Pp.Transparency = 1
  62. meshphon = Instance.new("SpecialMesh",Pp)
  63. meshphon.MeshId = "http://www.roblox.com/asset/?id=268471347"
  64. meshphon.TextureId = "http://www.roblox.com/asset/?id=270166778"
  65. meshphon.Scale = Vector3.new(1.8,1.8,1)
  66. weld2 = Instance.new("Weld")
  67. weld2.Parent = char
  68. weld2.Part0 = char["Right Arm"]
  69. weld2.Part1 = Pp
  70. weld2.C0 = CFrame.new(0,-0.6,-1) * CFrame.Angles(2,0,3.14)
  71. local revol = Instance.new("Part",char)
  72. revol.Size = Vector3.new(0.2,1.83,1.03)
  73. revol.CanCollide = false
  74. revol.Transparency = 1
  75. local shotSound = Instance.new("Sound",revol)
  76. shotSound.SoundId = "rbxassetid://145080998"
  77. shotSound.PlaybackSpeed = 3
  78. meshrevol = Instance.new("SpecialMesh",revol)
  79. meshrevol.MeshId = "http://www.roblox.com/asset/?id=79401392"
  80. meshrevol.TextureId = "rbxassetid://97889459"
  81. meshrevol.Scale = Vector3.new(1.6,1.6,1.6)
  82. meshrevol.VertexColor = Vector3.new(1,0.9,0)
  83. weld3 = Instance.new("Weld")
  84. weld3.Parent = char
  85. weld3.Part0 = char["Right Arm"]
  86. weld3.Part1 = revol
  87. weld3.C0 = CFrame.new(0,-1.4,-0.3) * CFrame.Angles(3.14,0,0)
  88. music = Instance.new("Sound")
  89. music.Parent = char
  90. music.SoundId = "rbxassetid://399570826"
  91. music.Volume = 2
  92. music.PlaybackSpeed = 1.15
  93. music.Looped = true
  94. laugh = Instance.new("Sound")
  95. laugh.Parent = char
  96. laugh.SoundId = "rbxassetid://319332735"
  97. laugh.Volume = 4
  98. --------------------------------------------------------[[Gui]]
  99. local menu = Instance.new("ScreenGui")
  100. menu.Parent = player.PlayerGui
  101. local Frame = Instance.new("ImageLabel", menu)
  102. Frame.Image = "rbxassetid://48656662"
  103. Frame.Size = UDim2.new(0,200,0,300)
  104. Frame.BackgroundTransparency = 1
  105. Frame.Position = UDim2.new(0,10,0,200)
  106. Frame.Visible = false
  107. local button = Instance.new("TextButton", Frame)
  108. button.Size = UDim2.new(1,-10,0,30)
  109. button.Position = UDim2.new(0,10,0,10)
  110. button.BackgroundTransparency = 1
  111. button.Text = "Revolver(Yellow Soul)"
  112. button.BorderSizePixel = 0
  113. button.TextColor3 = Color3.new(255,255,255)
  114. button.TextStrokeTransparency = 0
  115. button.Font = "SciFi"
  116. button.TextScaled = true
  117. --------------------------------------------------------[[Gui Scripts]]
  118. button.MouseButton1Click:connect(function()
  119. if Revolver == true then
  120. Revolver = false
  121. button.TextColor3 = Color3.new(255,255,255)
  122. elseif Revolver == false then
  123. Revolver = true
  124. button.TextColor3 = Color3.new(255,255,0)
  125. end
  126. end)
  127. --------------------------------------------------------[[Animations]]
  128. slash = Instance.new("Animation",workspace)
  129. slash.AnimationId = "http://www.roblox.com/asset/?id=186934753"
  130. shoot = Instance.new("Animation",workspace)
  131. shoot.AnimationId = "http://www.roblox.com/Asset?ID=95383980"
  132. --------------------------------------------------------[[Damage Functions]]
  133. function DamageObject(hit)
  134. local char=hit.Parent
  135. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
  136. local h=char:FindFirstChild("Humanoid")
  137. if h and h.Health > 0 then
  138. DamageSound:Play()
  139. h:TakeDamage(35)
  140. if h.Health == 0 then
  141. end
  142. dmg = true
  143. wait(1.5)
  144. end
  145. end
  146. end
  147. function shot(hit)
  148. local char=hit.Parent
  149. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
  150. local h=char:FindFirstChild("Humanoid")
  151. if h and h.Health > 0 then
  152. h:TakeDamage(10)
  153. if h.Health == 0 then
  154. end
  155. end
  156. end
  157. end
  158. function CharaDmg(hit)
  159. local char=hit.Parent
  160. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
  161. local h=char:FindFirstChild("Humanoid")
  162. if h and h.Health > 0 then
  163. DamageSound:Play()
  164. h:TakeDamage(105)
  165. if h.Health == 0 then
  166. end
  167. dmg = true
  168. wait(1.5)
  169. end
  170. end
  171. end
  172. --------------------------------------------------------[[Normal Actions]]
  173. mouse.KeyDown:connect(function(key)
  174. Key = key:lower()
  175. if Key == "z" and knife == true and phone == false and chara == false then -- Normal Slash
  176. knife = false
  177. dmg = false
  178. local slashstart = char.Humanoid:LoadAnimation(slash)
  179. Knife.Touched:connect(DamageObject)
  180. slashstart:Play()
  181. SlashSound:Play()
  182. wait(0.76)
  183. knife = true
  184. elseif Key == "c" and knife == true and phone == false and chara == false then -- Phone
  185. knife = false
  186. phone = true
  187. Knife.Transparency = 1
  188. for i = 1,5 do
  189. rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
  190. wait()
  191. end
  192. Frame.Visible = true
  193. Pp.Transparency = 0
  194. local menu = Instance.new("ScreenGui")
  195. menu.Parent = player.PlayerGui
  196. local button = Instance.new("TextButton", menu)
  197. elseif Key == "c" and knife == false and phone == true and Revolver == false and chara == false then -- phone Gui
  198. knife = true
  199. phone = false
  200. for i = 1,5 do
  201. rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
  202. wait()
  203. end
  204. Frame.Visible = false
  205. Knife.Transparency = 0
  206. Pp.Transparency = 1
  207. elseif Key == "c" and Revolver == true and phone == true and chara == false then
  208. phone = false
  209. revol.Transparency = 0
  210. Pp.Transparency = 1
  211. Frame.Visible = false
  212. for i = 1,5 do
  213. rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
  214. wait()
  215. end
  216. elseif Key == "c" and Revolver == true and phone == false and chara == false then
  217. phone = true
  218. Frame.Visible = true
  219. revol.Transparency = 1
  220. Pp.Transparency = 0
  221. for i = 1,5 do
  222. rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
  223. wait()
  224. end
  225. elseif Key == "z" and Revolver == true then -- Revolver Script
  226. local shootstart = char.Humanoid:LoadAnimation(shoot)
  227. if (not readyts) then return end
  228. readyts = false
  229. targ = mouse.Target
  230. if (targ == nil) then
  231. readyts = true
  232. return
  233. end
  234. hum = targ.Parent:findFirstChild("Humanoid")
  235. Hit = mouse.hit
  236. shootstart:Play()
  237. shotSound:Play()
  238. local P = Instance.new("Part",char)
  239. P.Name = "BulletTrail"
  240. local Place0 = revol.CFrame
  241. P.formFactor = 0
  242. P.Size = Vector3.new(0,0,(Place0.p - Hit.p).magnitude)
  243. P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  244. P.Anchored = true
  245. P.CanCollide = false
  246. P.BrickColor = BrickColor.new("White")
  247. P.Touched:connect(shot)
  248. for count = 1, 10 do
  249. P.Transparency = count/10
  250. wait()
  251. end
  252. P:remove()
  253. readyts = true
  254. elseif Key == "b" and chara == false and phone == false and Revolver == false then -- Chara Mode
  255. dmg = false
  256. chara = true
  257. local eye = Instance.new("Part")
  258. eye.Parent = game.Workspace
  259. eye.Size = Vector3.new(0,0,0)
  260. eye.BrickColor = BrickColor.new("Bright red")
  261. eye.Transparency = 0.3
  262. eye.Anchored = true
  263. eye.CanCollide = false
  264. eye.CFrame = char.Head.CFrame * CFrame.new(0.1,0.2,-0.6)
  265. local mesh = Instance.new("SpecialMesh")
  266. mesh.Parent = eye
  267. mesh.MeshType = "Sphere"
  268. char.Torso.Anchored = true
  269. char.Head.face.Parent = char.Humanoid
  270. local charaface = Instance.new("Decal")
  271. charaface.Parent = char.Head
  272. charaface.Texture = "http://www.roblox.com/asset/?id=435233416"
  273. char.Humanoid.MaxHealth = 1000
  274. char.Humanoid.Health = 1000
  275. laugh:Play()
  276. for i = 1,20 do
  277. mesh.Scale = mesh.Scale + Vector3.new(2,0,0)
  278. eye.Transparency = eye.Transparency + 0.035
  279. wait()
  280. end
  281. char.Torso.Anchored = false
  282. char.Humanoid.WalkSpeed = 32
  283. Knife.Touched:connect(CharaDmg)
  284. realKnife.Transparency = 0
  285. Knife.Transparency = 1
  286. music:Play()
  287. elseif Key == "z" and chara == true and knife == true then -- Chara Slash
  288. knife = false
  289. local slashstart = char.Humanoid:LoadAnimation(slash)
  290. slashstart:Play()
  291. SlashSound:Play()
  292. wait(0.1)
  293. knife = true
  294. elseif Key == "b" and chara == true then
  295. chara = false
  296. realKnife.Transparency = 1
  297. Knife.Transparency = 0
  298. music:Stop()
  299. char.Humanoid.WalkSpeed = 16
  300. char.Humanoid.MaxHealth = 200
  301. char.Humanoid.Health = 200
  302. char.Humanoid.face.Parent = char.Head
  303. char.Head.Decal:Destroy()
  304. elseif Key == "f" and knife == true and phone == false and Revolver == false and spinSpecial == false and chara == false then
  305. spinSpecial = true
  306. rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
  307. LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
  308. LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
  309. RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
  310. SlashSound:Play()
  311. Knife.Touched:connect(DamageObject)
  312. for i = 1,24 do
  313. dmg = false
  314. Knife.Touched:connect(DamageObject)
  315. RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
  316. wait(0.008)
  317. end
  318. dmg = true
  319. spinSpecial = false
  320. LH.C0 = LH.C0 * CFrame.new(0,-1,0)
  321. RH.C0 = RH.C0 * CFrame.new(0,-1,0)
  322. LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
  323. RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
  324. rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
  325. LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
  326. elseif Key == "f" and knife == true and chara == true and spinSpecial == false then
  327. spinSpecial = true
  328. rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
  329. LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
  330. LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
  331. RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
  332. SlashSound:Play()
  333. Knife.Touched:connect(CharaDmg)
  334. for i = 1,24 do
  335. dmg = false
  336. Knife.Touched:connect(CharaDmg)
  337. RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
  338. wait(0.008)
  339. end
  340. dmg = true
  341. spinSpecial = false
  342. LH.C0 = LH.C0 * CFrame.new(0,-1,0)
  343. RH.C0 = RH.C0 * CFrame.new(0,-1,0)
  344. LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
  345. RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
  346. rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
  347. LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
  348. end
  349. end)
Add Comment
Please, Sign In to add comment