Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="stylesheet" type=text/css href="{{ url_for('static', filename='style.css') }}">
- <style>
- img {
- border: 1px solid #ddd;
- border-radius: 4px;
- padding: 5px;
- width: 150px;
- }
- img:hover {
- box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
- }
- </style>
- {% block main %}
- {% endblock %}
- {% extends 'base.html' %}
- {% block main %}
- {% endblock %}
- href="{{ url_for('index') }}"
- Python:
- https://replit.com/~
- Scratch:
- https://scratch.mit.edu/join
- Roblox Studio
- https://www.roblox.com/create
- Meeting ID:
- Passcode: 12345
- --Scratch
- --https://sites.google.com/view/coding9/scratch-ml/fruit-collector
- --Template
- --https://drive.google.com/file/d/1VrMKp5ZjYHxSAcKJ6TQMx8pL_KhdJKFd/view?usp=drive_link
- --this is script of roblox:
- local eggs = game.ReplicatedStorage.Eggs
- local spawns = game.Workspace.EggSpawns
- while wait(2) do --to select the random egg and spawn every 2 seconds to put it out in the location
- --anything inside this while loop will keep on running for every two seconds
- --create a table for all of the eggs that are present in the folder
- local eggsTable = eggs:GetChildren() --This will help in getting all of the eggs in the folder
- --random egg pick out of the table
- local randomEgg = eggsTable[math.random(1,#eggsTable)] --value for random will be 1 and however items are their in the table, #eggstable will give the amount of items in that table
- --create a table to choose the random spawn
- local spawnsTable = spawns:GetChildren()
- --to pick a random spawn from the table
- local randomSpawn = spawnsTable[math.random(1,#spawnsTable)]
- --After getting a random egg, create a clone of it to not use the egg which is their in replicated storage
- local eggClone = randomEgg:Clone()
- --to put the cloned egg in a new folder
- eggClone.Parent = game.Workspace.SpawnedEggs
- --to set the position of the cloned egg
- eggClone.Position = randomSpawn.Position + Vector3.new(0,20,0) --to get the current position of the random spawn and moving it to 20 studs y axis
- eggClone.Anchored = false
- --touch event when the egg has been touched by the player
- eggClone.Touched:Connect(function(hit) --hit is the arguement, an object which touches the egg
- --when the egg has been touched, delete it
- --to check whether egg has been touched by the player or not
- local playr = game.Players:GetPlayerFromCharacter(hit.Parent) --this will return true or false, depending egg got hit by the players body only
- if playr then
- --if true
- eggClone:Destroy()
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement