Advertisement
yougotoof

ar

Dec 30th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.93 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 by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139.  
  140. --FE Bomb Vest Script
  141. --Edited (FE Functions, new Tool Name and different cursor on tool selection) by diminish.
  142. local Me = game:GetService("Players").LocalPlayer --You cannot use this on someone else.
  143. local Char = Me.Character
  144. local Torso = Char.Torso
  145. local TickWait = 1
  146. local Color = "Medium stone gray"
  147. local Dead = false
  148.  
  149. local Tool = Instance.new("HopperBin", Me.Backpack)
  150. Tool.Name = "Bomb Vest"
  151.  
  152. local Position = Vector3.new(0,100,0)
  153. function NewPart(Parent)
  154. local Part = Instance.new("Part", Parent)
  155. Part.CanCollide = false
  156. Part.FormFactor = "Custom"
  157. Part.Position = Position
  158. Part.TopSurface = "Smooth"
  159. Part.BottomSurface = "Smooth"
  160. Part.BrickColor = BrickColor.new(Color)
  161. Position = Position + Vector3.new(0,Part.Size.Y + 10,0)
  162. return Part
  163. end
  164.  
  165. local Model = Char:FindFirstChild("Bomb")
  166. if Model then Model:Destroy() end
  167.  
  168. Model = Instance.new("Model", Char)
  169. Model.Name = "Bomb"
  170.  
  171. local Belt = NewPart(Model)
  172. Belt.Size = Vector3.new(2.2,0.5,1.2)
  173. local Weld = Instance.new("Weld", Belt)
  174. Weld.Part0 = Belt
  175. Weld.Part1 = Torso
  176. Weld.C0 = CFrame.new(0,1.1,0)
  177. local Light = Instance.new("PointLight", Belt)
  178. Light.Range = 15
  179. Light.Brightness = 5
  180. Light.Color = Color3.new(1,0,0)
  181. local Beep = Instance.new("Sound", Belt)
  182. Beep.SoundId = "http://www.roblox.com/asset/?id=188588790"
  183. local ExplodeSound = Instance.new("Sound", Belt)
  184. ExplodeSound.SoundId = "http://www.roblox.com/asset/?id="..(tonumber((math.ceil(1776.66^2)+17).."."..string.rep("36",3))*77)+0.00003 --144507765
  185. ExplodeSound.Pitch = 2.8
  186. ExplodeSound.Volume = 3
  187.  
  188. local Back = NewPart(Model)
  189. Back.Size = Vector3.new(1.5,1.5,0.5)
  190. local Weld = Instance.new("Weld", Back)
  191. Weld.Part0 = Back
  192. Weld.Part1 = Torso
  193. Weld.C0 = CFrame.new(0,0.1,-0.75)
  194.  
  195. local StrapLeft = NewPart(Model)
  196. StrapLeft.Size = Vector3.new(0.2,0.5,1.6)
  197. local Weld = Instance.new("Weld", StrapLeft)
  198. Weld.Part0 = StrapLeft
  199. Weld.Part1 = Torso
  200. Weld.C0 = CFrame.new(0.65,-0.9,-0.2)
  201.  
  202. local BuckleLeft = NewPart(Model)
  203. BuckleLeft.Size = Vector3.new(0.2,1.5,0.2)
  204. local Weld = Instance.new("Weld", BuckleLeft)
  205. Weld.Part0 = BuckleLeft
  206. Weld.Part1 = Torso
  207. Weld.C0 = CFrame.new(0.65,0.1,0.5)
  208.  
  209. local StrapRight = NewPart(Model)
  210. StrapRight.Size = Vector3.new(0.2,0.5,1.6)
  211. local Weld = Instance.new("Weld", StrapRight)
  212. Weld.Part0 = StrapRight
  213. Weld.Part1 = Torso
  214. Weld.C0 = CFrame.new(-0.65,-0.9,-0.2)
  215.  
  216. local BuckleRight = NewPart(Model)
  217. BuckleRight.Size = Vector3.new(0.2,1.5,0.2)
  218. local Weld = Instance.new("Weld", BuckleRight)
  219. Weld.Part0 = BuckleRight
  220. Weld.Part1 = Torso
  221. Weld.C0 = CFrame.new(-0.65,0.1,0.5)
  222.  
  223. Tool.Selected:connect(function(Mouse)
  224. TickWait = 0.3
  225. Mouse.Icon = "http://www.roblox.com/asset/?id=138624642"
  226.  
  227. Mouse.Button1Down:connect(function()
  228. if Dead == false then
  229. Dead = true
  230. ExplodeSound:Play()
  231. wait(1.4)
  232. game:GetService'ReplicatedStorage'.ITEM_PURCHASE:InvokeServer('meme', '8', '1527622')
  233. lp = game:GetService'Players'.LocalPlayer
  234. hat = lp.Character:WaitForChild'meme'
  235. hat.Handle.Transparency=1
  236. hat.Handle.Mesh:Remove()
  237. end
  238. end)
  239. end)
  240.  
  241. Tool.Deselected:connect(function()
  242. TickWait = 1
  243. end)
  244.  
  245. coroutine.wrap(function()
  246. repeat
  247. wait(TickWait)
  248. Light.Enabled = not Light.Enabled
  249. Beep:Play()
  250. until Dead == true
  251. end)()
  252. local grabknife = h
  253. function kill(plrtokill)
  254. --boom--
  255. assets = {540034631, 178993946, 461493477, 110288809}
  256. me = game:GetService'Players'.LocalPlayer.Character:FindFirstChildOfClass'Humanoid'
  257. for i,v in pairs(me.Parent:GetChildren()) do
  258. if v:IsA'Accoutrement' then v.Parent = nil end
  259. end
  260. for i,v in pairs(assets) do
  261. game:GetService'ReplicatedStorage'.ITEM_PURCHASE:InvokeServer('xdd', tostring(game:GetService'MarketplaceService':GetProductInfo(v).AssetTypeId), v)
  262. end
  263. game:GetService'ReplicatedStorage'.ITEM_PURCHASE:InvokeServer('boom', '8', '1527622')
  264. game.Players.LocalPlayer.Character.boom.BootScript.Parent=workspace[plrtokill]
  265. print(workspace[plrtokill] .. " got Bombed")
  266.  
  267. end
  268.  
  269. game:GetService'RunService'.Stepped:wait()
  270. grabknife.Parent = plr.Character
  271. for i = 1,3 do
  272. local lol = lp:FindFirstChildOfClass'Backpack':FindFirstChildOfClass'HopperBin'
  273. if lol:FindFirstChild'LocalScript' then lol:Destroy() end
  274. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement