Advertisement
sIendytubble

henry stickmin dark energy blaster

Aug 31st, 2020 (edited)
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.32 KB | None | 0 0
  1. -- this script is basically a recreation of a
  2. -- unique fail in a henry stickmin game (Infiltrating the airship)
  3. -- basically its a option ingame that basically fires a laser that disintegrates anything it touches
  4. -- basically thats it
  5. -- enjoy
  6. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  7. local Player,game,owner = owner,game
  8. local RealPlayer = Player
  9. do
  10. print("FE Compatibility code by Mokiros")
  11. local rp = RealPlayer
  12. script.Parent = rp.Character
  13.  
  14. --RemoteEvent for communicating
  15. local Event = Instance.new("RemoteEvent")
  16. Event.Name = "UserInput_Event"
  17.  
  18. --Fake event to make stuff like Mouse.KeyDown work
  19. local function fakeEvent()
  20. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  21. t.connect = t.Connect
  22. return t
  23. end
  24.  
  25. --Creating fake input objects with fake variables
  26. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  27. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  28. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  29. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  30. end}
  31. --Merged 2 functions into one by checking amount of arguments
  32. CAS.UnbindAction = CAS.BindAction
  33.  
  34. --This function will trigger the events that have been :Connect()'ed
  35. local function te(self,ev,...)
  36. local t = m[ev]
  37. if t and t._fakeEvent then
  38. for _,f in pairs(t.Functions) do
  39. f(...)
  40. end
  41. end
  42. end
  43. m.TrigEvent = te
  44. UIS.TrigEvent = te
  45.  
  46. Event.OnServerEvent:Connect(function(plr,io)
  47. if plr~=rp then return end
  48. m.Target = io.Target
  49. m.Hit = io.Hit
  50. if not io.isMouse then
  51. local b = io.UserInputState == Enum.UserInputState.Begin
  52. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  53. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  54. end
  55. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  56. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  57. end
  58. for _,t in pairs(CAS.Actions) do
  59. for _,k in pairs(t.Keys) do
  60. if k==io.KeyCode then
  61. t.Function(t.Name,io.UserInputState,io)
  62. end
  63. end
  64. end
  65. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  66. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  67. end
  68. end)
  69. Event.Parent = NLS([==[
  70. local Player = game:GetService("Players").LocalPlayer
  71. local Event = script:WaitForChild("UserInput_Event")
  72. local Mouse = Player:GetMouse()
  73. local UIS = game:GetService("UserInputService")
  74. local input = function(io,a)
  75. if a then return end
  76. --Since InputObject is a client-side instance, we create and pass table instead
  77. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  78. end
  79. UIS.InputBegan:Connect(input)
  80. UIS.InputEnded:Connect(input)
  81. local h,t
  82. --Give the server mouse data 30 times every second, but only if the values changed
  83. --If player is not moving their mouse, client won't fire events
  84. while wait(1/30) do
  85. if h~=Mouse.Hit or t~=Mouse.Target then
  86. h,t=Mouse.Hit,Mouse.Target
  87. Event:FireServer({isMouse=true,Target=t,Hit=h})
  88. end
  89. end]==],Player.Character)
  90.  
  91. ----Sandboxed game object that allows the usage of client-side methods and services
  92. --Real game object
  93. local _rg = game
  94.  
  95. --Metatable for fake service
  96. local fsmt = {
  97. __index = function(self,k)
  98. local s = rawget(self,"_RealService")
  99. if s then
  100. return typeof(s[k])=="function"
  101. and function(_,...)return s[k](s,...)end or s[k]
  102. end
  103. end,
  104. __newindex = function(self,k,v)
  105. local s = rawget(self,"_RealService")
  106. if s then s[k]=v end
  107. end
  108. }
  109. local function FakeService(t,RealService)
  110. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  111. return setmetatable(t,fsmt)
  112. end
  113.  
  114. --Fake game object
  115. local g = {
  116. GetService = function(self,s)
  117. return rawget(self,s) or _rg:GetService(s)
  118. end,
  119. Players = FakeService({
  120. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  121. },"Players"),
  122. UserInputService = FakeService(UIS,"UserInputService"),
  123. ContextActionService = FakeService(CAS,"ContextActionService"),
  124. RunService = FakeService({
  125. _btrs = {},
  126. RenderStepped = _rg:GetService("RunService").Heartbeat,
  127. BindToRenderStep = function(self,name,_,fun)
  128. self._btrs[name] = self.Heartbeat:Connect(fun)
  129. end,
  130. UnbindFromRenderStep = function(self,name)
  131. self._btrs[name]:Disconnect()
  132. end,
  133. },"RunService")
  134. }
  135. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  136. g.service = g.GetService
  137. FakeService(g,game)
  138. --Changing owner to fake player object to support owner:GetMouse()
  139. game,owner = g,g.Players.LocalPlayer
  140. end
  141. function aaa(pos)
  142. coroutine.resume(coroutine.create(function()
  143. Part0 = Instance.new("Part")
  144. SpecialMesh1 = Instance.new("SpecialMesh")
  145. Part0.Name = "purpleBlast"
  146. Part0.Parent = workspace
  147. Part0.CFrame = CFrame.new(180.500153, 2.00000501, -94.9759216, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  148. Part0.Position = Vector3.new(180.500153, 2.00000501, -94.9759216)
  149. Part0.Color = Color3.new(0.419608, 0.196078, 0.486275)
  150. Part0.Size = Vector3.new(4, 4, 4)
  151. Part0.Anchored = true
  152. Part0.BottomSurface = Enum.SurfaceType.Smooth
  153. Part0.BrickColor = BrickColor.new("Bright violet")
  154. Part0.Material = Enum.Material.Neon
  155. Part0.TopSurface = Enum.SurfaceType.Smooth
  156. Part0.brickColor = BrickColor.new("Bright violet")
  157. Part0.Shape = Enum.PartType.Ball
  158. SpecialMesh1.Parent = Part0
  159. SpecialMesh1.MeshType = Enum.MeshType.Sphere
  160. Part0.Position = pos
  161. g(Part0)
  162. end))
  163. end
  164. function by(part)
  165. coroutine.resume(coroutine.create(function()
  166. --zzz = Instance.new("Sound",part)
  167. --zzz.SoundId = "rbxassetid://184211507"
  168. --zzz.Volume = 10
  169. --zzz:Play()
  170. part.BrickColor = BrickColor.new("White")
  171. part.Material = "Neon"
  172. part.Anchored = true
  173. wait(.3)
  174. part.Transparency = .2
  175. wait(.1)
  176. part.Transparency = .4
  177. wait(.1)
  178. part.Transparency = .6
  179. wait(.1)
  180. part.Transparency = .8
  181. wait(.1)
  182. part.Parent = nil
  183. end))
  184. end
  185. function Destruction(Pos,Radius)
  186. local function Destroy(Model)
  187. for i ,v in ipairs(Model:GetDescendants()) do
  188. if v:isA("BasePart") and v.Name ~= "Baseplate" and v.Name ~= "base" and v.Name ~= "Base" and v.Name ~= "baseplate" then
  189. if (v.Position-Pos).magnitude < Radius then
  190. if v.Name ~= "purpleBlast" then
  191. by(v)
  192. end
  193. end
  194. end
  195. if #v:getChildren() > 0 then
  196. Destroy(v)
  197. end
  198. end
  199. end
  200.  
  201. Destroy(game.Workspace)
  202. end
  203. function g(parta)
  204. coroutine.resume(coroutine.create(function()
  205. while wait() do
  206. parta.Mesh.Scale = parta.Mesh.Scale + Vector3.new(1,1,1)
  207. Destruction(parta.Position,parta.Mesh.Scale.Y*2)
  208. end
  209. end))
  210. end
  211. player = game.Players.LocalPlayer
  212. char = player.Character
  213. mouse = player:GetMouse()
  214. Model0 = Instance.new("Model")
  215. Model1 = Instance.new("Model")
  216. Part2 = Instance.new("Part")
  217. Part3 = Instance.new("Part")
  218. Weld4 = Instance.new("Weld")
  219. CFrameValue5 = Instance.new("CFrameValue")
  220. Part6 = Instance.new("Part")
  221. Weld7 = Instance.new("Weld")
  222. CFrameValue8 = Instance.new("CFrameValue")
  223. Part9 = Instance.new("Part")
  224. Weld10 = Instance.new("Weld")
  225. CFrameValue11 = Instance.new("CFrameValue")
  226. Part12 = Instance.new("Part")
  227. Weld13 = Instance.new("Weld")
  228. CFrameValue14 = Instance.new("CFrameValue")
  229. Part15 = Instance.new("Part")
  230. Weld16 = Instance.new("Weld")
  231. CFrameValue17 = Instance.new("CFrameValue")
  232. Part18 = Instance.new("Part")
  233. Weld19 = Instance.new("Weld")
  234. Part20 = Instance.new("Part")
  235. Weld21 = Instance.new("Weld")
  236. Model0.Parent = char
  237. Model1.Parent = Model0
  238. Part2.Parent = Model1
  239. Part2.CFrame = CFrame.new(188.021896, 7.229599, -74.209053, -0.965234935, 0.261383891, -0.000119940989, -0.261383146, -0.965233088, -0.00198605866, -0.000634894706, -0.00188566255, 0.999998033)
  240. Part2.Orientation = Vector3.new(0.109999999, -0.00999999978, -164.850006)
  241. Part2.Position = Vector3.new(188.021896, 7.229599, -74.209053)
  242. Part2.Rotation = Vector3.new(0.109999999, -0.00999999978, -164.850006)
  243. Part2.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
  244. Part2.BottomSurface = Enum.SurfaceType.Smooth
  245. Part2.Material = Enum.Material.SmoothPlastic
  246. Part2.TopSurface = Enum.SurfaceType.Smooth
  247. Part3.Parent = Model1
  248. Part3.CFrame = CFrame.new(187.268295, 6.71644163, -74.220871, -0.0026563406, -0.999996483, -0.000119940989, 0.999994516, -0.00265610218, -0.00198605866, 0.00198573316, -0.000125215971, 0.999998033)
  249. Part3.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  250. Part3.Position = Vector3.new(187.268295, 6.71644163, -74.220871)
  251. Part3.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  252. Part3.Color = Color3.new(0.34902, 0.133333, 0.34902)
  253. Part3.Size = Vector3.new(0.521430671, 0.521430671, 0.521430671)
  254. Part3.BottomSurface = Enum.SurfaceType.Smooth
  255. Part3.BrickColor = BrickColor.new("Bright violet")
  256. Part3.Material = Enum.Material.Neon
  257. Part3.TopSurface = Enum.SurfaceType.Smooth
  258. Part3.brickColor = BrickColor.new("Bright violet")
  259. Part3.Shape = Enum.PartType.Ball
  260. Weld4.Name = "qCFrameWeldThingy"
  261. Weld4.Parent = Part3
  262. Weld4.C1 = CFrame.new(0.511176348, -0.754959106, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
  263. Weld4.Part0 = Part2
  264. Weld4.Part1 = Part3
  265. Weld4.part1 = Part3
  266. CFrameValue5.Name = "qRelativeCFrameWeldValue"
  267. CFrameValue5.Parent = Part3
  268. CFrameValue5.Value = CFrame.new(0.511176348, -0.754959106, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
  269. Part6.Parent = Model1
  270. Part6.CFrame = CFrame.new(187.968124, 6.71830034, -74.220787, 0.999996483, -0.0026563406, -0.000119940989, 0.00265610218, 0.999994516, -0.00198605866, 0.000125215971, 0.00198573316, 0.999998033)
  271. Part6.Orientation = Vector3.new(0.109999999, -0.00999999978, 0.150000006)
  272. Part6.Position = Vector3.new(187.968124, 6.71830034, -74.220787)
  273. Part6.Rotation = Vector3.new(0.109999999, -0.00999999978, 0.150000006)
  274. Part6.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
  275. Part6.BottomSurface = Enum.SurfaceType.Smooth
  276. Part6.Material = Enum.Material.SmoothPlastic
  277. Part6.TopSurface = Enum.SurfaceType.Smooth
  278. Weld7.Name = "qCFrameWeldThingy"
  279. Weld7.Parent = Part6
  280. Weld7.C1 = CFrame.new(0.0551300049, 0.511176109, 0.0107116699, -0.965925872, 0.258818984, 0, -0.258818984, -0.965925872, 0, 0, 0, 1)
  281. Weld7.Part0 = Part2
  282. Weld7.Part1 = Part6
  283. Weld7.part1 = Part6
  284. CFrameValue8.Name = "qRelativeCFrameWeldValue"
  285. CFrameValue8.Parent = Part6
  286. CFrameValue8.Value = CFrame.new(0.0551300049, 0.511176109, 0.0107116699, -0.965925872, 0.258818984, 0, -0.258818984, -0.965925872, 0, 0, 0, 1)
  287. Part9.Name = "b"
  288. Part9.Parent = Model1
  289. Part9.CFrame = CFrame.new(190.068253, 6.72387981, -74.22052, -0.00265635434, -0.999996483, -0.000119940989, 0.999994516, -0.00265611103, -0.00198605866, 0.00198573293, -0.000125216, 0.999998033)
  290. Part9.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  291. Part9.Position = Vector3.new(190.068253, 6.72387981, -74.22052)
  292. Part9.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  293. Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
  294. Part9.Size = Vector3.new(1.52143085, 1.52143085, 1.52143085)
  295. Part9.BottomSurface = Enum.SurfaceType.Smooth
  296. Part9.BrickColor = BrickColor.new("Dark stone grey")
  297. Part9.Material = Enum.Material.SmoothPlastic
  298. Part9.TopSurface = Enum.SurfaceType.Smooth
  299. Part9.brickColor = BrickColor.new("Dark stone grey")
  300. Part9.Shape = Enum.PartType.Ball
  301. Weld10.Name = "qCFrameWeldThingy"
  302. Weld10.Parent = Part9
  303. Weld10.C1 = CFrame.new(0.511175156, 2.04499817, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
  304. Weld10.Part0 = Part2
  305. Weld10.Part1 = Part9
  306. Weld10.part1 = Part9
  307. CFrameValue11.Name = "qRelativeCFrameWeldValue"
  308. CFrameValue11.Parent = Part9
  309. CFrameValue11.Value = CFrame.new(0.511175156, 2.04499817, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
  310. Part12.Parent = Model1
  311. Part12.CFrame = CFrame.new(187.974564, 6.22947502, -74.2110443, -0.966609955, -0.256252259, -0.000119940989, 0.256251991, -0.966607988, -0.00198605866, 0.000392996066, -0.00195047911, 0.999998033)
  312. Part12.Orientation = Vector3.new(0.109999999, -0.00999999978, 165.149994)
  313. Part12.Position = Vector3.new(187.974564, 6.22947502, -74.2110443)
  314. Part12.Rotation = Vector3.new(0.109999999, -0.00999999978, 165.149994)
  315. Part12.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
  316. Part12.BottomSurface = Enum.SurfaceType.Smooth
  317. Part12.Material = Enum.Material.SmoothPlastic
  318. Part12.TopSurface = Enum.SurfaceType.Smooth
  319. Weld13.Name = "qCFrameWeldThingy"
  320. Weld13.Parent = Part12
  321. Weld13.C1 = CFrame.new(0.210525513, -0.978862762, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507, 0, 0, 0, 1)
  322. Weld13.Part0 = Part2
  323. Weld13.Part1 = Part12
  324. Weld13.part1 = Part12
  325. CFrameValue14.Name = "qRelativeCFrameWeldValue"
  326. CFrameValue14.Parent = Part12
  327. CFrameValue14.Value = CFrame.new(0.210525513, -0.978862762, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507, 0, 0, 0, 1)
  328. Part15.Parent = Model1
  329. Part15.CFrame = CFrame.new(189.36821, 6.7220192, -74.2206116, -0.999996483, 0.0026563406, -0.000119940989, -0.00265610218, -0.999994516, -0.00198605866, -0.000125215971, -0.00198573316, 0.999998033)
  330. Part15.Orientation = Vector3.new(0.109999999, -0.00999999978, -179.850006)
  331. Part15.Position = Vector3.new(189.36821, 6.7220192, -74.2206116)
  332. Part15.Rotation = Vector3.new(0.109999999, -0.00999999978, -179.850006)
  333. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  334. Part15.Size = Vector3.new(1.52143085, 1.52143085, 1.52143085)
  335. Part15.BottomSurface = Enum.SurfaceType.Smooth
  336. Part15.BrickColor = BrickColor.new("Dark stone grey")
  337. Part15.Material = Enum.Material.SmoothPlastic
  338. Part15.TopSurface = Enum.SurfaceType.Smooth
  339. Part15.brickColor = BrickColor.new("Dark stone grey")
  340. Part15.Shape = Enum.PartType.Cylinder
  341. Weld16.Name = "qCFrameWeldThingy"
  342. Weld16.Parent = Part15
  343. Weld16.C1 = CFrame.new(1.34495544, -0.511176109, 0.0107116699, 0.965925872, -0.258818984, 0, 0.258818984, 0.965925872, 0, 0, 0, 1)
  344. Weld16.Part0 = Part2
  345. Weld16.Part1 = Part15
  346. Weld16.part1 = Part15
  347. CFrameValue17.Name = "qRelativeCFrameWeldValue"
  348. CFrameValue17.Parent = Part15
  349. CFrameValue17.Value = CFrame.new(1.34495544, -0.511176109, 0.0107116699, 0.965925872, -0.258818984, 0, 0.258818984, 0.965925872, 0, 0, 0, 1)
  350. Part18.Name = "g"
  351. Part18.Parent = Model0
  352. Part18.CFrame = CFrame.new(190.072372, 5.17388821, -74.2235947, -0.00265635434, -0.999996483, -0.000119940989, 0.999994516, -0.00265611103, -0.00198605866, 0.00198573293, -0.000125216, 0.999998033)
  353. Part18.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  354. Part18.Position = Vector3.new(190.072372, 5.17388821, -74.2235947)
  355. Part18.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  356. Part18.Size = Vector3.new(3.22142982, 1.15384948, 1.15384948)
  357. Part18.BottomSurface = Enum.SurfaceType.Smooth
  358. Part18.Material = Enum.Material.SmoothPlastic
  359. Part18.TopSurface = Enum.SurfaceType.Smooth
  360. Part18.Shape = Enum.PartType.Cylinder
  361. Weld19.Parent = Part18
  362. Weld19.C0 = CFrame.new(1.54999995, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  363. Weld19.Part0 = Part18
  364. Weld19.Part1 = Part20
  365. Weld19.part1 = Part20
  366. Part20.Name = "i"
  367. Part20.Parent = Part18
  368. Part20.CFrame = CFrame.new(190.068253, 6.72387981, -74.22052, -0.00265635434, -0.999996483, -0.000119940989, 0.999994516, -0.00265611103, -0.00198605866, 0.00198573293, -0.000125216, 0.999998033)
  369. Part20.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  370. Part20.Position = Vector3.new(190.068253, 6.72387981, -74.22052)
  371. Part20.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
  372. Part20.Transparency = 1
  373. Part20.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  374. Part20.BottomSurface = Enum.SurfaceType.Smooth
  375. Part20.CanCollide = false
  376. Part20.Material = Enum.Material.SmoothPlastic
  377. Part20.TopSurface = Enum.SurfaceType.Smooth
  378. Part20.Shape = Enum.PartType.Cylinder
  379. Weld21.Parent = Part20
  380. Weld21.Part0 = Part20
  381. Weld21.Part1 = Part9
  382. Weld21.part1 = Part9
  383. for i,v in pairs(Model0:GetDescendants()) do
  384. if v.ClassName == "Part" then
  385. v.Massless = true
  386. v.CanCollide = false
  387. end
  388. end
  389. Part20.CFrame = char.Head.CFrame
  390. wait()
  391. weld = Weld21
  392. bo = Instance.new("Glue",Part9)
  393. bo.Part0 = weld.Part0
  394. bo.Part1 = weld.Part1
  395. weld.Part0 = nil
  396. Part20.CFrame = char.Head.CFrame
  397. handle = Part3
  398. b = Instance.new("Weld",char)
  399. b.Part0 = char.Head
  400. b.Part1 = Part18
  401. b.C0 = CFrame.new(0,2,0) * CFrame.Angles(math.rad(90),math.rad(90),math.rad(0))
  402. go = Instance.new("BodyGyro",Part9)
  403. go.MaxTorque = Vector3.new(2000,2000,2000)
  404. ready = true
  405. mouse.Button1Down:Connect(function()
  406. if ready == true then
  407. ready = false
  408. local ray = Ray.new(handle.CFrame.p, (mouse.Hit.p - handle.CFrame.p).unit * 300)
  409. local part, position,normal = workspace:FindPartOnRay(ray, char, false, true)
  410. local beam = Instance.new("Part", workspace)
  411. beam.BrickColor = BrickColor.new("Bright violet")
  412. beam.FormFactor = "Custom"
  413. beam.Material = "Neon"
  414. beam.Transparency = 0.25
  415. beam.Anchored = true
  416. beam.Locked = true
  417. beam.CanCollide = false
  418. --bomi = Instance.new("Sound",beam)
  419. --bomi.SoundId = "rbxassetid://142677349"
  420. --bomi.Volume = 10
  421. --bomi:Play()
  422. Part3.Transparency = 1
  423. local mesh = Instance.new('SpecialMesh',beam)
  424. mesh.MeshType = Enum.MeshType.Sphere
  425. local distance = (handle.CFrame.p - position).magnitude
  426. beam.Size = Vector3.new(Part3.Size.Y, Part3.Size.Y, distance)
  427. beam.CFrame = CFrame.new(handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  428. local startz = beam.Size.Z
  429. spawn(function()
  430. for i=1,5 do
  431. local location = beam.CFrame
  432. beam.Transparency = beam.Transparency+0.15
  433. beam.Size = beam.Size-Vector3.new(0,0,startz/5)
  434. beam.CFrame = location+(beam.CFrame.lookVector*(startz/10))
  435. wait()
  436. end
  437. beam:Destroy()
  438. aaa(beam.Position)
  439. end)
  440. wait(2)
  441. Part3.Transparency = 0
  442. ready = true
  443. end
  444. end)
  445. cam = Instance.new("Part",workspace.Camera)
  446. cam.Anchored = true
  447. cam.CanCollide = false
  448. cam.Size = Vector3.new(0,0,0)
  449. cam.Transparency = 1
  450. cam.CFrame = CFrame.new(0,0,0)
  451. game:GetService("RunService").Stepped:Connect(function()
  452. cam.Position = mouse.Hit.p + Vector3.new(0,50,0)
  453. go.CFrame = CFrame.new(Part20.Position,cam.Position - Vector3.new(0,50,0))* CFrame.Angles(-math.rad(90),0,0)
  454. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement