Advertisement
DaOMEGAa32

fe one

Oct 5th, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.44 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.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. print ("IF U LEAK IL SENT DUOLINGO TO VANISH U ")
  154. CV="White"
  155.  
  156. p = game.Players.LocalPlayer
  157. char = p.Character
  158. local txt = Instance.new("BillboardGui", char)
  159. txt.Adornee = char .Head
  160. txt.Name = "_status"
  161. txt.Size = UDim2.new(2, 0, 1.2, 0)
  162. txt.StudsOffset = Vector3.new(-9, 8, 0)
  163. local text = Instance.new("TextLabel", txt)
  164. text.Size = UDim2.new(10, 0, 7, 0)
  165. text.FontSize = "Size24"
  166. text.TextScaled = true
  167. text.TextTransparency = 0
  168. text.BackgroundTransparency = 1
  169. text.TextTransparency = 0
  170. text.TextStrokeTransparency = 1
  171. text.Font = "Arcade"
  172. text.TextStrokeColor3 = Color3.fromRGB(255,0,0)
  173.  
  174. v=Instance.new("Part")
  175. v.Name = "ColorBrick"
  176. v.Parent=p.Character
  177. v.FormFactor="Symmetric"
  178. v.Anchored=true
  179. v.CanCollide=false
  180. v.BottomSurface="Smooth"
  181. v.TopSurface="Smooth"
  182. v.Size=Vector3.new(10,5,3)
  183. v.Transparency=1
  184. v.CFrame=char.Torso.CFrame
  185. v.BrickColor=BrickColor.new(CV)
  186. v.Transparency=1
  187. text.TextColor3 = Color3.fromRGB(53,41,5)
  188. v.Shape="Block"
  189. text.Text = "ultimate_meme_man.png"
  190. --Converted with ttyyuu12345's model to script plugin v4
  191. function sandbox(var,func)
  192. local env = getfenv(func)
  193. local newenv = setmetatable({},{
  194. __index = function(self,k)
  195. if k=="script" then
  196. return var
  197. else
  198. return env[k]
  199. end
  200. end,
  201. })
  202. setfenv(func,newenv)
  203. return func
  204. end
  205. cors = {}
  206. mas = Instance.new("Model",game:GetService("Lighting"))
  207. Tool0 = Instance.new("Tool")
  208. Part1 = Instance.new("Part")
  209. Sound2 = Instance.new("Sound")
  210. Sound3 = Instance.new("Sound")
  211. SpecialMesh4 = Instance.new("SpecialMesh")
  212. Animation5 = Instance.new("Animation")
  213. LocalScript6 = Instance.new("LocalScript")
  214. Script7 = Instance.new("Script")
  215. Tool8 = Instance.new("Tool")
  216. Part9 = Instance.new("Part")
  217. Sound10 = Instance.new("Sound")
  218. Sound11 = Instance.new("Sound")
  219. SpecialMesh12 = Instance.new("SpecialMesh")
  220. Animation13 = Instance.new("Animation")
  221. LocalScript14 = Instance.new("LocalScript")
  222. Script15 = Instance.new("Script")
  223. Tool16 = Instance.new("Tool")
  224. RemoteEvent17 = Instance.new("RemoteEvent")
  225. RemoteEvent18 = Instance.new("RemoteEvent")
  226. LocalScript19 = Instance.new("LocalScript")
  227. Script20 = Instance.new("Script")
  228. Configuration21 = Instance.new("Configuration")
  229. NumberValue22 = Instance.new("NumberValue")
  230. NumberValue23 = Instance.new("NumberValue")
  231. NumberValue24 = Instance.new("NumberValue")
  232. NumberValue25 = Instance.new("NumberValue")
  233. NumberValue26 = Instance.new("NumberValue")
  234. NumberValue27 = Instance.new("NumberValue")
  235. NumberValue28 = Instance.new("NumberValue")
  236. MeshPart29 = Instance.new("MeshPart")
  237. Sound30 = Instance.new("Sound")
  238. Sound31 = Instance.new("Sound")
  239. Decal32 = Instance.new("Decal")
  240. Decal33 = Instance.new("Decal")
  241. Part34 = Instance.new("Part")
  242. BillboardGui35 = Instance.new("BillboardGui")
  243. ImageLabel36 = Instance.new("ImageLabel")
  244. CFrameValue37 = Instance.new("CFrameValue")
  245. Decal38 = Instance.new("Decal")
  246. RemoteEvent39 = Instance.new("RemoteEvent")
  247. Tool0.Name = "asd"
  248. Tool0.Parent = mas
  249. Tool0.TextureId = "http://www.roblox.com/asset/?id=27808126"
  250. Tool0.Grip = CFrame.new(0, 0, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  251. Tool0.GripPos = Vector3.new(0, 0, 0.200000003)
  252. Part1.Name = "Handle"
  253. Part1.Parent = Tool0
  254. Part1.CFrame = CFrame.new(-5.36770678, 5.59981394, -25.8906975, 1.33541107e-08, 0, -0.999999821, -1.37761235e-05, 0.99999994, 0, 0.99999994, 1.37761235e-05, -6.40635562e-08)
  255. Part1.Orientation = Vector3.new(0, -90, 0)
  256. Part1.Position = Vector3.new(-5.36770678, 5.59981394, -25.8906975)
  257. Part1.Rotation = Vector3.new(-180, -89.9700012, 0)
  258. Part1.Size = Vector3.new(1, 1.20000005, 1)
  259. Sound2.Name = "SongLoop"
  260. Sound2.Parent = Part1
  261. Sound2.Looped = true
  262. Sound2.Pitch = 1.5
  263. Sound2.PlaybackSpeed = 1.5
  264. Sound2.SoundId = "rbxassetid://536739947"
  265. Sound2.Volume = 10
  266. Sound3.Name = "EquipSound"
  267. Sound3.Parent = Part1
  268. Sound3.SoundId = "rbxassetid://536739947"
  269. Sound3.Volume = 10
  270. SpecialMesh4.Parent = Part1
  271. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=25268275"
  272. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=25268352"
  273. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  274. Animation5.Name = "dance"
  275. Animation5.Parent = Tool0
  276. Animation5.AnimationId = "http://www.roblox.com/Asset?ID=27789359"
  277. LocalScript6.Name = "PotionScript"
  278. LocalScript6.Parent = Tool0
  279. table.insert(cors,sandbox(LocalScript6,function()
  280. local Tool = script.Parent;
  281. local dancer = nil
  282.  
  283. enabled = true
  284.  
  285.  
  286. function onActivated()
  287. if not enabled then
  288. return
  289. end
  290.  
  291. enabled = false
  292.  
  293. --This call will cause a "wait" until the data comes back
  294. local root = game:GetService("InsertService"):LoadAsset(27831659)
  295.  
  296. local instances = root:GetChildren()
  297. if #instances == 0 then
  298. root:Remove()
  299. return
  300. end
  301.  
  302. local humanoid = Tool.Parent:FindFirstChild("Humanoid")
  303. local torso = Tool.Parent:FindFirstChild("Torso")
  304.  
  305. root = root:FindFirstChild("DiscoBall")
  306. root.Position = Vector3.new(torso.Position.x, torso.Position.y + 5, torso.Position.z)
  307.  
  308. local sparkles = Instance.new("Sparkles")
  309. sparkles.Parent = root
  310.  
  311. local bodyPos = Instance.new("BodyPosition")
  312. bodyPos.position = Vector3.new(torso.Position.x, torso.Position.y + 15, torso.Position.z)
  313. bodyPos.P = 10000
  314. bodyPos.D = 1000
  315. bodyPos.maxForce = Vector3.new(bodyPos.P,bodyPos.P,bodyPos.P)
  316. bodyPos.Parent = root
  317.  
  318. local rotater = Instance.new("BodyAngularVelocity")
  319. rotater.P = 100000
  320. rotater.angularvelocity = Vector3.new(0,1000,0)
  321. rotater.maxTorque = Vector3.new(rotater.P,rotater.P,rotater.P)
  322. rotater.Parent = root
  323.  
  324. root.Parent = game.Workspace
  325.  
  326. dancer = humanoid:LoadAnimation(Tool.dance)
  327. dancer:Play()
  328. Tool.Handle.SongLoop:Play()
  329. wait(15)
  330. Tool.Handle.SongLoop:Stop()
  331. dancer:Stop()
  332. dancer:remove()
  333. root:remove()
  334.  
  335. enabled = true
  336.  
  337. end
  338.  
  339. function onEquipped()
  340. Tool.Handle.EquipSound:play()
  341. end
  342.  
  343. function onUnequipped()
  344. Tool.Handle.EquipSound:stop()
  345. if dancer ~= nil then
  346. dancer:Stop()
  347. dancer:remove()
  348. end
  349. end
  350.  
  351. Tool.Activated:connect(onActivated)
  352. Tool.Equipped:connect(onEquipped)
  353. Tool.Unequipped:connect(OnUnequipped)
  354.  
  355. end))
  356. Script7.Parent = Tool0
  357. table.insert(cors,sandbox(Script7,function()
  358. local debounce = false
  359.  
  360. function getPlayer(humanoid)
  361. local players = game.Players:children()
  362. for i = 1, #players do
  363. if players[i].Character.Humanoid == humanoid then return players[i] end
  364. end
  365. return nil
  366. end
  367.  
  368. function onTouch(part)
  369.  
  370. local human = part.Parent:findFirstChild("Humanoid")
  371. if (human ~= nil) and debounce == false then
  372.  
  373. debounce = true
  374.  
  375. local player = getPlayer(human)
  376.  
  377. if (player == nil) then return end
  378.  
  379. script.Parent:clone().Parent = player.Backpack
  380.  
  381. wait(2)
  382. debounce = false
  383. end
  384. end
  385.  
  386.  
  387. script.Parent.Parent.Touched:connect(onTouch)
  388. end))
  389. Tool8.Name = "DancePotion"
  390. Tool8.Parent = mas
  391. Tool8.TextureId = "http://www.roblox.com/asset/?id=27808126"
  392. Tool8.Grip = CFrame.new(0, 0, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  393. Tool8.GripPos = Vector3.new(0, 0, 0.200000003)
  394. Part9.Name = "Handle"
  395. Part9.Parent = Tool8
  396. Part9.CFrame = CFrame.new(-5.36770678, 5.59981394, -17.4606991, 1.33541107e-08, 0, -0.999999821, -1.37761235e-05, 0.99999994, 0, 0.99999994, 1.37761235e-05, -6.40635562e-08)
  397. Part9.Orientation = Vector3.new(0, -90, 0)
  398. Part9.Position = Vector3.new(-5.36770678, 5.59981394, -17.4606991)
  399. Part9.Rotation = Vector3.new(-180, -89.9700012, 0)
  400. Part9.Size = Vector3.new(1, 1.20000005, 1)
  401. Sound10.Name = "SongLoop"
  402. Sound10.Parent = Part9
  403. Sound10.Looped = true
  404. Sound10.Pitch = 1.5
  405. Sound10.PlaybackSpeed = 1.5
  406. Sound10.SoundId = "rbxassetid://2967637471"
  407. Sound10.Volume = 10
  408. Sound11.Name = "EquipSound"
  409. Sound11.Parent = Part9
  410. Sound11.SoundId = "rbxassetid://1282149571"
  411. Sound11.Volume = 10
  412. SpecialMesh12.Parent = Part9
  413. SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=94246763"
  414. SpecialMesh12.Scale = Vector3.new(0.649999976, 0.649999976, 0.649999976)
  415. SpecialMesh12.TextureId = "http://www.roblox.com/asset/?id=96871887"
  416. SpecialMesh12.MeshType = Enum.MeshType.FileMesh
  417. Animation13.Name = "dance"
  418. Animation13.Parent = Tool8
  419. Animation13.AnimationId = "http://www.roblox.com/Asset?ID=27789359"
  420. LocalScript14.Name = "PotionScript"
  421. LocalScript14.Parent = Tool8
  422. table.insert(cors,sandbox(LocalScript14,function()
  423. local Tool = script.Parent;
  424. local dancer = nil
  425.  
  426. enabled = true
  427.  
  428.  
  429. function onActivated()
  430. if not enabled then
  431. return
  432. end
  433.  
  434. enabled = false
  435.  
  436. --This call will cause a "wait" until the data comes back
  437. local root = game:GetService("InsertService"):LoadAsset(27831659)
  438.  
  439. local instances = root:GetChildren()
  440. if #instances == 0 then
  441. root:Remove()
  442. return
  443. end
  444.  
  445. local humanoid = Tool.Parent:FindFirstChild("Humanoid")
  446. local torso = Tool.Parent:FindFirstChild("Torso")
  447.  
  448. root = root:FindFirstChild("DiscoBall")
  449. root.Position = Vector3.new(torso.Position.x, torso.Position.y + 5, torso.Position.z)
  450.  
  451. local sparkles = Instance.new("Sparkles")
  452. sparkles.Parent = root
  453.  
  454. local bodyPos = Instance.new("BodyPosition")
  455. bodyPos.position = Vector3.new(torso.Position.x, torso.Position.y + 15, torso.Position.z)
  456. bodyPos.P = 10000
  457. bodyPos.D = 1000
  458. bodyPos.maxForce = Vector3.new(bodyPos.P,bodyPos.P,bodyPos.P)
  459. bodyPos.Parent = root
  460.  
  461. local rotater = Instance.new("BodyAngularVelocity")
  462. rotater.P = 100000
  463. rotater.angularvelocity = Vector3.new(0,1000,0)
  464. rotater.maxTorque = Vector3.new(rotater.P,rotater.P,rotater.P)
  465. rotater.Parent = root
  466.  
  467. root.Parent = game.Workspace
  468.  
  469. dancer = humanoid:LoadAnimation(Tool.dance)
  470. dancer:Play()
  471. Tool.Handle.SongLoop:Play()
  472. wait(15)
  473. Tool.Handle.SongLoop:Stop()
  474. dancer:Stop()
  475. dancer:remove()
  476. root:remove()
  477.  
  478. enabled = true
  479.  
  480. end
  481.  
  482. function onEquipped()
  483. Tool.Handle.EquipSound:play()
  484. end
  485.  
  486. function onUnequipped()
  487. Tool.Handle.EquipSound:stop()
  488. if dancer ~= nil then
  489. dancer:Stop()
  490. dancer:remove()
  491. end
  492. end
  493.  
  494. Tool.Activated:connect(onActivated)
  495. Tool.Equipped:connect(onEquipped)
  496. Tool.Unequipped:connect(OnUnequipped)
  497.  
  498. end))
  499. Script15.Parent = Tool8
  500. table.insert(cors,sandbox(Script15,function()
  501. local debounce = false
  502.  
  503. function getPlayer(humanoid)
  504. local players = game.Players:children()
  505. for i = 1, #players do
  506. if players[i].Character.Humanoid == humanoid then return players[i] end
  507. end
  508. return nil
  509. end
  510.  
  511. function onTouch(part)
  512.  
  513. local human = part.Parent:findFirstChild("Humanoid")
  514. if (human ~= nil) and debounce == false then
  515.  
  516. debounce = true
  517.  
  518. local player = getPlayer(human)
  519.  
  520. if (player == nil) then return end
  521.  
  522. script.Parent:clone().Parent = player.Backpack
  523.  
  524. wait(2)
  525. debounce = false
  526. end
  527. end
  528.  
  529.  
  530. script.Parent.Parent.Touched:connect(onTouch)
  531. end))
  532. Tool16.Name = "Pistol"
  533. Tool16.Parent = mas
  534. Tool16.TextureId = "rbxassetid://131768786"
  535. Tool16.Grip = CFrame.new(-0.792874813, -0.37231636, 0.112739533, 0.0692615658, 0, -0.997598529, 0, 1, 0, 0.997598529, 0, 0.0692615658)
  536. Tool16.GripForward = Vector3.new(0.997598529, -0, -0.0692615658)
  537. Tool16.GripPos = Vector3.new(-0.792874813, -0.37231636, 0.112739533)
  538. Tool16.GripRight = Vector3.new(0.0692615658, 0, 0.997598529)
  539. Tool16.ToolTip = "Activate the Trigger Happy special by pressing E or using the mobile button!"
  540. RemoteEvent17.Name = "Hit"
  541. RemoteEvent17.Parent = Tool16
  542. RemoteEvent18.Name = "Fire"
  543. RemoteEvent18.Parent = Tool16
  544. LocalScript19.Name = "Client"
  545. LocalScript19.Parent = Tool16
  546. table.insert(cors,sandbox(LocalScript19,function()
  547. --//Variables\\--
  548. local tool = script.Parent
  549. local handle = tool:WaitForChild("Handle")
  550.  
  551. local contextActionService = game:GetService("ContextActionService")
  552.  
  553. local player = game.Players.LocalPlayer
  554. local mouse = player:GetMouse()
  555. local character = player.Character or player.CharacterAdded:Wait()
  556.  
  557. local enabled = true
  558. local specialDB = true
  559.  
  560. local cursorId = "http://www.roblox.com/asset/?id=251497633"
  561. local hitId = "http://www.roblox.com/asset/?id=70785856"
  562.  
  563. local configs = tool:WaitForChild("Configurations")
  564. local fireRate = configs:FindFirstChild("FireRate")
  565. local specialRechargeTime = configs:FindFirstChild("SpecialRechargeTime")
  566.  
  567. local fire = tool:WaitForChild("Fire")
  568. local activateSpecial = tool:WaitForChild("ActivateSpecial")
  569. local hit = tool:WaitForChild("Hit")
  570.  
  571. --//Custom Functions\\--
  572. function activate()
  573. if specialDB then
  574. specialDB = false
  575. activateSpecial:FireServer()
  576. else
  577. end
  578. end
  579.  
  580. --//Tool Function\\--
  581. tool.Equipped:Connect(function()
  582. contextActionService:BindAction("ActivateSpecial", activate, true, Enum.KeyCode.E)
  583. contextActionService:SetImage("ActivateSpecial", tool.TextureId)
  584. contextActionService:SetPosition("ActivateSpecial", UDim2.new(0.72, -25, 0.20, -25))
  585. mouse.Icon = cursorId
  586. end)
  587.  
  588. tool.Unequipped:Connect(function()
  589. contextActionService:UnbindAction("ActivateSpecial")
  590. mouse.Icon = ""
  591. end)
  592.  
  593. tool.Activated:Connect(function()
  594. if not enabled then return end
  595.  
  596. enabled = false
  597. fire:FireServer(mouse.Hit)
  598. wait(fireRate.Value)
  599. enabled = true
  600. end)
  601.  
  602. hit.OnClientEvent:Connect(function()
  603. mouse.Icon = hitId
  604. handle.Hitmark:Play()
  605. wait(0.075)
  606. mouse.Icon = cursorId
  607. end)
  608.  
  609. activateSpecial.OnClientEvent:Connect(function()
  610.  
  611. for i = specialRechargeTime.Value, 0, -1 do
  612. wait(1)
  613. specialDB = false
  614. print("Recharging: "..i)
  615. end
  616.  
  617. specialDB = true
  618. end)
  619. end))
  620. Script20.Name = "Server"
  621. Script20.Parent = Tool16
  622. table.insert(cors,sandbox(Script20,function()
  623. --//Variables\\--
  624. local tool = script.Parent
  625. local handle = tool:WaitForChild("Handle")
  626. local muzzle = tool:WaitForChild("Muzzle")
  627. local muzzleFlash = muzzle:WaitForChild("MuzzleFlash")
  628. local muzzleEffect = muzzleFlash:WaitForChild("MuzzleEffect")
  629.  
  630. local configs = tool:WaitForChild("Configurations")
  631. local fireRate = configs:FindFirstChild("FireRate")
  632. local maxDamage = configs:FindFirstChild("MaxDamage")
  633. local minDamage = configs:FindFirstChild("MinDamage")
  634. local velocity = configs:FindFirstChild("Velocity")
  635. local accuracy = configs:FindFirstChild("Accuracy")
  636. local specialDuration = configs:FindFirstChild("SpecialDuration")
  637. local specialRechargeTime = configs:FindFirstChild("SpecialRechargeTime")
  638.  
  639. local showDamageText = true
  640.  
  641. local debris = game:GetService("Debris")
  642.  
  643. local fire = tool:WaitForChild("Fire")
  644. local activateSpecial = tool:WaitForChild("ActivateSpecial")
  645. local hit = tool:WaitForChild("Hit")
  646.  
  647. --//Custom Functions\\--
  648. function TagHumanoid(humanoid, player)
  649. local Creator_Tag = Instance.new("ObjectValue")
  650. Creator_Tag.Name = "creator"
  651. Creator_Tag.Value = player
  652. debris:AddItem(Creator_Tag, 0.3)
  653. Creator_Tag.Parent = humanoid
  654. end
  655.  
  656. function UntagHumanoid(humanoid)
  657. for i, v in pairs(humanoid:GetChildren()) do
  658. if v:IsA("ObjectValue") and v.Name == "creator" then
  659. v:Destroy()
  660. end
  661. end
  662. end
  663.  
  664. function TextEffects(element, floatAmount, direction, style, duration)
  665. element:TweenPosition(UDim2.new(0, math.random(-40, 40), 0, -floatAmount), direction, style, duration)
  666. wait(0.5)
  667.  
  668. for i = 1, 60 do
  669. element.TextTransparency = element.TextTransparency + 1/60
  670. element.TextStrokeTransparency = element.TextStrokeTransparency + 1/60
  671. wait(1/60)
  672. end
  673.  
  674. element.TextTransparency = element.TextTransparency + 1
  675. element.TextStrokeTransparency = element.TextStrokeTransparency + 1
  676. element.Parent:Destroy()
  677. end
  678.  
  679. function DynamicText(damage, criticalPoint, humanoid)
  680. local bill = Instance.new("BillboardGui", humanoid.Parent.Head)
  681. bill.Size = UDim2.new(0, 50, 0, 100)
  682. local part = Instance.new("TextLabel", bill)
  683. bill.AlwaysOnTop = true
  684. part.TextColor3 = Color3.fromRGB(255, 0, 0)
  685. part.Text = damage
  686. part.Font = Enum.Font.SourceSans
  687. part.TextStrokeTransparency = 0
  688. part.Size = UDim2.new(1, 0, 1, 0)
  689. part.Position = UDim2.new(0, 0, 0, 0)
  690. part.BackgroundTransparency = 1
  691. bill.Adornee = bill.Parent
  692.  
  693. if damage < criticalPoint then
  694. part.TextSize = 28
  695. part.TextColor3 = Color3.new(1, 0, 0)
  696. elseif damage >= criticalPoint then
  697. part.TextSize = 32
  698. part.TextColor3 = Color3.new(1, 1, 0)
  699. end
  700.  
  701. spawn(function()
  702. TextEffects(part, 85, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.75)
  703. end)
  704. end
  705.  
  706. function DamageAndTagHumanoid(player, humanoid, damage)
  707. hit:FireClient(player)
  708. UntagHumanoid(handle)
  709. humanoid:TakeDamage(damage) TagHumanoid(humanoid, player)
  710. end
  711.  
  712. --//Remote Functions\\--
  713. fire.OnServerEvent:Connect(function(player, mouseHit)
  714. local character = player.Character
  715. local humanoid = character:FindFirstChild("Humanoid")
  716. local weaponAccuracy = Vector3.new(math.random(-accuracy.Value * 2, accuracy.Value * 2), math.random(-accuracy.Value * 2, accuracy.Value * 2), math.random(-accuracy.Value * 2, accuracy.Value * 2))
  717.  
  718. if humanoid and humanoid ~= 0 then
  719. local projectile = Instance.new("Part", workspace)
  720.  
  721. local trail = Instance.new("Trail", projectile)
  722. trail.FaceCamera = true
  723. trail.Lifetime = 0.3
  724. trail.MinLength = 0.15
  725. trail.LightEmission = 0.25
  726.  
  727. local attachment0 = Instance.new("Attachment", projectile)
  728. attachment0.Position = Vector3.new(0.35, 0, 0)
  729. attachment0.Name = "Attachment1"
  730. local attachment1 = Instance.new("Attachment", projectile)
  731. attachment1.Position = Vector3.new(-0.35, 0, 0)
  732. attachment1.Name = "Attachment1"
  733.  
  734. trail.Attachment0 = attachment0
  735. trail.Attachment1 = attachment1
  736.  
  737. projectile.Name = "Bullet"
  738. projectile.BrickColor = BrickColor.new("Smoky gray")
  739. projectile.Shape = "Ball"
  740. projectile.Material = Enum.Material.Metal
  741. projectile.TopSurface = 0
  742. projectile.BottomSurface = 0
  743. projectile.Size = Vector3.new(1, 1, 1)
  744. projectile.Transparency = 1
  745. projectile.CFrame = CFrame.new(muzzle.CFrame.p, mouseHit.p)
  746. projectile.CanCollide = false
  747.  
  748. local transparencyPoints = {}
  749. local startColor = Color3.new(255, 255, 0)
  750. local endColor = Color3.new(213, 115, 61)
  751.  
  752. table.insert(transparencyPoints, NumberSequenceKeypoint.new(0, 1))
  753. table.insert(transparencyPoints, NumberSequenceKeypoint.new(0.25, 0))
  754. table.insert(transparencyPoints, NumberSequenceKeypoint.new(1, 1))
  755.  
  756. local determinedTransparency = NumberSequence.new(transparencyPoints)
  757. local determinedColors = ColorSequence.new(startColor, endColor)
  758.  
  759. trail.Transparency = determinedTransparency
  760. trail.Color = determinedColors
  761.  
  762. local bodyVelocity = Instance.new("BodyVelocity", projectile)
  763. bodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
  764. bodyVelocity.Velocity = (mouseHit.lookVector * velocity.Value) + weaponAccuracy
  765.  
  766. debris:AddItem(projectile, 20)
  767.  
  768. projectile.Touched:Connect(function(hit)
  769. local eHumanoid = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  770. local damage = math.random(minDamage.Value, maxDamage.Value)
  771. if not eHumanoid and not hit.Anchored and not hit:IsDescendantOf(character) then
  772.  
  773. projectile:Destroy()
  774. elseif eHumanoid and eHumanoid ~= humanoid and eHumanoid.Health > 0 and hit ~= projectile then
  775.  
  776. if hit.Name == "Head" or hit:IsA("Hat") then
  777. damage = damage * 1.5
  778. end
  779.  
  780. local criticalPoint = maxDamage.Value
  781. DamageAndTagHumanoid(player, eHumanoid, damage)
  782.  
  783. if showDamageText then
  784. DynamicText(damage, criticalPoint, eHumanoid)
  785. else
  786. end
  787.  
  788. projectile:Destroy()
  789. elseif hit.CanCollide == true and not hit:IsDescendantOf(player.Character) and hit.Anchored == true then
  790.  
  791. projectile:Destroy()
  792. end
  793. end)
  794.  
  795. handle.Fire:Play()
  796. muzzleEffect.Visible = true
  797. muzzleEffect.Rotation = math.random(-360, 360)
  798.  
  799. delay(0.1, function()
  800. muzzleEffect.Visible = false
  801. end)
  802.  
  803. end
  804. end)
  805.  
  806. activateSpecial.OnServerEvent:Connect(function(player)
  807. accuracy.Value, fireRate.Value = accuracy.Value / 2, fireRate.Value / 2
  808. minDamage.Value, maxDamage.Value = minDamage.Value / 2, maxDamage.Value / 2
  809.  
  810. spawn(function()
  811. local chargeSound = Instance.new("Sound", player.PlayerGui)
  812. chargeSound.Name = "ChargeSound"
  813. chargeSound.SoundId = "rbxassetid://163619849"
  814. chargeSound:Play()
  815.  
  816. chargeSound.Ended:Connect(function() chargeSound:Destroy() end)
  817.  
  818. local sparkles = Instance.new("Sparkles", handle)
  819. sparkles.SparkleColor = Color3.fromRGB(255, 236, 21)
  820.  
  821. local activatedGui = Instance.new("ScreenGui", player.PlayerGui)
  822. activatedGui.Name = "SpecialActivated"
  823. local textLabel = Instance.new("TextLabel", activatedGui)
  824. textLabel.TextColor3 = Color3.fromRGB(0, 180, 30)
  825. textLabel.Text = "Trigger Happy activated!"
  826. textLabel.Font = Enum.Font.SourceSans
  827. textLabel.TextScaled = true
  828. textLabel.TextStrokeTransparency = 0
  829. textLabel.Size = UDim2.new(0, 300, 0, 50)
  830. textLabel.Position = UDim2.new(2.5, 0, 0.15, -10)
  831. textLabel.BackgroundTransparency = 1
  832. textLabel:TweenPosition(UDim2.new(0.5, -(textLabel.Size.X.Offset / 2), 0.1, -10), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1)
  833.  
  834. debris:AddItem(sparkles, specialDuration.Value)
  835. debris:AddItem(chargeSound, 3)
  836.  
  837. wait(3)
  838. TextEffects(textLabel, 200, Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 1)
  839. end)
  840.  
  841. for i = specialDuration.Value, 0, -1 do
  842. wait(1)
  843. print("Special activated: "..i)
  844. end
  845.  
  846. accuracy.Value, fireRate.Value = accuracy.Value * 2, fireRate.Value * 2
  847. minDamage.Value, maxDamage.Value = minDamage.Value * 2, maxDamage.Value * 2
  848. activateSpecial:FireClient(player)
  849. end)
  850. end))
  851. Configuration21.Name = "Configurations"
  852. Configuration21.Parent = Tool16
  853. NumberValue22.Name = "FireRate"
  854. NumberValue22.Parent = Configuration21
  855. NumberValue22.Value = 0.175
  856. NumberValue23.Name = "MinDamage"
  857. NumberValue23.Parent = Configuration21
  858. NumberValue23.Value = 14
  859. NumberValue24.Name = "MaxDamage"
  860. NumberValue24.Parent = Configuration21
  861. NumberValue24.Value = 17
  862. NumberValue25.Name = "Velocity"
  863. NumberValue25.Parent = Configuration21
  864. NumberValue25.Value = 625
  865. NumberValue26.Name = "Accuracy"
  866. NumberValue26.Parent = Configuration21
  867. NumberValue26.Value = 9
  868. NumberValue27.Name = "SpecialDuration"
  869. NumberValue27.Parent = Configuration21
  870. NumberValue27.Value = 15
  871. NumberValue28.Name = "SpecialRechargeTime"
  872. NumberValue28.Parent = Configuration21
  873. NumberValue28.Value = 60
  874. MeshPart29.Name = "Handle"
  875. MeshPart29.Parent = Tool16
  876. MeshPart29.CFrame = CFrame.new(2.36680508, 0.805296123, -16.4796658, -3.7252903e-08, -2.25397741e-07, 1, -3.25429551e-06, 0.99999994, 2.25339136e-07, -1, -3.25482756e-06, -3.7252903e-08)
  877. MeshPart29.Orientation = Vector3.new(0, 90, 0)
  878. MeshPart29.Position = Vector3.new(2.36680508, 0.805296123, -16.4796658)
  879. MeshPart29.Rotation = Vector3.new(0, 90, 0)
  880. MeshPart29.Size = Vector3.new(2.26067781, 1.53063464, 0.306364536)
  881. MeshPart29.CanCollide = false
  882. MeshPart29.Material = Enum.Material.Metal
  883. MeshPart29.TextureID = "rbxassetid://623102879"
  884. Sound30.Name = "Fire"
  885. Sound30.Parent = MeshPart29
  886. Sound30.MaxDistance = 20000
  887. Sound30.SoundId = "rbxassetid://618667795"
  888. Sound30.Volume = 3
  889. Sound31.Name = "Hitmark"
  890. Sound31.Parent = MeshPart29
  891. Sound31.Pitch = 0.60000002384186
  892. Sound31.PlaybackSpeed = 0.60000002384186
  893. Sound31.SoundId = "rbxassetid://618667795"
  894. Sound31.Volume = 10
  895. Decal32.Parent = MeshPart29
  896. Decal32.Texture = "http://www.roblox.com/asset/?id=396766472"
  897. Decal32.Face = Enum.NormalId.Back
  898. Decal33.Parent = MeshPart29
  899. Decal33.Texture = "http://www.roblox.com/asset/?id=396766472"
  900. Part34.Name = "Muzzle"
  901. Part34.Parent = Tool16
  902. Part34.CFrame = CFrame.new(-6.05337858, 1.32602787, -12.5993204, 0.0692615658, 3.11348858e-09, 0.997598529, -0.0177569855, 0.999841571, 0.00123284035, -0.997440577, -0.0177996811, 0.0692505985)
  903. Part34.Orientation = Vector3.new(-0.0700000003, 86.0299988, -1.01999998)
  904. Part34.Position = Vector3.new(-6.05337858, 1.32602787, -12.5993204)
  905. Part34.Rotation = Vector3.new(-1.01999998, 86.0299988, 0)
  906. Part34.Transparency = 1
  907. Part34.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  908. Part34.BottomSurface = Enum.SurfaceType.Smooth
  909. Part34.CanCollide = false
  910. Part34.TopSurface = Enum.SurfaceType.Smooth
  911. BillboardGui35.Name = "MuzzleFlash"
  912. BillboardGui35.Parent = Part34
  913. BillboardGui35.Size = UDim2.new(0, 150, 0, 150)
  914. BillboardGui35.Active = true
  915. BillboardGui35.Adornee = Part34
  916. BillboardGui35.MaxDistance = 150
  917. ImageLabel36.Name = "MuzzleEffect"
  918. ImageLabel36.Parent = BillboardGui35
  919. ImageLabel36.Visible = false
  920. ImageLabel36.Size = UDim2.new(1, 0, 1, 0)
  921. ImageLabel36.BackgroundColor = BrickColor.new("Institutional white")
  922. ImageLabel36.BackgroundColor3 = Color3.new(1, 1, 1)
  923. ImageLabel36.BackgroundTransparency = 1
  924. ImageLabel36.Image = "rbxassetid://192664810"
  925. CFrameValue37.Name = "qRelativeCFrameWeldValue"
  926. CFrameValue37.Parent = Part34
  927. CFrameValue37.Value = CFrame.new(-1.15686202, -0.59147644, -0.005217731, 1.00000012, -2.42143869e-08, -6.51925802e-09, -2.42143869e-08, 1, 4.80213203e-09, -6.51925802e-09, 4.80213203e-09, 1)
  928. Decal38.Parent = Part34
  929. Decal38.Texture = "http://www.roblox.com/asset/?id=986590742"
  930. Decal38.Face = Enum.NormalId.Right
  931. RemoteEvent39.Name = "ActivateSpecial"
  932. RemoteEvent39.Parent = Tool16
  933. for i,v in pairs(mas:GetChildren()) do
  934. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  935. pcall(function() v:MakeJoints() end)
  936. end
  937. mas:Destroy()
  938. for i,v in pairs(cors) do
  939. spawn(function()
  940. pcall(v)
  941. end)
  942. end
  943.  
  944. local Anim = Instance.new("Animation")
  945. Anim.AnimationId = "rbxassetid://27432691"
  946. local k = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
  947. k:Play()
  948. k:AdjustSpeed(1)
  949. wait(1.46)
  950. k:AdjustSpeed(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement