Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Weld2()
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.hood
- w.Part1 = game.Workspace.epiclightining.Head
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
- w.Parent = game.Workspace
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.staff
- w.Part1 = game.Workspace.epiclightining["Right Arm"]
- w.C0 = CFrame.fromEulerAnglesXYZ(-1.8, 0, 0) * CFrame.new(0, .3, 3) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
- w.Parent = game.Workspace
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.Ham
- w.Part1 = game.Workspace.epiclightining.staff
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 3, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of thetime)
- w.Parent = script.Parent
- local f = Instance.new("Weld")
- f.Part0 = game.Workspace.epiclightining.Ham
- f.Part1 = game.Workspace.epiclightining.top
- f.C0 = CFrame.fromEulerAnglesXYZ(1.6, 0, 0) * CFrame.new(0, -1.8, -0) --First CFrame is rotation, second Cframe is where it goes.
- f.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
- f.Parent = script.Parent
- local f = Instance.new("Weld")
- f.Part0 = game.Workspace.epiclightining.Ham
- f.Part1 = game.Workspace.epiclightining.bot
- f.C0 = CFrame.fromEulerAnglesXYZ(1.6, 0, 0) * CFrame.new(0, 1.8, -0) --First CFrame is rotation, second Cframe is where it goes.
- f.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
- f.Parent = game.Workspace
- end
- wait(2)
- Player1x = game.Players.epiclightining
- run = game:GetService("RunService")
- local MyMouse = game.Players.LocalPlayer:GetMouse()
- MyMouse.KeyDown:connect(function(key)
- if string.lower(key) == "e" then
- r = game.Workspace
- local k = game.Workspace.epiclightining
- local a = game.Workspace.epiclightining.Torso
- local function Weld()
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.Torso.Part1
- w.Part1 = game.Workspace.epiclightining.Torso
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, -.5, 4) * CFrame.new(-2.5, 0, .6) --This is the second brick (the one you want to move most of the time)
- w.Parent = r
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.Torso.Part
- w.Part1 = game.Workspace.epiclightining.Torso.Part1
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -1.5) * CFrame.new(-2, -2, 0) --This is the second brick (the one you want to move most of the time)
- w.Parent = r
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.Torso.Part2
- w.Part1 = game.Workspace.epiclightining.Torso
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, .5, -4) * CFrame.new(2.5, 0, .6) --This is the second brick (the one you want to move most of the time)
- w.Parent = r
- local w = Instance.new("Weld")
- w.Part0 = game.Workspace.epiclightining.Torso.Part2
- w.Part1 = game.Workspace.epiclightining.Torso.Part3
- w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
- w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 1.6) * CFrame.new(-1.9, -1.9, 0) --This is the second brick (the one you want to move most of the time)
- w.Parent = r
- end
- local b = Instance.new("Part", a)
- b.Name = "Part"
- b.BrickColor = BrickColor.Black()
- local c = Instance.new("BlockMesh", b)
- c.Scale = Vector3.new(1, 0.3, 0.2)
- local d = Instance.new("Part", a)
- d.Name = "Part1"
- d.BrickColor = BrickColor.Black()
- local e = Instance.new("BlockMesh", d)
- e.Scale = Vector3.new(1, 0.3, 0.2)
- local f = Instance.new("Part", a)
- f.Name = "Part2"
- f.BrickColor = BrickColor.Black()
- local g = Instance.new("BlockMesh", f)
- g.Scale = Vector3.new(1, 0.3, 0.2)
- local h = Instance.new("Part", a)
- h.Name = "Part3"
- h.BrickColor = BrickColor.Black()
- local i = Instance.new("BlockMesh", h)
- i.Scale = Vector3.new(1, 0.3, 0.2)
- local z = Instance.new("Part", game.Workspace.epiclightining)
- z.Name = "hood"
- local q = Instance.new("SpecialMesh", z)
- q.MeshType = 9
- q.MeshId = "http://www.roblox.com/asset/?id=16150814"
- q.TextureId = "http://www.roblox.com/asset/?id=35651952"
- local a = Instance.new("Part", game.Workspace.epiclightining)
- a.Name = "staff"
- a.Shape = "Cylinder"
- a.BrickColor = BrickColor.Blue()
- a.CanCollide = false
- local o = Instance.new("CylinderMesh", a)
- o.Scale = Vector3.new(1, 2, 0.05)
- local v = Instance.new("Part", k)
- v.Name = "Ham"
- local u = Instance.new("BlockMesh", v)
- u.Scale = Vector3.new(0.5, 2, 2)
- local g = Instance.new("Part", k)
- g.Name = "top"
- local h = Instance.new("BlockMesh", g)
- h.Scale = Vector3.new(0.7, 0.5, 1.5)
- local s = Instance.new("Part", k)
- s.Name = "bot"
- local w = Instance.new("BlockMesh", s)
- w.Scale = Vector3.new(0.7, 0.5, 1.5)
- Weld()
- wait(.5)
- Weld2()
- if string.lower(key) == "e" then
- local power = 5
- wait()
- bin = script.Parent
- bpos = Instance.new("BodyPosition")
- gyro = Instance.new("BodyGyro")
- gyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
- bpos.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- fly = false
- player = game.Players.LocalPlayer
- char = player.Character.Torso
- airborne = false
- function onButton1Down(mouse)
- fly = true
- while fly do
- pos = mouse.Hit.p
- --gyro.cframe = CFrame.new(char.Position,pos)
- bpos.position = char.Position + (pos-char.Position).unit * power
- wait()
- end
- end
- function onMove(mouse)
- pos = mouse.Hit.p
- gyro.cframe = CFrame.new(char.Position,pos) * CFrame.fromEulerAnglesXYZ(-3.14/2+1.2,0,0)
- --bpos.position = char.Position +
- --wait()
- --end
- end
- function onButton1Up(mouse)
- fly = false
- end
- function onSelected(mouse)
- print("select")
- if mouse == nil then
- return
- end
- airborne = true
- bpos.Parent = char
- bpos.position = char.Position + Vector3.new(0,1,0)
- gyro.Parent = char
- if char.Parent.Humanoid.Sit == true then
- char.Parent.Humanoid.Sit = false
- wait(.05)
- char.Parent.Humanoid.Sit = true
- end
- char.Parent.Humanoid.Sit = true ---
- mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.Button1Up:connect(function() onButton1Up(mouse) end)
- mouse.Move:connect(function() onMove(mouse) end)
- for i, v in ipairs(char:GetChildren()) do
- if v.className == "Motor" then
- v.MaxVelocity = 0
- v.CurrentAngle = -1
- if v.Name == "Left Hip" then
- v.CurrentAngle = 1
- end
- end
- end
- end
- function onDeselected(mouse)
- print("deselect")
- gyro.Parent = nil
- fly = false
- airborne = false
- for i, v in ipairs(char:GetChildren()) do
- if v.className == "Motor" then
- v.MaxVelocity = 1
- end
- end
- char.Parent.Humanoid.Sit = false ---
- for i = 1, 30 do
- if not airborne then
- --bpos.position = bpos.position - Vector3.new(0,0,0)
- wait(0.01)
- end
- end
- if not airborne then
- bpos.Parent = nil
- end
- end
- bin.Selected:connect(onSelected)
- bin.Deselected:connect(onDeselected)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement