Advertisement
DarkScriptZEditors

Untitled

Jan 28th, 2019
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.55 KB | None | 0 0
  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. --Fake event to make stuff like Mouse.KeyDown work
  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. --Creating fake input objects with fake variables
  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. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  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. --Client communication
  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. --Since InputObject is a client-side instance, we create and pass table instead
  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. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150. --xChair--
  151.  
  152. --[[
  153. MODES
  154. ----------
  155. DAMAGE = 'Q'
  156. HATSTEEL = 'E'
  157. BUILD = 'R'
  158. EXPLODE = 'T'
  159. TELEPORT = 'Z'
  160. HEAL = 'H'
  161. BOOST = 'F'
  162. --]]
  163.  
  164. plr = game.Players.LocalPlayer
  165. char = plr.Character
  166. local mouse = plr:GetMouse()
  167. mode = 'damage'
  168. local human = char.Humanoid
  169. char.Animate:Destroy()
  170. running = false
  171. human.Running:connect(function(speed)
  172. if speed <= 0 then
  173. running = false
  174. else
  175. running = true
  176. end
  177. end)
  178. local function weldBetween(a, b)
  179. local weld = Instance.new("ManualWeld")
  180. weld.Part0 = a
  181. weld.Part1 = b
  182. weld.C0 = CFrame.new()
  183. weld.C1 = b.CFrame:inverse() * a.CFrame
  184. weld.Parent = a
  185. return weld;
  186. end
  187.  
  188. function takehats(char)
  189. for i,v in pairs(char:GetChildren()) do
  190. if v.ClassName == "Hat" then
  191. v.Parent = game.Players.LocalPlayer.Character
  192. end
  193. end
  194. end
  195.  
  196.  
  197. char.Torso.Transparency = 1
  198. --------------------------ARM 1-----------------------------------------
  199. local rawc = char["Right Arm"]:clone()
  200. char["Right Arm"]:Destroy()
  201. rawc.Parent = char
  202. local RAW = weldBetween(char.Torso, char["Right Arm"])
  203. RAW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  204. --------------------------LEG 1-----------------------------------------
  205. local rlwc = char["Right Leg"]:clone()
  206. char["Right Leg"]:Destroy()
  207. rlwc.Parent = char
  208. local RLW = weldBetween(char.Torso, char["Right Leg"])
  209. RLW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  210. --------------------------LEG 2-----------------------------------------
  211. local llwc = char["Left Leg"]:clone()
  212. char["Left Leg"]:Destroy()
  213. llwc.Parent = char
  214. local LLW = weldBetween(char.Torso, char["Left Leg"])
  215. LLW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  216.  
  217. ----------------------------ARM 2---------------------------------------
  218.  
  219. local lawc = char["Left Arm"]:clone()
  220. char["Left Arm"]:Destroy()
  221. lawc.Parent = char
  222. local LAW = weldBetween(char.Torso, char["Left Arm"])
  223. LAW.C1 = CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  224.  
  225. -----------------------------HEAD----------------------------------
  226. local heaw = weldBetween(char.Torso, char.Head)
  227. -----------------------------------------------------------------------
  228.  
  229.  
  230.  
  231. Tween = function(Weld, Stop, Step,a)
  232. ypcall(function()
  233. local func = function()
  234. local Start = Weld.C1
  235. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  236. local Stop = Stop
  237. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  238.  
  239. for i = 0, 1, Step or .1 do
  240. Weld.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  241. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  242. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  243. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  244. (Z1 * (1 - i)) + (Z2 * i) )
  245. wait()
  246. end
  247.  
  248. Weld.C1 = Stop
  249. end
  250.  
  251. if a then coroutine.wrap(func)() else func() end
  252. end)
  253. end
  254.  
  255.  
  256.  
  257.  
  258.  
  259. local Seat = Instance.new("Part", char)
  260. Seat:BreakJoints()
  261. Seat.TopSurface = "Smooth"
  262. Seat.Name = 'Seat'
  263. Seat.BottomSurface = "Smooth"
  264. Seat.FormFactor = "Custom" Seat.CanCollide = false
  265. Seat.BrickColor = BrickColor.new("Medium stone grey")
  266. Seat.Size = Vector3.new(3.71499968, 0.77700007, 3.04400015)
  267. local Seatweld = Instance.new("ManualWeld")
  268. Seatweld.Part0 = char["Torso"]
  269. Seatweld.Part1 = Seat Seatweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  270. Seatweld.C1 = CFrame.new(-0.436842084, 1.27730489, 0.478226662, 0.998842537, 0, 0.0480999425, 0, 1, 0, -0.0480999425, 0, 0.998842537)
  271. Seatweld.Parent = char["Torso"]
  272.  
  273. local Extra = Instance.new("Part", char)
  274. Extra:BreakJoints()
  275. Extra.TopSurface = "Smooth"
  276. Extra.Name = 'Extra'
  277. Extra.BottomSurface = "Smooth"
  278. Extra.FormFactor = "Custom" Extra.CanCollide = false
  279. Extra.BrickColor = BrickColor.new("Medium stone grey")
  280. Extra.Size = Vector3.new(0.568000019, 1.0990001, 0.495000124)
  281. local Extraweld = Instance.new("ManualWeld")
  282. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  283. Extraweld.C1 = CFrame.new(1.54849625, -0.737998962, 1.29749203, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  284. Extraweld.Parent = Extra
  285. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  286. ExtraMesh.Name = "Mesh"
  287. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  288. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  289.  
  290. local Extra = Instance.new("Part", char)
  291. Extra:BreakJoints()
  292. Extra.TopSurface = "Smooth"
  293. Extra.Name = 'Extra'
  294. Extra.BottomSurface = "Smooth"
  295. Extra.FormFactor = "Custom" Extra.CanCollide = false
  296. Extra.BrickColor = BrickColor.new("Medium stone grey")
  297. Extra.Size = Vector3.new(0.568000019, 1.0990001, 0.50300014)
  298. local Extraweld = Instance.new("ManualWeld")
  299. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  300. Extraweld.C1 = CFrame.new(-1.5555079, -0.737998962, 1.26849937, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  301. Extraweld.Parent = Extra
  302. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  303. ExtraMesh.Name = "Mesh"
  304. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  305. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  306.  
  307. local Extra = Instance.new("Part", char)
  308. Extra:BreakJoints()
  309. Extra.TopSurface = "Smooth"
  310. Extra.Name = 'Extra'
  311. Extra.BottomSurface = "Smooth"
  312. Extra.FormFactor = "Custom" Extra.CanCollide = false
  313. Extra.BrickColor = BrickColor.new("Medium stone grey")
  314. Extra.Size = Vector3.new(0.788000047, 0.200000048, 3.19300008)
  315. local Extraweld = Instance.new("ManualWeld")
  316. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  317. Extraweld.C1 = CFrame.new(-1.38551331, -1.24449921, -0.0904994011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  318. Extraweld.Parent = Extra
  319. local Extra = Instance.new("Part", char)
  320. Extra:BreakJoints()
  321. Extra.TopSurface = "Smooth"
  322. Extra.Name = 'Extra'
  323. Extra.BottomSurface = "Smooth"
  324. Extra.FormFactor = "Custom" Extra.CanCollide = false
  325. Extra.BrickColor = BrickColor.new("Medium stone grey")
  326. Extra.Size = Vector3.new(0.788000047, 0.200000048, 3.25000024)
  327. local Extraweld = Instance.new("ManualWeld")
  328. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  329. Extraweld.C1 = CFrame.new(1.37048721, -1.24449921, -0.0620036125, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  330. Extraweld.Parent = Extra
  331. local Extra = Instance.new("Part", char)
  332. Extra:BreakJoints()
  333. Extra.TopSurface = "Smooth"
  334. Extra.Name = 'Extra'
  335. Extra.BottomSurface = "Smooth"
  336. Extra.FormFactor = "Custom" Extra.CanCollide = false
  337. Extra.BrickColor = BrickColor.new("Medium stone grey")
  338. Extra.Size = Vector3.new(3.60299969, 2.34500003, 0.918000042)
  339. local Extraweld = Instance.new("ManualWeld")
  340. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  341. Extraweld.C1 = CFrame.new(0.0589904785, -1.5719986, -1.23900461, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  342. Extraweld.Parent = Extra
  343. local Extra = Instance.new("Part", char)
  344. Extra:BreakJoints()
  345. Extra.TopSurface = "Smooth"
  346. Extra.Name = 'Extra'
  347. Extra.BottomSurface = "Smooth"
  348. Extra.FormFactor = "Custom" Extra.CanCollide = false
  349. Extra.BrickColor = BrickColor.new("Medium stone grey")
  350. Extra.Size = Vector3.new(3.62799978, 0.34800005, 0.917999983)
  351. local Extraweld = Instance.new("ManualWeld")
  352. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  353. Extraweld.C1 = CFrame.new(0.0454930663, -2.93249893, -1.23600054, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  354. Extraweld.Parent = Extra
  355. local ExtraMesh = Instance.new("SpecialMesh",Extra)
  356. ExtraMesh.MeshId = ""
  357. ExtraMesh.MeshType = Enum.MeshType.Torso ExtraMesh.Name = "Mesh"
  358. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  359. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  360.  
  361. local Extra = Instance.new("WedgePart", char)
  362. Extra:BreakJoints()
  363. Extra.TopSurface = "Smooth"
  364. Extra.Name = 'Extra'
  365. Extra.BottomSurface = "Smooth"
  366. Extra.FormFactor = "Custom" Extra.CanCollide = false
  367. Extra.BrickColor = BrickColor.new("Medium stone grey")
  368. Extra.Size = Vector3.new(3.70700002, 0.75999999, 1.1500001)
  369. local Extraweld = Instance.new("ManualWeld")
  370. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  371. Extraweld.C1 = CFrame.new(0.0117220879, -0.027305603, 2.04488182, 0.999991775, 0, 0.00417119637, 0, 1, 0, -0.00417116284, 0, 0.999991715)
  372. Extraweld.Parent = Extra
  373. local Extra = Instance.new("Part", char)
  374. Extra:BreakJoints()
  375. Extra.TopSurface = "Smooth"
  376. Extra.Name = 'Extra'
  377. Extra.BottomSurface = "Smooth"
  378. Extra.FormFactor = "Custom" Extra.CanCollide = false
  379. Extra.BrickColor = BrickColor.new("Medium stone grey")
  380. Extra.Size = Vector3.new(0.200000003, 0.921000123, 0.634000063)
  381. local Extraweld = Instance.new("ManualWeld")
  382. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  383. Extraweld.C1 = CFrame.new(1.75548577, 0.794002533, 2.21600151, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  384. Extraweld.Parent = Extra
  385. local Extra = Instance.new("Part", char)
  386. Extra:BreakJoints()
  387. Extra.TopSurface = "Smooth"
  388. Extra.Name = 'Extra'
  389. Extra.BottomSurface = "Smooth"
  390. Extra.FormFactor = "Custom" Extra.CanCollide = false
  391. Extra.BrickColor = BrickColor.new("Medium stone grey")
  392. Extra.Size = Vector3.new(0.200000003, 0.921000123, 0.634000063)
  393. local Extraweld = Instance.new("ManualWeld")
  394. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  395. Extraweld.C1 = CFrame.new(-1.68250918, 0.794002533, 2.21599579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  396. Extraweld.Parent = Extra
  397. local Extra = Instance.new("Part", char)
  398. Extra:BreakJoints()
  399. Extra.TopSurface = "Smooth"
  400. Extra.Name = 'Extra'
  401. Extra.BottomSurface = "Smooth"
  402. Extra.FormFactor = "Custom" Extra.CanCollide = false
  403. Extra.BrickColor = BrickColor.new("Medium stone grey")
  404. Extra.Size = Vector3.new(0.296999991, 0.22600013, 0.634000063)
  405. local Extraweld = Instance.new("ManualWeld")
  406. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  407. Extraweld.C1 = CFrame.new(1.80398464, 1.14150238, 2.21599388, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  408. Extraweld.Parent = Extra
  409. local Extra = Instance.new("Part", char)
  410. Extra:BreakJoints()
  411. Extra.TopSurface = "Smooth"
  412. Extra.Name = 'Extra'
  413. Extra.BottomSurface = "Smooth"
  414. Extra.FormFactor = "Custom" Extra.CanCollide = false
  415. Extra.BrickColor = BrickColor.new("Medium stone grey")
  416. Extra.Size = Vector3.new(0.296999991, 0.22600013, 0.634000063)
  417. local Extraweld = Instance.new("ManualWeld")
  418. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  419. Extraweld.C1 = CFrame.new(-1.72101617, 1.14150238, 2.2159977, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  420. Extraweld.Parent = Extra
  421. local Extra = Instance.new("Part", char)
  422. Extra:BreakJoints()
  423. Extra.TopSurface = "Smooth"
  424. Extra.Name = 'Extra'
  425. Extra.BottomSurface = "Smooth"
  426. Extra.FormFactor = "Custom" Extra.CanCollide = false
  427. Extra.BrickColor = BrickColor.new("Medium stone grey")
  428. Extra.Size = Vector3.new(1.43400002, 0.232000113, 1.14300013)
  429. local Extraweld = Instance.new("ManualWeld")
  430. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  431. Extraweld.C1 = CFrame.new(1.43379831, -1.95537186, 2.23299217, 0.0168066788, 0.999856353, 5.82076609e-010, -0.999856353, 0.0168066788, 6.33299351e-008, 0, 0, 1)
  432. Extraweld.Parent = Extra
  433. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  434. ExtraMesh.Name = "Mesh"
  435. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  436. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  437.  
  438. local Extra = Instance.new("Part", char)
  439. Extra:BreakJoints()
  440. Extra.TopSurface = "Smooth"
  441. Extra.Name = 'Extra'
  442. Extra.BottomSurface = "Smooth"
  443. Extra.FormFactor = "Custom" Extra.CanCollide = false
  444. Extra.BrickColor = BrickColor.new("Really black")
  445. Extra.Size = Vector3.new(1.43400002, 0.232000113, 0.829000115)
  446. local Extraweld = Instance.new("ManualWeld")
  447. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  448. Extraweld.C1 = CFrame.new(1.43379307, -2.00535631, 2.23299789, 0.0168066509, 0.999854743, 5.82076609e-010, -0.999854743, 0.0168066509, 6.33299351e-008, 0, 0, 1)
  449. Extraweld.Parent = Extra
  450. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  451. ExtraMesh.Name = "Mesh"
  452. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  453. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  454.  
  455. local Extra = Instance.new("Part", char)
  456. Extra:BreakJoints()
  457. Extra.TopSurface = "Smooth"
  458. Extra.Name = 'Extra'
  459. Extra.BottomSurface = "Smooth"
  460. Extra.FormFactor = "Custom" Extra.CanCollide = false
  461. Extra.BrickColor = BrickColor.new("Medium stone grey")
  462. Extra.Size = Vector3.new(1.43400002, 0.200000003, 1.14300013)
  463. local Extraweld = Instance.new("ManualWeld")
  464. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  465. Extraweld.C1 = CFrame.new(1.38780296, -1.85258067, -2.23299694, 0.0168067049, 0.999858499, 4.07453626e-010, 0.999858499, -0.0168067217, 8.94069672e-008, 8.94069672e-008, -1.46930046e-009, -1)
  466. Extraweld.Parent = Extra
  467. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  468. ExtraMesh.Name = "Mesh"
  469. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  470. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  471.  
  472. local Extra = Instance.new("Part", char)
  473. Extra:BreakJoints()
  474. Extra.TopSurface = "Smooth"
  475. Extra.Name = 'Extra'
  476. Extra.BottomSurface = "Smooth"
  477. Extra.FormFactor = "Custom" Extra.CanCollide = false
  478. Extra.BrickColor = BrickColor.new("Really black")
  479. Extra.Size = Vector3.new(1.43400002, 0.200000003, 0.829000115)
  480. local Extraweld = Instance.new("ManualWeld")
  481. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  482. Extraweld.C1 = CFrame.new(1.3878001, -1.90258074, -2.23299599, 0.0168067086, 0.999858558, 9.89530236e-010, 0.999858558, -0.0168067235, 1.2665987e-007, 8.94069672e-008, -1.46930046e-009, -1)
  483. Extraweld.Parent = Extra
  484. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  485. ExtraMesh.Name = "Mesh"
  486. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  487. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  488.  
  489. local Extra = Instance.new("Part", char)
  490. Extra:BreakJoints()
  491. Extra.TopSurface = "Smooth"
  492. Extra.Name = 'Extra'
  493. Extra.BottomSurface = "Smooth"
  494. Extra.FormFactor = "Custom" Extra.CanCollide = false
  495. Extra.BrickColor = BrickColor.new("Medium stone grey")
  496. Extra.Size = Vector3.new(4.34100008, 0.573000073, 4.08699989)
  497. local Extraweld = Instance.new("ManualWeld")
  498. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  499. Extraweld.C1 = CFrame.new(-0.117188454, -2.12586164, -0.534004211, 0.016806718, 0.999858737, 5.82076609e-010, -0.999858737, 0.0168067198, -1.11758709e-008, 0, 0, 1)
  500. Extraweld.Parent = Extra
  501. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  502. ExtraMesh.Name = "Mesh"
  503. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  504. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  505.  
  506. local Extra = Instance.new("Part", char)
  507. Extra:BreakJoints()
  508. Extra.TopSurface = "Smooth"
  509. Extra.Name = 'Extra'
  510. Extra.BottomSurface = "Smooth"
  511. Extra.FormFactor = "Custom" Extra.CanCollide = false
  512. Extra.BrickColor = BrickColor.new("Really black")
  513. Extra.Size = Vector3.new(4.34100008, 0.573000073, 3.773)
  514. local Extraweld = Instance.new("ManualWeld")
  515. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  516. Extraweld.C1 = CFrame.new(-0.11719501, -2.17586231, -0.534002304, 0.0168067198, 0.999858797, 5.82076609e-010, -0.999858797, 0.0168067198, 0, 0, 0, 1)
  517. Extraweld.Parent = Extra
  518. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  519. ExtraMesh.Name = "Mesh"
  520. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  521. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  522.  
  523. local Extra = Instance.new("Part", char)
  524. Extra:BreakJoints()
  525. Extra.TopSurface = "Smooth"
  526. Extra.Name = 'Extra'
  527. Extra.BottomSurface = "Smooth"
  528. Extra.FormFactor = "Custom" Extra.CanCollide = false
  529. Extra.BrickColor = BrickColor.new("Medium stone grey")
  530. Extra.Size = Vector3.new(4.34100008, 0.573000073, 4.08699989)
  531. local Extraweld = Instance.new("ManualWeld")
  532. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  533. Extraweld.C1 = CFrame.new(-0.117194057, -2.01313376, 0.534003735, 0.0168067031, 0.999856472, 5.82076609e-010, 0.999856472, -0.0168066565, 5.21540642e-008, 8.94069672e-008, -1.46929091e-009, -1)
  534. Extraweld.Parent = Extra
  535. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  536. ExtraMesh.Name = "Mesh"
  537. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  538. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  539.  
  540. local Extra = Instance.new("Part", char)
  541. Extra:BreakJoints()
  542. Extra.TopSurface = "Smooth"
  543. Extra.Name = 'Extra'
  544. Extra.BottomSurface = "Smooth"
  545. Extra.FormFactor = "Custom" Extra.CanCollide = false
  546. Extra.BrickColor = BrickColor.new("Really black")
  547. Extra.Size = Vector3.new(4.34100008, 0.573000073, 3.773)
  548. local Extraweld = Instance.new("ManualWeld")
  549. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  550. Extraweld.C1 = CFrame.new(-0.117191076, -2.0631218, 0.534003735, 0.0168067031, 0.999856532, 5.82076609e-010, 0.999856532, -0.0168066584, 5.21540642e-008, 8.94069672e-008, -1.46929091e-009, -1)
  551. Extraweld.Parent = Extra
  552. local ExtraMesh = Instance.new("CylinderMesh",Extra)
  553. ExtraMesh.Name = "Mesh"
  554. ExtraMesh.Offset = Vector3.new(0, 0, 0)
  555. ExtraMesh.Scale = Vector3.new(1, 1, 1)
  556.  
  557. local Extra = Instance.new("Part", char)
  558. Extra:BreakJoints()
  559. Extra.TopSurface = "Smooth"
  560. Extra.Name = 'Extra'
  561. Extra.BottomSurface = "Smooth"
  562. Extra.FormFactor = "Custom" Extra.CanCollide = false
  563. Extra.BrickColor = BrickColor.new("Dark stone grey")
  564. Extra.Size = Vector3.new(0.413999707, 0.394999981, 1.97000003)
  565. local Extraweld = Instance.new("ManualWeld")
  566. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  567. Extraweld.C1 = CFrame.new(1.54100084, -2.53600311, -2.32900763, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  568. Extraweld.Parent = Extra
  569. local Extra = Instance.new("Part", char)
  570. Extra:BreakJoints()
  571. Extra.TopSurface = "Smooth"
  572. Extra.Name = 'Extra'
  573. Extra.BottomSurface = "Smooth"
  574. Extra.FormFactor = "Custom" Extra.CanCollide = false
  575. Extra.BrickColor = BrickColor.new("Dark stone grey")
  576. Extra.Size = Vector3.new(0.413999707, 0.394999981, 1.97000003)
  577. local Extraweld = Instance.new("ManualWeld")
  578. Extraweld.Part0 = Seat Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  579. Extraweld.C1 = CFrame.new(-1.43300843, -2.53600311, -2.32900667, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  580. Extraweld.Parent = Extra
  581. local Sight1 = Instance.new("Part", char)
  582. Sight1:BreakJoints()
  583. Sight1.TopSurface = "Smooth"
  584. Sight1.Name = 'Sight1'
  585. Sight1.BottomSurface = "Smooth"
  586. Sight1.FormFactor = "Custom" Sight1.CanCollide = false
  587. Sight1.BrickColor = BrickColor.new("Really black")
  588. Sight1.Size = Vector3.new(0.375999987, 1.13800001, 0.219000354)
  589. local Sight1weld = Instance.new("ManualWeld")
  590. Sight1weld.Part0 = Seat Sight1weld.Part1 = Sight1 Sight1weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  591. Sight1weld.C1 = CFrame.new(0.0589828193, -3.94650269, 0.53849411, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  592. Sight1weld.Parent = Sight1
  593. local Pack = Instance.new("Part", char)
  594. Pack:BreakJoints()
  595. Pack.TopSurface = "Smooth"
  596. Pack.Name = 'Pack'
  597. Pack.BottomSurface = "Smooth"
  598. Pack.FormFactor = "Custom" Pack.CanCollide = false
  599. Pack.BrickColor = BrickColor.new("Really black")
  600. Pack.Size = Vector3.new(2.5619998, 2.32999992, 0.987000108)
  601. local Packweld = Instance.new("ManualWeld")
  602. Packweld.Part0 = Seat Packweld.Part1 = Pack Packweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  603. Packweld.C1 = CFrame.new(0.0589860976, -1.5644989, -1.83750725, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  604. Packweld.Parent = Pack
  605. local Sight = Instance.new("Part", char)
  606. Sight:BreakJoints()
  607. Sight.TopSurface = "Smooth"
  608. Sight.Name = 'Sight'
  609. Sight.BottomSurface = "Smooth"
  610. Sight.FormFactor = "Custom" Sight.CanCollide = false
  611. Sight.BrickColor = BrickColor.new("Really black")
  612. Sight.Size = Vector3.new(0.94599998, 0.701999962, 0.219000354)
  613. Sight.Transparency = 0.7
  614. local Sightweld = Instance.new("ManualWeld")
  615. Sightweld.Part0 = Seat Sightweld.Part1 = Sight Sightweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  616. Sightweld.C1 = CFrame.new(-0.227016628, -3.22650146, 0.538492203, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  617. Sightweld.Parent = Sight
  618. local FakeTorso = Instance.new("Part", char)
  619. FakeTorso:BreakJoints()
  620. FakeTorso.TopSurface = "Smooth"
  621. FakeTorso.Name = 'FakeTorso'
  622. FakeTorso.BottomSurface = "Smooth"
  623. FakeTorso.FormFactor = "Custom" FakeTorso.CanCollide = false
  624. FakeTorso.BrickColor = BrickColor.new("Really black")
  625. FakeTorso.Size = Vector3.new(2, 2, 1)
  626. local FakeTorsoweld = Instance.new("ManualWeld")
  627. FakeTorsoweld.Part0 = Seat FakeTorsoweld.Part1 = FakeTorso FakeTorsoweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  628. FakeTorsoweld.C1 = CFrame.new(0.0261787176, -1.84207273, 0.207453251, 0.999655664, 0.0114495121, -0.0235939212, -0.00555597525, 0.971703291, 0.236139566, 0.0256299879, -0.235926434, 0.971433282)
  629. FakeTorsoweld.Parent = FakeTorso
  630. local GunStable = Instance.new("Part", char)
  631. GunStable:BreakJoints()
  632. GunStable.TopSurface = "Smooth"
  633. GunStable.Name = 'GunStable'
  634. GunStable.BottomSurface = "Smooth"
  635. GunStable.FormFactor = "Custom" GunStable.CanCollide = false
  636. GunStable.BrickColor = BrickColor.new("Really black")
  637. GunStable.Size = Vector3.new(0.45600003, 2.32999992, 0.370000124)
  638. local GunStableweld = Instance.new("ManualWeld")
  639. GunStableweld.Part0 = Seat GunStableweld.Part1 = GunStable GunStableweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  640. GunStableweld.C1 = CFrame.new(0.0589980781, -3.84950256, -2.08850527, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  641. GunStableweld.Parent = GunStable
  642. local Boostpart = Instance.new("Part", char)
  643. Boostpart:BreakJoints()
  644. Boostpart.TopSurface = "Smooth"
  645. Boostpart.Name = 'Boostpart'
  646. Boostpart.BottomSurface = "Smooth"
  647. Boostpart.FormFactor = "Custom" Boostpart.CanCollide = false
  648. Boostpart.BrickColor = BrickColor.new("Really black")
  649. Boostpart.Size = Vector3.new(0.413999707, 0.394999981, 0.200000003)
  650. local Boostpartweld = Instance.new("ManualWeld")
  651. Boostpartweld.Part0 = Seat Boostpartweld.Part1 = Boostpart Boostpartweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  652. Boostpartweld.C1 = CFrame.new(-1.43300271, -2.53600311, -3.37199974, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  653. Boostpartweld.Parent = Boostpart
  654. local Boostpart2 = Instance.new("Part", char)
  655. Boostpart2:BreakJoints()
  656. Boostpart2.TopSurface = "Smooth"
  657. Boostpart2.Name = 'Boostpart2'
  658. Boostpart2.BottomSurface = "Smooth"
  659. Boostpart2.FormFactor = "Custom" Boostpart2.CanCollide = false
  660. Boostpart2.BrickColor = BrickColor.new("Really black")
  661. Boostpart2.Size = Vector3.new(0.413999707, 0.394999981, 0.200000003)
  662. local Boostpart2weld = Instance.new("ManualWeld")
  663. Boostpart2weld.Part0 = Seat Boostpart2weld.Part1 = Boostpart2 Boostpart2weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  664. Boostpart2weld.C1 = CFrame.new(1.54098463, -2.53600311, -3.37200499, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  665. Boostpart2weld.Parent = Boostpart2
  666. local GunBarral = Instance.new("Part", char)
  667. GunBarral:BreakJoints()
  668. GunBarral.TopSurface = "Smooth"
  669. GunBarral.Name = 'GunBarral'
  670. GunBarral.BottomSurface = "Smooth"
  671. GunBarral.FormFactor = "Custom" GunBarral.CanCollide = false
  672. GunBarral.BrickColor = BrickColor.new("Really black")
  673. GunBarral.Size = Vector3.new(0.375999987, 0.352999985, 4.88500023)
  674. local GunBarralweld = Instance.new("ManualWeld")
  675. GunBarralweld.Part0 = Seat GunBarralweld.Part1 = GunBarral GunBarralweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  676. GunBarralweld.C1 = CFrame.new(0.0589904487, -4.68700027, -0.35300684, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  677. GunBarralweld.Parent = GunBarral
  678. local GunMag = Instance.new("Part", char)
  679. GunMag:BreakJoints()
  680. GunMag.TopSurface = "Smooth"
  681. GunMag.Name = 'GunMag'
  682. GunMag.BottomSurface = "Smooth"
  683. GunMag.FormFactor = "Custom" GunMag.CanCollide = false
  684. GunMag.BrickColor = BrickColor.new("Really black")
  685. GunMag.Size = Vector3.new(0.824000001, 0.654999971, 0.892000139)
  686. local GunMagweld = Instance.new("ManualWeld")
  687. GunMagweld.Part0 = Seat GunMagweld.Part1 = GunMag GunMagweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  688. GunMagweld.C1 = CFrame.new(0.0589942634, -4.68700027, -2.34950876, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  689. GunMagweld.Parent = GunMag
  690. local GunBlast = Instance.new("Part", char)
  691. GunBlast:BreakJoints()
  692. GunBlast.TopSurface = "Smooth"
  693. GunBlast.Name = 'GunBlast'
  694. GunBlast.BottomSurface = "Smooth"
  695. GunBlast.FormFactor = "Custom" GunBlast.CanCollide = false
  696. GunBlast.BrickColor = BrickColor.new("Really black")
  697. GunBlast.Size = Vector3.new(0.941999972, 0.969999969, 0.200000003)
  698. local GunBlastweld = Instance.new("ManualWeld")
  699. GunBlastweld.Part0 = Seat GunBlastweld.Part1 = GunBlast GunBlastweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  700. GunBlastweld.C1 = CFrame.new(0.0589976311, -4.68700027, 1.98949432, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  701. GunBlastweld.Parent = GunBlast
  702.  
  703.  
  704.  
  705. ------------------------------------------------------------------------------------------
  706.  
  707. Tween(heaw, CFrame.new(-0.413999856, -1.92999959, -0.210000008, 1, 0, 0, 0, 0.978148043, -0.207911745, 0, 0.207911745, 0.978148043) , .1, true)
  708. Tween(RAW, CFrame.new(-1.87999964, 1.04999948, 1.06999934, 0.881515563, 0.241381884, 0.405797154, -0.467570841, 0.326720238, 0.821365237, 0.0656802952, -0.913782716, 0.400870949), .1, true)
  709. Tween(LAW, CFrame.new(0.270001173, -1.18999922, -1.43999898, 0.788093567, 0.286842585, -0.544639528, -0.539656579, -0.103669383, -0.835481584, -0.296113938, 0.952355325, 0.0730953068), .1, true)
  710. Tween(LLW,CFrame.new(0.120000415, -1.66999829, 0.400000453, 0.999980032, -0.00637814868, 0.000165756792, -0.000388266519, -0.0867659673, -0.996230364, 0.00636848854, 0.99620986, -0.0867666453) , .1, true)
  711. Tween(RLW, CFrame.new(-1.03999949, 1.54999995, -0.25000003, 0.999847949, 0.00182427373, 0.0173568055, -0.0173860081, 0.190793589, 0.981477916, -0.00152108353, -0.981630087, 0.190796345), .1, true)
  712. boosting = false
  713.  
  714. function boost()
  715. if boosting == false then
  716. boosting = true
  717.  
  718. human.WalkSpeed = 300
  719. coroutine.resume(coroutine.create(function()
  720. for i=1, 100 do
  721. wait(0.05)
  722. local p = Instance.new("Part", char)
  723. p.Anchored = true
  724. p.BrickColor = BrickColor.Random()
  725. p.Transparency = 0
  726. p.CanCollide = false
  727. p.FormFactor = "Custom"
  728. p.Name = 'Effect'
  729. p.Size = Vector3.new(2, 2, 2)
  730. p.CFrame = Boostpart.CFrame * CFrame.Angles(math.random(1,360),math.random(1,360),math.random(1,360))
  731. coroutine.resume(coroutine.create(function()
  732. for i=1, 10 do
  733. p.Transparency = p.Transparency + 0.1
  734. wait()
  735. if i == 10 then
  736. p:Destroy()
  737. end
  738. end
  739. end))
  740. end
  741. end))
  742.  
  743.  
  744. for i=1, 100 do
  745. wait(0.05)
  746. local p = Instance.new("Part", char)
  747. p.Anchored = true
  748. p.CanCollide = false
  749. p.BrickColor = BrickColor.Random()
  750. p.Transparency = 0
  751. p.FormFactor = "Custom"
  752. p.Name = 'Effect'
  753. p.Size = Vector3.new(2, 2, 2)
  754. p.CFrame = Boostpart2.CFrame * CFrame.Angles(math.random(1,360),math.random(1,360),math.random(1,360))
  755. coroutine.resume(coroutine.create(function()
  756. for i=1, 10 do
  757. p.Transparency = p.Transparency + 0.1
  758. wait()
  759. if i == 10 then
  760. p:Destroy()
  761. end
  762. end
  763. end))
  764. end
  765. human.WalkSpeed = 16
  766. wait(9)
  767. boosting = false
  768. end
  769. end
  770.  
  771.  
  772. mouse.KeyDown:connect(function(key)
  773. if key == "f" then
  774. boost()
  775. elseif key == 'q' then
  776. mode = "damage"
  777. elseif key == "e" then
  778. mode = "steel"
  779. elseif key == 'r' then
  780. mode = 'draw'
  781. elseif key == 't' then
  782. mode = 'explode'
  783. elseif key == 'h' then
  784. mode = 'heal'
  785. elseif key == 'z' then
  786. mode = 'tele'
  787. end
  788. end)
  789. function shoot()
  790. pcall(function()
  791.  
  792. local ray = Ray.new(GunBlast.CFrame.p, (mouse.Hit.p - GunBlast.CFrame.p).unit*400)
  793. local hit, position = game.Workspace:FindPartOnRay(ray, char)
  794.  
  795. local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  796.  
  797. if mode == "damage" then
  798. if humanoid and humanoid.Health ~= 0 then
  799. if hit.Name == 'Head' or hit.Name == 'Handle' then
  800. humanoid:TakeDamage(5000)
  801. else
  802. humanoid:TakeDamage(30)
  803. end
  804. end
  805. elseif mode == "steel" then
  806. if humanoid and humanoid.Health ~= 0 then
  807. takehats(humanoid.Parent)
  808. end
  809. elseif mode == 'draw' then
  810. local p = Instance.new("Part", workspace)
  811. p.Anchored = true
  812. p.Parent = char
  813. p.CFrame = CFrame.new(mouse.Hit.X, mouse.Hit.Y + 0.1, mouse.Hit.Z)
  814. elseif mode == 'explode' then
  815. local p = Instance.new("Part", workspace)
  816. p.Anchored = true
  817. p.Parent = char
  818. p.CFrame = CFrame.new(mouse.Hit.X, mouse.Hit.Y + 0.1, mouse.Hit.Z)
  819. p.Transparency = 1
  820. local ex = Instance.new("Explosion", p)
  821. ex.Position = p.Position
  822. elseif mode == 'tele' then
  823. coroutine.resume(coroutine.create(function()
  824. wait(0.1)
  825. local p = Instance.new("Part", workspace)
  826. p.Anchored = true
  827. p.Parent = char
  828. p.CFrame = CFrame.new(mouse.Hit.X, mouse.Hit.Y + 0.8, mouse.Hit.Z)
  829. p.CanCollide = true
  830. p.Transparency = 1
  831. char.Torso.CFrame = p.CFrame
  832. p:Destroy()
  833. end))
  834. elseif mode == 'heal' then
  835. if humanoid and humanoid.Health ~= 0 then
  836. humanoid.Health = humanoid.Health + 20
  837.  
  838. end
  839. end
  840.  
  841. local distance = (position - GunBlast.CFrame.p).magnitude
  842. local rayPart = Instance.new("Part", char)
  843. rayPart.Name = "RayPart"
  844. if mode == "damage" then
  845. rayPart.BrickColor = BrickColor.new("Really red")
  846. elseif mode == "steel" then
  847. rayPart.BrickColor = BrickColor.new("Royal purple")
  848. elseif mode == 'explode' then
  849. rayPart.BrickColor = BrickColor.new("Bright blue")
  850. elseif mode == 'heal' then
  851. rayPart.BrickColor = BrickColor.new("Lime green")
  852. elseif mode == 'tele' then
  853. rayPart.BrickColor = BrickColor.new("Brown")
  854. end
  855. rayPart.Transparency = 0
  856. rayPart.Anchored = true
  857. rayPart.CanCollide = false
  858. rayPart.TopSurface = Enum.SurfaceType.Smooth
  859. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  860. rayPart.formFactor = Enum.FormFactor.Custom
  861. rayPart.Size = Vector3.new(0.4, 0.4, distance)
  862. rayPart.CFrame = CFrame.new(position, GunBlast.CFrame.p) * CFrame.new(0, 0, -distance/2)
  863.  
  864. local rp2 = Instance.new("Part", char)
  865. rp2.Name = "RayPart"
  866. rp2.BrickColor = BrickColor.new("White")
  867. rp2.Transparency = 0
  868. rp2.Anchored = true
  869. rp2.CanCollide = false
  870. rp2.TopSurface = Enum.SurfaceType.Smooth
  871. rp2.BottomSurface = Enum.SurfaceType.Smooth
  872. rp2.formFactor = Enum.FormFactor.Custom
  873. rp2.Size = Vector3.new(0.1, 0.1, distance)
  874. rp2.CFrame = CFrame.new(position, GunBlast.CFrame.p) * CFrame.new(0, 0, -distance/2)
  875. coroutine.resume(coroutine.create(function()
  876. for i=1, 10 do
  877. rayPart.Transparency = rayPart.Transparency + 0.1
  878. rp2.Transparency = rp2.Transparency + 0.1
  879. wait()
  880. if i == 10 then
  881. rayPart:Destroy()
  882. rp2:Destroy()
  883. end
  884. end
  885. end))
  886. end)
  887. end
  888.  
  889.  
  890. mouse.Button1Down:connect(function()
  891. shoot()
  892. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement