Guest User

Untitled

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