Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plrs = game:GetService("Players")
- local plr = plrs.LocalPlayer
- local character = plr.Character
- local upordownorstable=-3.5
- local MANAFLY
- local mouse = plr:GetMouse()
- local harp={Up="q",Down="e"}
- local Ui
- local MANAFLY_EVENT
- for _,v in pairs(character:GetChildren())do
- coroutine.resume(coroutine.create(function()
- if v:IsA("Part")then
- v.CanCollide = true
- print("NoCollisionConstraint ",v.Name)
- if v.Name:find("Leg") then
- v.Touched:Connect(function(hit)
- if not v:FindFirstChild("NoCollisionConstraint4") then
- d=Instance.new("NoCollisionConstraint",v)
- d.Name = "NoCollisionConstraint4"
- elseif v:FindFirstChild("NoCollisionConstraint4") then
- d=v:FindFirstChild("NoCollisionConstraint4")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- d.Part0 = plr.Character:FindFirstChild("Torso")
- d.Part1 =hit.Parent:FindFirstChild("Left Leg")
- end
- if not v:FindFirstChild("NoCollisionConstraint3") then
- c=Instance.new("NoCollisionConstraint",v)
- c.Name = "NoCollisionConstraint3"
- elseif v:FindFirstChild("NoCollisionConstraint3") then
- c=v:FindFirstChild("NoCollisionConstraint3")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- c.Part0 = plr.Character.Torso
- c.Part1 = hit.Parent:FindFirstChild("Head")
- end
- if not v:FindFirstChild("NoCollisionConstraint2") then
- b=Instance.new("NoCollisionConstraint",v)
- b.Name = "NoCollisionConstraint2"
- elseif v:FindFirstChild("NoCollisionConstraint2") then
- b=v:FindFirstChild("NoCollisionConstraint2")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- b.Part0 = plr.Character.Torso
- b.Part1 = hit.Parent:FindFirstChild("Torso")
- end
- if not v:FindFirstChild("NoCollisionConstraint") then
- a=Instance.new("NoCollisionConstraint",v)
- a.Name = "NoCollisionConstraint"
- elseif v:FindFirstChild("NoCollisionConstraint") then
- a=v:FindFirstChild("NoCollisionConstraint")
- end
- if hit.Name ~= "MANAFLYPART" and hit.Name ~= " Torso"and hit.Name ~= "HumanoidRootPart" then
- a.Part0=plr.Character.Torso
- a.Part1=hit
- end
- end)
- else
- v.Touched:Connect(function(hit)
- if not v:FindFirstChild("NoCollisionConstraint4") then
- d=Instance.new("NoCollisionConstraint",v)
- d.Name = "NoCollisionConstraint4"
- elseif v:FindFirstChild("NoCollisionConstraint4") then
- d=v:FindFirstChild("NoCollisionConstraint4")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- d.Part0 = v
- d.Part1 = hit.Parent:FindFirstChild("Left Leg")
- end
- if not v:FindFirstChild("NoCollisionConstraint3") then
- c=Instance.new("NoCollisionConstraint",v)
- c.Name = "NoCollisionConstraint3"
- elseif v:FindFirstChild("NoCollisionConstraint3") then
- c=v:FindFirstChild("NoCollisionConstraint3")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- c.Part0 = v
- c.Part1 = hit.Parent:FindFirstChild("Head")
- end
- if not v:FindFirstChild("NoCollisionConstraint2") then
- b=Instance.new("NoCollisionConstraint",v)
- b.Name = "NoCollisionConstraint2"
- elseif v:FindFirstChild("NoCollisionConstraint2") then
- b=v:FindFirstChild("NoCollisionConstraint2")
- end
- if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:IsA("Model")then
- b.Part0 = v
- b.Part1 = hit.Parent:FindFirstChild("Torso")
- end
- if not v:FindFirstChild("NoCollisionConstraint") then
- a=Instance.new("NoCollisionConstraint",v)
- a.Name = "NoCollisionConstraint"
- elseif v:FindFirstChild("NoCollisionConstraint") then
- a=v:FindFirstChild("NoCollisionConstraint")
- end
- if hit.Name ~= "MANAFLYPART" and hit.Name ~= " Torso"and hit.Name ~= "HumanoidRootPart" then
- a.Part0=v
- a.Part1=hit
- end
- end)
- end
- end
- end))
- end
- local function keydown(k)
- if k == harp["Up"] then
- upordownorstable = upordownorstable+2
- elseif k == harp["Down"] then
- upordownorstable = upordownorstable-3
- end
- end
- local function keyup(k)
- if harp["Up"] then
- upordownorstable = -3.5
- elseif k == harp["Down"] then
- upordownorstable = -3.5
- end
- end
- local mousekeyevent = {down=mouse.KeyDown:Connect(keydown),up = mouse.KeyUp:Connect(keyup)}
- game:GetService("RunService"):BindToRenderStep("HARP MANAFLY IN GAIA",1,function()
- coroutine.resume(coroutine.create(function()
- if not MANAFLY then
- MANAFLY = Instance.new("Part")
- end
- MANAFLY.Parent = workspace
- MANAFLY.Size = Vector3.new(2,1,2)
- MANAFLY.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,upordownorstable,0)
- MANAFLY.Name = "MANAFLYPART"
- MANAFLY.Anchored = true
- if not MANAFLY_EVENT then
- MANAFLY_EVENT =MANAFLY.Touched:Connect(function(hit)
- -- print("Event Touched From ",v.Name)
- local a
- if not MANAFLY:FindFirstChild("NoCollisionConstraint") then
- a=Instance.new("NoCollisionConstraint",MANAFLY)
- a.Name = "NoCollisionConstraint"
- elseif MANAFLY:FindFirstChild("NoCollisionConstraint") then
- a=MANAFLY:FindFirstChild("NoCollisionConstraint")
- end
- if hit.Parent ~= plr.Character then
- a.Part0=MANAFLY
- a.Part1=hit
- end
- end)
- end
- end))
- coroutine.resume(coroutine.create(function()
- if not Ui then
- Ui = Instance.new("Frame",Instance.new("ScreenGui",plr.PlayerGui))
- local ButtonSubmit = Instance.new("TextButton",Ui)
- local Up = Instance.new("TextBox",Ui)
- local Down = Instance.new("TextBox",Ui)
- local Key1 = Instance.new("TextLabel",Ui)
- local Key2 = Instance.new("TextLabel",Ui)
- Ui.Position= UDim2.new(0.89, 0, 0.5, 0)
- Ui.Size = UDim2.new(0.11, 0, 0.25, 0)
- Ui.BorderSizePixel = 0
- ButtonSubmit.Size = UDim2.new(1, 0, 0.2, 0)
- ButtonSubmit.Text = "SUBMIT"
- Key1.Position = UDim2.new(0, 0, 0.199, 0)
- Key1.Size = UDim2.new(1, 0, 0.2, 0)
- Key1.Text = "KEY UP"
- Up.Position = UDim2.new(0, 0, 0.397, 0)
- Up.Size = UDim2.new(1, 0, 0.2, 0)
- Key2.Position = UDim2.new(0, 0, 0.589, 0)
- Key2.Size = UDim2.new(1, 0, 0.2, 0)
- Key2.Text = "KEY DOWN"
- Down.Position = UDim2.new(0, 0, 0.795, 0)
- Down.Size = UDim2.new(1, 0, 0.2, 0)
- ButtonSubmit.MouseButton1Click:Connect(function()
- if Up.Text ~= "" or Up.Text ~= " " then
- harp["Up"]=Up.Text
- mousekeyevent.up:Disconnect()
- mousekeyevent.down:Disconnect()
- mousekeyevent = {down=mouse.KeyDown:Connect(keydown),up = mouse.KeyUp:Connect(keyup)}
- else
- harp["Up"]="q"
- mousekeyevent.up:Disconnect()
- mousekeyevent.down:Disconnect()
- mousekeyevent = {down=mouse.KeyDown:Connect(keydown),up = mouse.KeyUp:Connect(keyup)}
- end
- if Down.Text ~= "" or Down.Text ~= " " then
- harp["Down"]=Down.Text
- mousekeyevent.up:Disconnect()
- mousekeyevent.down:Disconnect()
- mousekeyevent = {down=mouse.KeyDown:Connect(keydown),up = mouse.KeyUp:Connect(keyup)}
- else
- harp["Up"]="e"
- mousekeyevent.up:Disconnect()
- mousekeyevent.down:Disconnect()
- mousekeyevent = {down=mouse.KeyDown:Connect(keydown),up = mouse.KeyUp:Connect(keyup)}
- end
- end)
- end
- end))
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement