tomoneko

物人

Jan 9th, 2024
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  2.  
  3. local Window = OrionLib:MakeWindow({Name = "cat hub", HidePremium = false, SaveConfig = true, ConfigFolder = "OrionTest"})
  4.  
  5. local Tab = Window:MakeTab({
  6. Name = "main",
  7. Icon = "rbxassetid://4483345998",
  8. PremiumOnly = false
  9. })
  10.  
  11. local strength = 400 -- strengthの変数をグローバルに定義する
  12.  
  13. Tab:AddSlider({
  14. Name = "fling power",
  15. Min = 400,
  16. Max = 5000,
  17. Default = 5,
  18. Color = Color3.fromRGB(255,255,255),
  19. Increment = 1,
  20. ValueName = "bananas",
  21. Callback = function(Value)
  22. print(Value)
  23. strength = Value -- スライダーの値をstrengthに代入する
  24. end
  25. })
  26.  
  27. local userinputs = game:GetService("UserInputService")
  28. local action = game:GetService("ContextActionService")
  29. local w = game:GetService("Workspace")
  30. local r = game:GetService("RunService")
  31. local d = game:GetService("Debris")
  32.  
  33. w.ChildAdded:Connect(function(model)
  34. if model.Name == "GrabParts" then
  35. local part_to_impulse = model["GrabPart"]["WeldConstraint"].Part1
  36.  
  37. if part_to_impulse then
  38. print("Part found!")
  39.  
  40. local inputObj
  41. local velocityObj = Instance.new("BodyVelocity", part_to_impulse)
  42. local c1, c2, c3
  43.  
  44. velocityObj.MaxForce = Vector3.new(0,0,0)
  45.  
  46. while inputObj == nil and model.Parent do
  47. for _, button in pairs(game.Players.LocalPlayer.PlayerGui["ContextActionGui"]:GetDescendants()) do
  48. if button:IsA("ImageLabel") then
  49. if button.Image == "http://www.roblox.com/asset/?id=9603678090" then
  50. inputObj = button.Parent
  51. print(inputObj)
  52. end
  53. end
  54. end
  55.  
  56. r.Heartbeat:Wait()
  57. end
  58.  
  59. if inputObj then
  60. c1 = inputObj.MouseButton1Up:Connect(function()
  61. print("Launched!")
  62. velocityObj.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  63. velocityObj.Velocity = workspace.CurrentCamera.CFrame.lookVector * strength -- strengthの値を使う
  64. end)
  65.  
  66. c2 = inputObj.MouseButton1Down:Connect(function()
  67. print("Launched!")
  68. velocityObj.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  69. velocityObj.Velocity = workspace.CurrentCamera.CFrame.lookVector * strength -- strengthの値を使う
  70. end)
  71. end
  72. c3 = model:GetPropertyChangedSignal("Parent"):Connect(function()
  73. if not model.Parent then
  74. c3:Disconnect()
  75. d:AddItem(velocityObj, 1)
  76.  
  77. if c1 then
  78. c1:Disconnect()
  79. if c2 then
  80. c2:Disconnect()
  81. end
  82. end
  83. end
  84. end)
  85. end
  86. end
  87. end)
  88.  
Advertisement
Add Comment
Please, Sign In to add comment