Advertisement
Adog1656

WheelChair

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