Advertisement
reset234567890

Untitled

Jun 20th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.18 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) 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 self[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. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. me = game.Players.LocalPlayer
  148. walkspeed = 35
  149. walkspeed2 = 16
  150. WaitTime = 0.01
  151. WaitTime2 = 0.41
  152. WaitTime3 = 3
  153. god = false
  154. fakeff = false -- don't enable if god is enabled. it won't break, they both basically god you, but fakeff has a cooler effect.
  155.  
  156. h = Instance.new("HopperBin")
  157. h.Parent = me.Backpack
  158. h.Name = "VaporGun v3"
  159.  
  160. sp = game.Players.LocalPlayer.Backpack["VaporGun v3"]
  161.  
  162.  
  163. rightarm = me.Character["Right Arm"]
  164. leftarm = me.Character["Left Arm"]
  165.  
  166. hold = false
  167. using = false
  168. holdkey = false
  169.  
  170. right = Instance.new("Weld")
  171. right.Parent = me.Character.Torso
  172. right.Part0 = nil
  173. right.Part1 = nil
  174. right.C1 = CFrame.fromEulerAnglesXYZ(-1.57,-0.4,0) * CFrame.new(-1,-0.5,0.1)
  175.  
  176. left = Instance.new("Weld")
  177. left.Parent = me.Character.Torso
  178. left.Part0 = nil
  179. left.Part1 = nil
  180. left.C1 = CFrame.fromEulerAnglesXYZ(-1.4,0.5,0) * CFrame.new(0.55,-0.4,1.3)
  181.  
  182.  
  183. bulletcolors = {"Hot pink", "Really red", "Really blue", "New Yeller", "Lime green", "Neon orange"}
  184.  
  185. gun = Instance.new("Model")
  186. gun.Parent = game.Lighting
  187. gun.Name = "Gun"
  188.  
  189. handle = Instance.new("Part")
  190. handle.Parent = gun
  191. handle.formFactor = 0
  192. handle.Size = Vector3.new(1,1,1)
  193. handle.BrickColor = BrickColor.random()
  194. mesh = Instance.new("SpecialMesh")
  195. mesh.Parent = handle
  196. mesh.MeshType = "Brick"
  197. mesh.Scale = Vector3.new(0.5,0.75,1.6)
  198.  
  199. handle2 = Instance.new("Part")
  200. handle2.Parent = gun
  201. handle2.formFactor = 0
  202. handle2.Size = Vector3.new(1,1,1)
  203. handle2.BrickColor = BrickColor.random()
  204. mesh2 = mesh:clone()
  205. mesh2.Parent = handle2
  206. mesh2.Scale = Vector3.new(0.6,3.6,0.75)
  207.  
  208. handle3 = Instance.new("Part")
  209. handle3.Parent = gun
  210. handle3.formFactor = 0
  211. handle3.Size = Vector3.new(1,1,1)
  212. handle3.BrickColor = BrickColor.random()
  213. mesh3 = mesh:clone()
  214. mesh3.Parent = handle3
  215. mesh3.Scale = Vector3.new(.45,.11,2)
  216.  
  217. handle4 = Instance.new("Part")
  218. handle4.Parent = gun
  219. handle4.formFactor = 0
  220. handle4.Size = Vector3.new(.1,.1,.1)
  221. handle4.BrickColor = BrickColor.random()
  222. mesh4 = Instance.new("CylinderMesh")
  223. mesh4.Parent = handle4
  224. mesh4.Scale = Vector3.new(.4,4,.3)
  225. hold = false
  226.  
  227. if god == true then
  228. me.Character.Humanoid.MaxHealth = math.huge
  229. end
  230. if fakeff == true then
  231. select=Instance.new("SelectionBox",me.Character.Head)
  232. select1=Instance.new("SelectionBox",me.Character.Torso)
  233. select2=Instance.new("SelectionBox",me.Character["Right Arm"])
  234. select3=Instance.new("SelectionBox",me.Character["Left Arm"])
  235. select4=Instance.new("SelectionBox",me.Character["Left Leg"])
  236. select5=Instance.new("SelectionBox",me.Character["Right Leg"])
  237. select.Adornee=me.Character.Head
  238. select1.Adornee=me.Character.Torso
  239. select2.Adornee=me.Character["Right Arm"]
  240. select3.Adornee=me.Character["Left Arm"]
  241. select4.Adornee=me.Character["Left Leg"]
  242. select5.Adornee=me.Character["Right Leg"]
  243. me.Character.Humanoid.MaxHealth=math.huge
  244. end
  245.  
  246. function selected(mouse, key)
  247. right.Part0 = right.Parent
  248. right.Part1 = rightarm
  249. left.Part0 = left.Parent
  250. left.Part1 = leftarm
  251. left.C1 = CFrame.fromEulerAnglesXYZ(-1.4,0.5,0) * CFrame.new(0.55,-0.4,1.3)
  252. right.C1 = CFrame.fromEulerAnglesXYZ(-1.57,-0.4,0) * CFrame.new(-1,-0.5,0.1)
  253. left.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  254. right.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  255. gun.Parent = me.Character
  256. gunweld1 = Instance.new("Weld")
  257. gunweld1.Parent = rightarm
  258. gunweld1.Part0 = gunweld1.Parent
  259. gunweld1.Part1 = handle
  260. gunweld1.C1 = CFrame.fromEulerAnglesXYZ(0.4,0,0) * CFrame.new(0,1,0)
  261. gunweld2 = Instance.new("Weld")
  262. gunweld2.Parent = handle
  263. gunweld2.Part0 = gunweld2.Parent
  264. gunweld2.Part1 = handle2
  265. gunweld2.C1 = CFrame.fromEulerAnglesXYZ(-0.4,0,0) * CFrame.new(0,1,1.2)
  266. gunweld3 = Instance.new("Weld")
  267. gunweld3.Parent = handle2
  268. gunweld3.Part0 = gunweld3.Parent
  269. gunweld3.Part1 = handle3
  270. gunweld3.C1 = CFrame.fromEulerAnglesXYZ(-0.3,0,0) * CFrame.new(0,0.3,-0.9)
  271. gunweld4 = Instance.new("Weld")
  272. gunweld4.Parent = handle2
  273. gunweld4.Part0 = gunweld3.Parent
  274. gunweld4.Part1 = handle4
  275. gunweld4.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,1.751,0)
  276. mouse.Button1Down:connect(function()
  277. zmeme = Instance.new("Sound",handle4)
  278. zmeme.SoundId = "rbxassetid://479049474"
  279. zmeme.Volume = 100
  280. zmeme.Looped = true
  281. zmeme:Play()
  282. hold = true
  283. while hold == true do
  284. wait(0.04)
  285. local color = math.random(1, #bulletcolors)
  286. local wkspd = walkspeed
  287. local pos = mouse.Hit.p + Vector3.new(math.random(-2,2),0,math.random(-2,2))
  288. local BamOne = Instance.new("Sound",handle4)
  289. BamOne.Pitch,BamOne.Volume,BamOne.SoundId = 1.4,100,"rbxassetid://2920959"
  290. local BamTwo = Instance.new("Sound",handle4)
  291. BamTwo.Pitch,BamTwo.Volume,BamTwo.SoundId = 1.4,100,"rbxassetid://2920959"
  292. local bullet = Instance.new("Part")
  293. bullet.Parent = workspace
  294. bullet.formFactor = 0
  295. bullet.Size = Vector3.new(1,1,1)
  296. bullet.BrickColor = BrickColor.new(bulletcolors[color])
  297. bullet.CanCollide = false
  298. bullet.Anchored = true
  299. bullet.CFrame = CFrame.new((handle4.Position + pos)/2, pos)
  300. local distance = (handle4.Position - pos).magnitude
  301. local bulletmesh = Instance.new("SpecialMesh")
  302. bulletmesh.Parent = bullet
  303. bulletmesh.MeshType = "Brick"
  304. bulletmesh.Scale = Vector3.new(0.2,0.2,distance)
  305. if mouse.Target ~= nil then
  306. local hu = mouse.Target.Parent:findFirstChild("Humanoid")
  307. if hu ~= nil then
  308. hu.Health = hu.Health - 10
  309. if hu.Health == 0 then
  310. vape = Instance.new("Sound",hu.Parent.Head)
  311. vape.SoundId = "rbxassetid://479081073"
  312. vape.Volume = 100
  313. vape:Play()
  314. wait(2.28)
  315. vape:Destroy()
  316. end
  317. end
  318. end
  319. coroutine.resume(coroutine.create(function()
  320. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(0.12,0,0)
  321. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(0.12,0,0)
  322. wait()
  323. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(-0.12,0,0)
  324. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(-0.12,0,0)
  325. wait(0.03)
  326. bullet:remove()
  327. end))
  328. end
  329. end)
  330. mouse.Button1Up:connect(function()
  331. zmeme:Pause()
  332. zmeme:Destroy()
  333. hold = false
  334. end)
  335. local Gui = Instance.new("ScreenGui",me.PlayerGui)
  336. Gui.Name = "Ammo"
  337. local Frame = Instance.new("Frame",Gui)
  338. Frame.Name = "MainFrame"
  339. Frame.Size = UDim2.new(.15,0,.1,0)
  340. Frame.Position = UDim2.new(0.4,0,0.4,0)
  341. Frame.BackgroundTransparency = 0.99
  342. Frame.BackgroundColor = BrickColor.new("Really black")
  343. Frame.Active = true
  344. local Exit = Instance.new("TextButton",Gui)
  345. Exit.Name = "Exit"
  346. Exit.Size = UDim2.new(.15,0,.1,0)
  347. Exit.Position = UDim2.new(0.4,0,0.4,0)
  348. Exit.BackgroundTransparency = 1
  349. Exit.Text = ""
  350. Exit.BackgroundColor = BrickColor.new("Really black")
  351. Exit.Active = true
  352. Exit.Draggable = false
  353. Exit.MouseButton1Down:connect(function()
  354. me.PlayerGui["Ammo"]:remove()
  355. end)
  356. local msg1 = "Made by colin, Editted by OpTic Wisdom"
  357. local msg2 = "VaporGun v3"
  358. local msg3 = "Click to exit"
  359. local Cred = Instance.new("TextLabel",Frame)
  360. Cred.Name = "Credz"
  361. Cred.Font = "ArialBold"
  362. Cred.FontSize = "Size12"
  363. Cred.Position = UDim2.new(0.5,0,0.05,0)
  364. for i = 1,#msg1 do
  365. Cred.Text = (string.sub(msg1, 1,i))
  366. wait(WaitTime)
  367. end
  368. Cred.TextColor3 = BrickColor.new("Hot pink").Color
  369. wait(WaitTime2)
  370. local Dis = Instance.new("TextLabel",Frame)
  371. Dis.Name = "Real Numbers"
  372. Dis.Font = "ArialBold"
  373. Dis.FontSize = "Size18"
  374. Dis.Position = UDim2.new(0.5,0,0.5,0)
  375. Dis.TextColor3 = BrickColor.new("Hot pink").Color
  376. for i = 1,#msg2 do
  377. Dis.Text = (string.sub(msg2, 1,i))
  378. wait(WaitTime)
  379. end
  380. me.Character.Humanoid.WalkSpeed = walkspeed
  381. wait(WaitTime3)
  382. for i = 1,#msg2 do
  383. Dis.Text = string.sub(msg2, i,#msg2)
  384. wait(WiatTime)
  385. end
  386. for i = 1,#msg3 do
  387. Dis.Text = (string.sub(msg3, 1,i))
  388. wait(WaitTime)
  389. end
  390. end
  391.  
  392. function deselect()
  393. left.C0 = CFrame.new(0,0,0)
  394. right.C0 = CFrame.new(0,0,0)
  395. me.Character:makeJoints()
  396. wait()
  397. right.Part0 = nil
  398. right.Part1 = nil
  399. left.Part0 = nil
  400. left.Part1 = nil
  401. gun.Parent = game.Lighting
  402. me.Character:makeJoints()
  403. me.PlayerGui["Ammo"]:Remove()
  404. me.Character.Humanoid.WalkSpeed = walkspeed2
  405. end
  406.  
  407. sp.Selected:connect(selected)
  408. sp.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement