Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this script is basically a recreation of a
- -- unique fail in a henry stickmin game (Infiltrating the airship)
- -- basically its a option ingame that basically fires a laser that disintegrates anything it touches
- -- basically thats it
- -- enjoy
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- function aaa(pos)
- coroutine.resume(coroutine.create(function()
- Part0 = Instance.new("Part")
- SpecialMesh1 = Instance.new("SpecialMesh")
- Part0.Name = "purpleBlast"
- Part0.Parent = workspace
- Part0.CFrame = CFrame.new(180.500153, 2.00000501, -94.9759216, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(180.500153, 2.00000501, -94.9759216)
- Part0.Color = Color3.new(0.419608, 0.196078, 0.486275)
- Part0.Size = Vector3.new(4, 4, 4)
- Part0.Anchored = true
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.BrickColor = BrickColor.new("Bright violet")
- Part0.Material = Enum.Material.Neon
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.brickColor = BrickColor.new("Bright violet")
- Part0.Shape = Enum.PartType.Ball
- SpecialMesh1.Parent = Part0
- SpecialMesh1.MeshType = Enum.MeshType.Sphere
- Part0.Position = pos
- g(Part0)
- end))
- end
- function by(part)
- coroutine.resume(coroutine.create(function()
- --zzz = Instance.new("Sound",part)
- --zzz.SoundId = "rbxassetid://184211507"
- --zzz.Volume = 10
- --zzz:Play()
- part.BrickColor = BrickColor.new("White")
- part.Material = "Neon"
- part.Anchored = true
- wait(.3)
- part.Transparency = .2
- wait(.1)
- part.Transparency = .4
- wait(.1)
- part.Transparency = .6
- wait(.1)
- part.Transparency = .8
- wait(.1)
- part.Parent = nil
- end))
- end
- function Destruction(Pos,Radius)
- local function Destroy(Model)
- for i ,v in ipairs(Model:GetDescendants()) do
- if v:isA("BasePart") and v.Name ~= "Baseplate" and v.Name ~= "base" and v.Name ~= "Base" and v.Name ~= "baseplate" then
- if (v.Position-Pos).magnitude < Radius then
- if v.Name ~= "purpleBlast" then
- by(v)
- end
- end
- end
- if #v:getChildren() > 0 then
- Destroy(v)
- end
- end
- end
- Destroy(game.Workspace)
- end
- function g(parta)
- coroutine.resume(coroutine.create(function()
- while wait() do
- parta.Mesh.Scale = parta.Mesh.Scale + Vector3.new(1,1,1)
- Destruction(parta.Position,parta.Mesh.Scale.Y*2)
- end
- end))
- end
- player = game.Players.LocalPlayer
- char = player.Character
- mouse = player:GetMouse()
- Model0 = Instance.new("Model")
- Model1 = Instance.new("Model")
- Part2 = Instance.new("Part")
- Part3 = Instance.new("Part")
- Weld4 = Instance.new("Weld")
- CFrameValue5 = Instance.new("CFrameValue")
- Part6 = Instance.new("Part")
- Weld7 = Instance.new("Weld")
- CFrameValue8 = Instance.new("CFrameValue")
- Part9 = Instance.new("Part")
- Weld10 = Instance.new("Weld")
- CFrameValue11 = Instance.new("CFrameValue")
- Part12 = Instance.new("Part")
- Weld13 = Instance.new("Weld")
- CFrameValue14 = Instance.new("CFrameValue")
- Part15 = Instance.new("Part")
- Weld16 = Instance.new("Weld")
- CFrameValue17 = Instance.new("CFrameValue")
- Part18 = Instance.new("Part")
- Weld19 = Instance.new("Weld")
- Part20 = Instance.new("Part")
- Weld21 = Instance.new("Weld")
- Model0.Parent = char
- Model1.Parent = Model0
- Part2.Parent = Model1
- 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)
- Part2.Orientation = Vector3.new(0.109999999, -0.00999999978, -164.850006)
- Part2.Position = Vector3.new(188.021896, 7.229599, -74.209053)
- Part2.Rotation = Vector3.new(0.109999999, -0.00999999978, -164.850006)
- Part2.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.Material = Enum.Material.SmoothPlastic
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part3.Parent = Model1
- 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)
- Part3.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part3.Position = Vector3.new(187.268295, 6.71644163, -74.220871)
- Part3.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part3.Color = Color3.new(0.34902, 0.133333, 0.34902)
- Part3.Size = Vector3.new(0.521430671, 0.521430671, 0.521430671)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Bright violet")
- Part3.Material = Enum.Material.Neon
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Bright violet")
- Part3.Shape = Enum.PartType.Ball
- Weld4.Name = "qCFrameWeldThingy"
- Weld4.Parent = Part3
- Weld4.C1 = CFrame.new(0.511176348, -0.754959106, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
- Weld4.Part0 = Part2
- Weld4.Part1 = Part3
- Weld4.part1 = Part3
- CFrameValue5.Name = "qRelativeCFrameWeldValue"
- CFrameValue5.Parent = Part3
- CFrameValue5.Value = CFrame.new(0.511176348, -0.754959106, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
- Part6.Parent = Model1
- 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)
- Part6.Orientation = Vector3.new(0.109999999, -0.00999999978, 0.150000006)
- Part6.Position = Vector3.new(187.968124, 6.71830034, -74.220787)
- Part6.Rotation = Vector3.new(0.109999999, -0.00999999978, 0.150000006)
- Part6.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.Material = Enum.Material.SmoothPlastic
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Weld7.Name = "qCFrameWeldThingy"
- Weld7.Parent = Part6
- Weld7.C1 = CFrame.new(0.0551300049, 0.511176109, 0.0107116699, -0.965925872, 0.258818984, 0, -0.258818984, -0.965925872, 0, 0, 0, 1)
- Weld7.Part0 = Part2
- Weld7.Part1 = Part6
- Weld7.part1 = Part6
- CFrameValue8.Name = "qRelativeCFrameWeldValue"
- CFrameValue8.Parent = Part6
- CFrameValue8.Value = CFrame.new(0.0551300049, 0.511176109, 0.0107116699, -0.965925872, 0.258818984, 0, -0.258818984, -0.965925872, 0, 0, 0, 1)
- Part9.Name = "b"
- Part9.Parent = Model1
- 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)
- Part9.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part9.Position = Vector3.new(190.068253, 6.72387981, -74.22052)
- Part9.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part9.Size = Vector3.new(1.52143085, 1.52143085, 1.52143085)
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.BrickColor = BrickColor.new("Dark stone grey")
- Part9.Material = Enum.Material.SmoothPlastic
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.brickColor = BrickColor.new("Dark stone grey")
- Part9.Shape = Enum.PartType.Ball
- Weld10.Name = "qCFrameWeldThingy"
- Weld10.Parent = Part9
- Weld10.C1 = CFrame.new(0.511175156, 2.04499817, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
- Weld10.Part0 = Part2
- Weld10.Part1 = Part9
- Weld10.part1 = Part9
- CFrameValue11.Name = "qRelativeCFrameWeldValue"
- CFrameValue11.Parent = Part9
- CFrameValue11.Value = CFrame.new(0.511175156, 2.04499817, 0.0107116699, -0.258818984, -0.965925872, 0, 0.965925872, -0.258818984, 0, 0, 0, 1)
- Part12.Parent = Model1
- 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)
- Part12.Orientation = Vector3.new(0.109999999, -0.00999999978, 165.149994)
- Part12.Position = Vector3.new(187.974564, 6.22947502, -74.2110443)
- Part12.Rotation = Vector3.new(0.109999999, -0.00999999978, 165.149994)
- Part12.Size = Vector3.new(1.69667876, 0.104598731, 0.100000001)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.Material = Enum.Material.SmoothPlastic
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Weld13.Name = "qCFrameWeldThingy"
- Weld13.Parent = Part12
- Weld13.C1 = CFrame.new(0.210525513, -0.978862762, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507, 0, 0, 0, 1)
- Weld13.Part0 = Part2
- Weld13.Part1 = Part12
- Weld13.part1 = Part12
- CFrameValue14.Name = "qRelativeCFrameWeldValue"
- CFrameValue14.Parent = Part12
- CFrameValue14.Value = CFrame.new(0.210525513, -0.978862762, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507, 0, 0, 0, 1)
- Part15.Parent = Model1
- 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)
- Part15.Orientation = Vector3.new(0.109999999, -0.00999999978, -179.850006)
- Part15.Position = Vector3.new(189.36821, 6.7220192, -74.2206116)
- Part15.Rotation = Vector3.new(0.109999999, -0.00999999978, -179.850006)
- Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part15.Size = Vector3.new(1.52143085, 1.52143085, 1.52143085)
- Part15.BottomSurface = Enum.SurfaceType.Smooth
- Part15.BrickColor = BrickColor.new("Dark stone grey")
- Part15.Material = Enum.Material.SmoothPlastic
- Part15.TopSurface = Enum.SurfaceType.Smooth
- Part15.brickColor = BrickColor.new("Dark stone grey")
- Part15.Shape = Enum.PartType.Cylinder
- Weld16.Name = "qCFrameWeldThingy"
- Weld16.Parent = Part15
- Weld16.C1 = CFrame.new(1.34495544, -0.511176109, 0.0107116699, 0.965925872, -0.258818984, 0, 0.258818984, 0.965925872, 0, 0, 0, 1)
- Weld16.Part0 = Part2
- Weld16.Part1 = Part15
- Weld16.part1 = Part15
- CFrameValue17.Name = "qRelativeCFrameWeldValue"
- CFrameValue17.Parent = Part15
- CFrameValue17.Value = CFrame.new(1.34495544, -0.511176109, 0.0107116699, 0.965925872, -0.258818984, 0, 0.258818984, 0.965925872, 0, 0, 0, 1)
- Part18.Name = "g"
- Part18.Parent = Model0
- 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)
- Part18.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part18.Position = Vector3.new(190.072372, 5.17388821, -74.2235947)
- Part18.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part18.Size = Vector3.new(3.22142982, 1.15384948, 1.15384948)
- Part18.BottomSurface = Enum.SurfaceType.Smooth
- Part18.Material = Enum.Material.SmoothPlastic
- Part18.TopSurface = Enum.SurfaceType.Smooth
- Part18.Shape = Enum.PartType.Cylinder
- Weld19.Parent = Part18
- Weld19.C0 = CFrame.new(1.54999995, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld19.Part0 = Part18
- Weld19.Part1 = Part20
- Weld19.part1 = Part20
- Part20.Name = "i"
- Part20.Parent = Part18
- 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)
- Part20.Orientation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part20.Position = Vector3.new(190.068253, 6.72387981, -74.22052)
- Part20.Rotation = Vector3.new(0.109999999, -0.00999999978, 90.1500015)
- Part20.Transparency = 1
- Part20.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part20.BottomSurface = Enum.SurfaceType.Smooth
- Part20.CanCollide = false
- Part20.Material = Enum.Material.SmoothPlastic
- Part20.TopSurface = Enum.SurfaceType.Smooth
- Part20.Shape = Enum.PartType.Cylinder
- Weld21.Parent = Part20
- Weld21.Part0 = Part20
- Weld21.Part1 = Part9
- Weld21.part1 = Part9
- for i,v in pairs(Model0:GetDescendants()) do
- if v.ClassName == "Part" then
- v.Massless = true
- v.CanCollide = false
- end
- end
- Part20.CFrame = char.Head.CFrame
- wait()
- weld = Weld21
- bo = Instance.new("Glue",Part9)
- bo.Part0 = weld.Part0
- bo.Part1 = weld.Part1
- weld.Part0 = nil
- Part20.CFrame = char.Head.CFrame
- handle = Part3
- b = Instance.new("Weld",char)
- b.Part0 = char.Head
- b.Part1 = Part18
- b.C0 = CFrame.new(0,2,0) * CFrame.Angles(math.rad(90),math.rad(90),math.rad(0))
- go = Instance.new("BodyGyro",Part9)
- go.MaxTorque = Vector3.new(2000,2000,2000)
- ready = true
- mouse.Button1Down:Connect(function()
- if ready == true then
- ready = false
- local ray = Ray.new(handle.CFrame.p, (mouse.Hit.p - handle.CFrame.p).unit * 300)
- local part, position,normal = workspace:FindPartOnRay(ray, char, false, true)
- local beam = Instance.new("Part", workspace)
- beam.BrickColor = BrickColor.new("Bright violet")
- beam.FormFactor = "Custom"
- beam.Material = "Neon"
- beam.Transparency = 0.25
- beam.Anchored = true
- beam.Locked = true
- beam.CanCollide = false
- --bomi = Instance.new("Sound",beam)
- --bomi.SoundId = "rbxassetid://142677349"
- --bomi.Volume = 10
- --bomi:Play()
- Part3.Transparency = 1
- local mesh = Instance.new('SpecialMesh',beam)
- mesh.MeshType = Enum.MeshType.Sphere
- local distance = (handle.CFrame.p - position).magnitude
- beam.Size = Vector3.new(Part3.Size.Y, Part3.Size.Y, distance)
- beam.CFrame = CFrame.new(handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
- local startz = beam.Size.Z
- spawn(function()
- for i=1,5 do
- local location = beam.CFrame
- beam.Transparency = beam.Transparency+0.15
- beam.Size = beam.Size-Vector3.new(0,0,startz/5)
- beam.CFrame = location+(beam.CFrame.lookVector*(startz/10))
- wait()
- end
- beam:Destroy()
- aaa(beam.Position)
- end)
- wait(2)
- Part3.Transparency = 0
- ready = true
- end
- end)
- cam = Instance.new("Part",workspace.Camera)
- cam.Anchored = true
- cam.CanCollide = false
- cam.Size = Vector3.new(0,0,0)
- cam.Transparency = 1
- cam.CFrame = CFrame.new(0,0,0)
- game:GetService("RunService").Stepped:Connect(function()
- cam.Position = mouse.Hit.p + Vector3.new(0,50,0)
- go.CFrame = CFrame.new(Part20.Position,cam.Position - Vector3.new(0,50,0))* CFrame.Angles(-math.rad(90),0,0)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement