Sazious

kys

Feb 3rd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9.  
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29.  
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37.  
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40.  
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49.  
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80.  
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85. local h,t
  86.  
  87. local HB = game:GetService("RunService").Heartbeat
  88. while true do
  89. if h~=Mouse.Hit or t~=Mouse.Target then
  90. h,t=Mouse.Hit,Mouse.Target
  91. Event:FireServer({isMouse=true,Target=t,Hit=h})
  92. end
  93.  
  94. for i=1,2 do
  95. HB:Wait()
  96. end
  97. end]==],script)
  98.  
  99.  
  100. local RealGame = game
  101.  
  102. local FakeService_Metatable = {
  103. __index = function(self,k)
  104. local s = rawget(self,"_RealService")
  105. if s then
  106. return typeof(s[k])=="function"
  107. and function(_,...)return s[k](s,...)end or s[k]
  108. end
  109. end,
  110. __newindex = function(self,k,v)
  111. local s = rawget(self,"_RealService")
  112. if s then s[k]=v end
  113. end
  114. }
  115. local function FakeService(t,RealService)
  116. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  117. return setmetatable(t,FakeService_Metatable)
  118. end
  119.  
  120.  
  121. local FakeGame = {
  122. GetService = function(self,s)
  123. return rawget(self,s) or RealGame:GetService(s)
  124. end,
  125. Players = FakeService({
  126. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  127. },"Players"),
  128. UserInputService = FakeService(UIS,"UserInputService"),
  129. ContextActionService = FakeService(CAS,"ContextActionService"),
  130. RunService = FakeService({
  131. _btrs = {},
  132. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  133. BindToRenderStep = function(self,name,_,fun)
  134. self._btrs[name] = self.Heartbeat:Connect(fun)
  135. end,
  136. UnbindFromRenderStep = function(self,name)
  137. self._btrs[name]:Disconnect()
  138. end,
  139. },"RunService")
  140. }
  141. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  142. FakeGame.service = FakeGame.GetService
  143. FakeService(FakeGame,game)
  144.  
  145. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  146. end
  147.  
  148.  
  149. debounce = 0;
  150.  
  151.  
  152.  
  153.  
  154. local player = game.Players.LocalPlayer
  155. repeat wait() until player.Character.Humanoid
  156. local humanoid = player.Character.Humanoid
  157. local mouse = player:GetMouse()
  158.  
  159. local player=game.Players.LocalPlayer;
  160. local char=game.Players.LocalPlayer.Character;
  161. local humanoid = player.Character.Humanoid;
  162. Tool=Instance.new('Tool', game.Players.LocalPlayer.Backpack);
  163. Tool.GripRight=Vector3.new(-0.816, 0, 0.577);
  164. Tool.GripUp=Vector3.new(-0.027, 0.996, -0.089);
  165. Tool.GripPos=Vector3.new(-0.3, -0.4, 0.4);
  166. Tool.GripForward=Vector3.new(-1, 0, -0);
  167. Tool.Name='kys';
  168. Handle=Instance.new('Part', Tool);
  169. Handle.Name = 'Handle';
  170. Handle.BrickColor=BrickColor.new('Really black')
  171. Handle.Size=Vector3.new(0.26, 1.11, 4.85);
  172. Handle.Position=Vector3.new(-18.53, 0.555, -16.825)
  173. gunfire=Instance.new('Part', Tool)
  174. gunfire.Name='GunFire'
  175. gunfire.Size=Vector3.new(0.2, 0.2, 0.2)
  176. gunfire.Transparency=1
  177. gunfire.Position=Vector3.new(-18.56, 1.1, -19.35)
  178. gunfirefx=Instance.new('BillboardGui', gunfire)
  179. gunfirefx.Enabled=false
  180. gunfirefx.Adornee = gunfire
  181. gunfirefx.Size=UDim2.new(1.1, 0, 1.1, 0)
  182. gunfirefx2=Instance.new('ImageLabel', gunfirefx)
  183. gunfirefx2.Image='http://www.roblox.com/asset/?id=117472237'
  184. gunfirefx2.BackgroundTransparency=1
  185. gunfirefx2.Size=UDim2.new(1.2, 0, 1.2, 0)
  186.  
  187. shootsound=Instance.new('Sound', char.Torso)
  188. shootsound.Volume=8
  189. shootsound.SoundId='rbxassetid://230622620'
  190. c4mesh=Instance.new('SpecialMesh', Handle);
  191. c4mesh.MeshType = 'FileMesh';
  192. c4mesh.MeshId='http://www.roblox.com/asset/?id=95356090';
  193. c4mesh.TextureId='http://www.roblox.com/asset/?id=95387789';
  194. c4mesh.Scale=Vector3.new(1.8, 1.8, 1.8);
  195.  
  196. local anim5 = Instance.new("Animation", player.Character)
  197. anim5.AnimationId = "http://www.roblox.com/asset/?id=95383474"
  198. local playAnim10 = humanoid:LoadAnimation(anim5)
  199.  
  200. Tool.GripRight=Vector3.new(-0.816, 0, 0.577)
  201.  
  202. function equipped()
  203. wait()
  204. playAnim10:Play()
  205. end
  206.  
  207. function unequipped()
  208. wait()
  209. playAnim10:Stop()
  210. end
  211.  
  212. Tool.Equipped:connect(equipped)
  213. Tool.Unequipped:connect(unequipped)
  214.  
  215. light=Instance.new('PointLight', Handle);
  216. light.Color = Color3.new(255, 255, 0)
  217. light.Range=10;
  218. light.Enabled=false;
  219.  
  220.  
  221. function Shoot()
  222. shootsound:Play()
  223. light.Enabled=true
  224. wait(0.1)
  225. light.Enabled=false
  226. player.Character.Humanoid.Health=0
  227. wait()
  228. Tool:Destroy()
  229. end
  230. Tool.Activated:connect(Shoot)
  231.  
  232.  
  233.  
  234. print("Loaded.")
  235.  
  236.  
  237. Character = player.Character
  238. Humanoid = Character.Humanoid
  239. Torso = Character.Torso
  240. mode = Instance.new("Model")
  241. mode.Name = ""
  242. mode.Parent = game.Workspace
  243.  
  244. function OnDeath()
  245.  
  246. print("Death")
  247. wait(0.00000001)
  248. Humanoid.Parent = nil
  249. if Torso then
  250. zam=Torso:Clone()
  251. zam.Parent=mode
  252. x=Character:GetChildren()
  253. for i=1,#x do
  254. if ((x[i].Name=="Shirt") or (x[i].Name=="Pants")) then
  255. local zor=x[i]:Clone()
  256. zor.Parent=mode
  257. end
  258. if x[i].Name=="Head" then
  259. local zem=x[i]:Clone()
  260. zem.Parent=mode
  261. local Neck = Instance.new("Weld")
  262. Neck.Name = "Neck"
  263. Neck.Part0 = zam
  264. Neck.Part1 = zem
  265. Neck.C0 = CFrame.new(0, 1.5, 0)
  266. Neck.C1 = CFrame.new()
  267. Neck.Parent = zam
  268. end
  269. if x[i].Name=="Right Arm" then
  270. local Limb=x[i]:Clone()
  271. Limb.Parent=mode
  272. Limb.CFrame = zam.CFrame * CFrame.new(1.5, 0, 0)
  273. local Joint = Instance.new("Glue")
  274. Joint.Name = "RightShoulder"
  275. Joint.Part0 = zam
  276. Joint.Part1 = Limb
  277. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  278. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  279. Joint.Parent = zam
  280.  
  281. local B = Instance.new("Part")
  282. B.TopSurface = 0
  283. B.BottomSurface = 0
  284. B.formFactor = "Symmetric"
  285. B.Size = Vector3.new(1, 1, 1)
  286. B.Transparency = 1
  287. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  288. B.Parent = mode
  289. local W = Instance.new("Weld")
  290. W.Part0 = Limb
  291. W.Part1 = B
  292. W.C0 = CFrame.new(0, -0.5, 0)
  293. W.Parent = Limb
  294.  
  295. end
  296. if x[i].Name=="Left Arm" then
  297. local Limb=x[i]:Clone()
  298. Limb.Parent=mode
  299.  
  300. Limb.CFrame = zam.CFrame * CFrame.new(-1.5, 0, 0)
  301. local Joint = Instance.new("Glue")
  302. Joint.Name = "LeftShoulder"
  303. Joint.Part0 = zam
  304. Joint.Part1 = Limb
  305. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  306. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  307. Joint.Parent = zam
  308.  
  309. local B = Instance.new("Part")
  310. B.TopSurface = 0
  311. B.BottomSurface = 0
  312. B.formFactor = "Symmetric"
  313. B.Size = Vector3.new(1, 1, 1)
  314. B.Transparency = 1
  315. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  316. B.Parent = mode
  317. local W = Instance.new("Weld")
  318. W.Part0 = Limb
  319. W.Part1 = B
  320. W.C0 = CFrame.new(0, -0.5, 0)
  321. W.Parent = Limb
  322.  
  323. end
  324. if x[i].Name=="Right Leg" then
  325. local Limb=x[i]:Clone()
  326. Limb.Parent=mode
  327.  
  328. Limb.CFrame = zam.CFrame * CFrame.new(0.5, -2, 0)
  329. local Joint = Instance.new("Glue")
  330. Joint.Name = "RightHip"
  331. Joint.Part0 = zam
  332. Joint.Part1 = Limb
  333. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  334. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  335. Joint.Parent = zam
  336.  
  337. local B = Instance.new("Part")
  338. B.TopSurface = 0
  339. B.BottomSurface = 0
  340. B.formFactor = "Symmetric"
  341. B.Size = Vector3.new(1, 1, 1)
  342. B.Transparency = 1
  343. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  344. B.Parent = mode
  345. local W = Instance.new("Weld")
  346. W.Part0 = Limb
  347. W.Part1 = B
  348. W.C0 = CFrame.new(0, -0.5, 0)
  349. W.Parent = Limb
  350.  
  351. end
  352. if x[i].Name=="Left Leg" then
  353. local Limb=x[i]:Clone()
  354. Limb.Parent=mode
  355.  
  356. Limb.CFrame = zam.CFrame * CFrame.new(-0.5, -2, 0)
  357. local Joint = Instance.new("Glue")
  358. Joint.Name = "LeftHip"
  359. Joint.Part0 = zam
  360. Joint.Part1 = Limb
  361. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  362. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  363. Joint.Parent = zam
  364.  
  365. local B = Instance.new("Part")
  366. B.TopSurface = 0
  367. B.BottomSurface = 0
  368. B.formFactor = "Symmetric"
  369. B.Size = Vector3.new(1, 1, 1)
  370. B.Transparency = 1
  371. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  372. B.Parent = mode
  373. local W = Instance.new("Weld")
  374. W.Part0 = Limb
  375. W.Part1 = B
  376. W.C0 = CFrame.new(0, -0.5, 0)
  377. W.Parent = Limb
  378.  
  379. end
  380. bland=Instance.new("Humanoid")
  381. bland.Health = 0
  382. bland.MaxHealth = 0
  383. bland.Parent=mode
  384. if ((x[i].Name=="Shirt") or (x[i].Name=="Pants")) then
  385. local zor=x[i]:Clone()
  386. zor.Parent=mode
  387. end
  388.  
  389. if (x[i].ClassName=="CharacterMesh") then
  390. local zor=x[i]:Clone()
  391. zor.Parent=mode
  392. end
  393. if (x[i].ClassName=="Hat") then
  394. local zor=x[i]:Clone()
  395. zor.Parent=mode
  396. end
  397. local cam = Instance.new("Camera")
  398. cam.Parent = game.Players:FindFirstChild(Character.Name)
  399. cam.CameraSubject = mode.Humanoid
  400. local Bar = Instance.new("Part")
  401. Bar.TopSurface = 0
  402. Bar.BottomSurface = 0
  403. Bar.formFactor = "Symmetric"
  404. Bar.Size = Vector3.new(1, 1, 1)
  405. Bar.Transparency = 1
  406. Bar.CFrame = zam.CFrame * CFrame.new(0, 0.5, 0)
  407. Bar.Parent = mode
  408. local Weld = Instance.new("Weld")
  409. Weld.Part0 = zam
  410. Weld.Part1 = Bar
  411. Weld.C0 = CFrame.new(0, 0.5, 0)
  412. Weld.Parent = zam
  413.  
  414. end
  415. end
  416. wait()
  417. Character:Remove()
  418. wait(6)
  419. mode:Destroy()
  420. end
  421.  
  422. Humanoid.Died:connect(OnDeath)
Advertisement
Add Comment
Please, Sign In to add comment